How to mount an external USB(3) drive to a LXC container
In this example we make use of a Western Digital 1TB external USB3 drive.
This device is NTFS formatted, which is easy to handle in Windows.
Our container is used for samba services and has ID 102.
At the host system (Proxmox)
– Check which device the drive has been given on the host.
lsblk (in this case ‘sdg’, partition ‘sdg1’)
– Add a mounting location
– Install the ntfs-3g package
apt-get update && apt-get install ntfs-3g
– Mount the disk to the mountlocation
mount -t ntfs-3g /dev/sdg1 /mnt/ext-usb
Op LXC client (container)
– Add a mount location inside the LXC container
At the host
– Mount the drive to the container in this example we use mp1 (check if mp1 is not allready used!)
pct set 102 -mp1 /mnt/ext-usb,mp=/mnt/ext-usb