Antsle Forum

Welcome to our Antsle community! This forum is to connect all Antsle users to post experiences, make user-generated content available for the entire community and more. 

Please note: This forum is about discussing one specific issue at a time. No generalizations. No judgments. Please check the Forum Rules before posting. If you have specific questions about your Antsle and expect a response from our team directly, please continue to use the appropriate channels (email: [email protected]) so every inquiry is tracked. 

You need to log in to create posts and topics.

Connect USB to specific antlet

I would like to connect an external USB disk to one antlet only. I've read the USB Pass through but I seem to be missing some fundamental concepts.

I'm not really clear what to do with the USB drive once it's "passed through". How do I mount it?

What I want to achieve is to mount the USB drive somewhere on the antlet. The anlet is running Ubuntu 16.04.5 LTS.

Can you please help me?

I haven't done the usb pass-through, but I would try:

  1. Is your antlet a KVM (the docs say pass-through only works with KVMs)
  2. Did you try doing these steps in the antlet:
    1. To see the existing drives run
      lsblk
      

      The drives are named: sda, sdb...

      Then plug in your usb drive and run 'lsblk' again to see the name of the new drive.
      Now we want to create a partition on the drive.

      parted -a optimal /dev/sdX
      

      where 'sdX' is the name of your usb drive

    2. at the 'parted' prompt enter
      mklabel gpt
      

      this will warn, any data on the drive will be destroyed. If this is ok with you, answer Yes.
      then quit 'parted'

      q

Right, I guess that was it. It's an LXC antlet. Thanks for that.

On an LXC antltet, I guess I just don't need this? I should be able to access the drive directly?

I have an LXC Ubuntu 16.04 antlet for a plex media server. I connected an external USB Drive for storing all the media.

I followed the instructions in Docs (https://docs.antsle.com/usbdrives/) down to and including:

zpool create myusbdrive -m /myusbdrive /dev/sde

zfs set atime=off myusbdrive

 

Then, in the antlet, I added a Virtual Drive using that zpool (in the example, it shows as myusbdrive).

Then I had to do the mount command in the antlet so I could access it.

I'm not home now, but I think I also had to add the mount command to the root's crontab (in the antlet) using the @reboot schedule to make sure it mounts when the antlet starts up.

When I get home I can post the details.

Sweet - that's extremely helpful. Thank you!

I do remember that once I added the USB to the main antsle (with a zpool name of wd7tb in my case), in Antman, I went to the antlet and added a Virtual Drive, selecting the zpool wd7tb (following these instructions: https://docs.antsle.com/drives/) and specifying the size (in my case, I used the whole drive - 8192 GB).  In my system, the target was "vda" [the bold things are unique to my situation, they may differ on your system]

Then after starting the antlet and sshing to it, I did:

mkfs.ext4 /dev/vda

mkdir /mnt/media (I wanted to call my USB drive "media")

mount -t ext4 /dev/vda /mnt/media

As the Docs say, fstab doesn't work for LXCs, so I added this to the crontab for root to re-mount at antlet boot:

sudo crontab -e     [edit the crontab for root]

I added this line:

@reboot /bin/mount /dev/vda /mnt/media

 

That's absolutely brilliant. Thank you very much for taking the time.

As it happens, I believe I also have a hardware issue with my drive - have ordered a replacement from Amazon and will follow your steps as soon as it arrives 🙂