I am not doing exact the same but this is how to mount a USB disk in Proxmox and pass it through to an LXC container.
- Step 1: Create a mount point and set permissions
sudo mkdir /mnt/USB-DISK # Create mount point
sudo chown root:root /mnt/USB-DISK # Set owner and group to root
sudo chmod 0755 /mnt/USB-DISK # Set permissions to rwxr-xr-x
- Step 2: Identify the disk and get its UUID
blkid /dev/sdb1 # Replace /dev/sdb1 with your actual device
Note the UUID from the output, e.g.:
UUID=6c901h57-0j01-4f39-a4a9-be63d04233b4
- Step 3: Add the disk to /etc/fstab for automatic mounting
sudo nano /etc/fstab
Add the following lines:
##
# USB-DISK Automount
UUID=6c901h57-0j01-4f39-a4a9-be63d04233b4 /mnt/USB-DISK ext4 noatime,nofail,users,defaults 0 0
##
Make sure the filesystem type (ext4) matches your disk. For NTFS or exFAT, use ntfs-3g or exfat respectively.
- Step 4: Reboot to apply changes
sudo reboot
After reboot, your USB disk should be automatically mounted at /mnt/USB-DISK.
- Step 5: Pass the disk to your LXC container
Edit the container configuration file:
sudo nano /etc/pve/nodes/<NODE>/lxc/<LXCID>.conf
Replace <NODE> with your Proxmox node name and <LXCID> with your container ID.
Add the following line:
mp0: /mnt/USB-DISK,mp=/mnt/USB-DISK
You can adjust the mount path inside the container if needed.
- Step 6: Restart the container
pct restart <LXCID>
Your LXC container should now have access to the USB disk at the specified path and you can Setup to use this Disk as Timeshift and/or Recording Space.