RO NFS Mount for Container

AwakeBread

Active Member
Feb 27, 2018
6
1
41
43
Hi, I'm trying to mount a shared Read Only NFS Drive for use by a container. As I understand it, the best way to do this is to mount it on the Proxmox Host as Storage and then make it a mount point for the Container.

When I try to mount it as storage I must choose the "content". And whichever option I choose Proxmox throws an error because it tries to create "dumps" or "templates" or some other folder structure, but it's a Read Only mount.

Is there something I'm missing? Thanks!
 
in the storage config (/etc/pve/storage.cfg) you can add the parameter 'mkdir 0' to the storage (pve does not try to create those dirs then)
 
or you can just mount the NFS export regularly (e.g., fstab or .mount unit) if you don't want to use it as PVE storage anyway (a bind mount takes an arbitrary non-symlinked directory path as source path)
 
in the storage config (/etc/pve/storage.cfg) you can add the parameter 'mkdir 0' to the storage (pve does not try to create those dirs then)

So, I removed the mount from the Storage GUI, and then added it back via the command line:

(apparently new users can't post links: i.imgur.com slash AXSXkrn.png

and then I go to add a mount point to the container, but I get:

(i.imgur.com slash sAHjnm7.png)

Not sure why it's a cfs error either?

Thanks for the tips, I guess I'll try to do it all outside the GUI next.
 
So, if I manually put an entry in the system fstab and then manually add the mount point to the container it works.

It's not great, especially considering the nfs server is a freenas guest on the same proxmox box. Hopefully I can come up with something a little better. Thanks all!