Add External USB Storage to Proxmox
To use storage from an attached USB drive, we need to enter the Preoxmox shell command line interface. There just a few quick things we need to do, then you can enjoy your new external storage on Proxmox!
Connect the USB Drive
Make sure the USB drive is connected and ready to go. It's best that the drive is new and not used with files already on it. Also, once you plug it in to a USB port, you cannot change the port after we mount it. This is very important. So make sure you have it plugged into the right USB port.
If you need to clear the drive you can do so using cfdisk.
Make sure you change the drive accordingly to your own ID above. See below for how to find this information.
Figure out what drive it is
Find the drive device ID running this command
Here we can see my 4TB USB drive. I had to scroll up pretty far in the terminal to find it. Here you can see the ID is sdb1.
Create the filesystem
If we tried mounting the drive without setting the filesystem, we would get an error like this
wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
So to avoid this, we need to run the following command
Make sure you change this to the correct device ID that matched your own drive.
Create folder for mounting
Now we have to make a folder where the drive will be mounted. I used the following folder.
Now we mount the drive to it
mount /dev/sdb1 /mnt/USB_Data
Add the drive in Proxmox UI
Now we go into Proxmox and add storage as a Directory using our new USB drive
Give it a name (any name should work). The Directory MUST be the folder where the new drive was mounted. Click add.
You should now see your new drive and it should be ready to use.
You most likely want the USB drive to automatically mount when you reboot or unplug and plug them back in. To accomplish this we need to run the following in the PVE shell.
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2FAB19E7CCB7F415 echo "deb https://apt.iteas.at/iteas buster main" > /etc/apt/sources.list.d/iteas.list apt update apt install pve6-usb-automount
Did you find this helpful? Subscribe to me on Youtube for more content!