HDD mounting\passthrough

Nixellion

Active Member
Mar 6, 2019
23
0
41
34
I've just installed proxmox on an SSD. I also have 2 other HDDs with data on them which I want to share with the rest of the network.

I thought about making a CT (File Server from Turnkey looks good), passing my HDDs to it and sharing it with other VMs\Containers and physical PCs using samba share.

How do I do that? I could not find anything like that in UI.
 
Hi

This you have to do on the shell.
see man pct and see "Bind Mount Points"

Thanks. In general, what other approaches are there to achieve shared storage between VMs? I could just mount and share the drive from the host, does not sound like it's much of a hassle even if I needed to reinstall\restore the server?
 
You can use only bindmounts fore containers. Qemu is not capable to use it.
The most generic way is NFS.
 
Ok, simple question.

I have a container that I want to use as File Server. Serve NFS and Samba from it.

I have a spare drive WITH DATA on it, formatted as ext4. I can mount it on the host or unmount it.

How do I give access to this drive (or partition on it) to container permanently? So that this container will then be used to share this storage with other CTs and VMs
 
Mount the Disk on the host. insert it in the fstab.
Add the mountpoint to the lxcconfig.

Code:
pct set <vmid> --mp<X>  </path/on/host>,mp=</path/in/lxc>

For more options see
Code:
pct help set