Adding a HDD to proxmox

I moved my physical SMB server to an Ubuntu container in proxmox and I’d like to add my storage drive to it. The storage drive already contains partitions and data. I know I can reformat it and attach it but can I attach it as is? I can’t seem to find any info on this. Maybe I’m not searching the right words?

You could search “Pass disk through to proxmox “ passthrough and raw being useful keywords?

I’m not sure how you manage KVM, but saw one thread:

1 Like

Thank you. I’ll give that a try tonight when I get home.

1 Like

How is the drive partitioned? Does ProxMox see it? If so and you go to the container under resources is the “mount volume” button available? I believe with a privileged container, you may be able to access all the drives ProxMox can see in that container but I’m not entirely sure that’s accurate. I wish I could be more help.

df -T says ext4 for the type. Proxmox can see it. I can go to resources, click add and the only option is mount point. Its not in there.

If the ultimate goal is just giving the drive to the container, this could be helpful

1 Like

I can get it to work with a VM but not with a container yet. I’ll try some more this weekend but at least I have access to my stuff now. Thanks guys.

1 Like

Did you figure it out? Trick is to mount the drive on the host (use fstab, not the GUI if you don’t intend to use the same drive for container storage, etc), then add a line like this to your /etc/pve/lxc/100.conf (replace 100 with the intended container id)
mp0: /host/mount/path,mp=/container/mount/path
There is NO space after the comma.

Permissions might become fun though - if you’re running an unprivileged container, the permissions on the physical volume get ignored and show as nobody. You can either look at remapping the permissions (not fun), reset the permissions on the physical drive (using numeric uids) or recreate the container as privileged (backup and restore or rebuild from scratch).

I’ve haven’t tried to get it working in a container yet. I will definately try this though, thank you.