Tag: usb3

  • Proxmox – Add external usb drive to LXC container

    Proxmox – Add external usb drive to LXC container

    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
    mkdir /mnt/ext-usb

    – 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

    AT LXC client (container)

    – Add a mount location inside the LXC container
    mkdir /mnt/ext-usb

    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