Back to Blog
tutorialIntermediate3 min read

Proxmox - Pass HDD to Container

Step-by-step guide for mounting a physical drive (SSD/HDD) to a Proxmox LXC container using the host configuration and mount points.

Proxmox - Pass Drive Through to Container

This guide covers how to mount or pass through a physical drive (SSD/HDD) to a Proxmox LXC container. You should have Proxmox installed and an LXC container already created.

Identify the Drive UUID

Open the Proxmox host shell and retrieve the disk UUID:

lsblk -f

Find the drive you want to mount and copy its UUID. The UUID format looks like: 6a0be238-82ee-4c22-841c-f57cafb5bcfa

Create Mount Point on Host

Create the directory on the Proxmox host where the drive will be mounted:

mkdir /media/[Your mount point]

For example:

mkdir /media/postdata01

Configure FSTAB on Host

Edit the host's filesystem table to auto-mount the drive:

nano /etc/fstab

Add the drive entry:

UUID=<UUID>  /media/<YOUR MOUNT POINT>   ext4   defaults,noatime,nofail 0 0

Save with Ctrl+X, Y, Enter. Then mount the drive:

mount -av

Create Mount Point in Container

Start your container and create the mount point directory inside it:

sudo mkdir /media/<YOUR MOUNT POINT>

For example:

sudo mkdir /media/postdata

Note that the container mount point name doesn't need to match the host mount point name.

Once the directory is created, stop the container.

Modify Container Configuration

On the Proxmox host, edit the container's config file:

nano /etc/pve/lxc/[YOUR CONTAINER ID].conf

Add this line at the bottom:

mp0: /media/<HOST Mount Point>,mp=/media/<CONTAINER Mount Point>

For example:

mp0: /media/postdata01,mp=/media/postdata

Save with Ctrl+X, Y, Enter.

Verify the Mount

Start the container and verify the drive is mounted:

df -h

You should see your drive mounted at the container mount point. The drive mounts automatically when the container starts because it reads from the config file — no fstab entry is needed inside the container for this.

Additional Notes

Your container can still use its own /etc/fstab for other mounts (like Samba shares that need to auto-mount at startup). The pass-through drive is handled entirely by the LXC config, while fstab handles anything else you want to mount inside the container.