if you are using a container as a storage server, one this that you might want to do is add storage from a USB drive to that container. If you have been looking around you might have found that you can pass a USB port into a container, but after trying to, you found you couldn’t get it working. This blog post is meant to show you how we at VE, pass USB storage to a container that we are using as a storage server.
The first thing that you are going to want to do is mount the USB drive to the server (Proxmox). You can do this in either with the web interface or by command line, if you would like to keep the data on the drive, it is best to use command line.
Command Line
Web Interface
Now that you have the drive mounted, we can start adding the drive to the container. The first thing that we will have to do is take note of the container ID number, and the mount path of the drive. If you used the web interface it can be found by clicking on your server – Disks – Directory
After you know the path to your disk and the ID number of your CT, it is time to open the shell and set up the mount to the CT.
In my case the drive was mounted at /mnt/pve/USB, and the CT id number was 100.
So I open the CT config file by entering:
$ nano /ect/pve/lxc/[id number].conf
Then I add the following line:
$ mp0: [path to mount],mp=[path to mount in CT]
The path to mount in CT douse can be one you choose.