[SOLVED] mount NFS shares in a host

piviul

Active Member
Mar 19, 2020
50
3
28
Hi all, I need to mount a NFS share in a LXC unprivileged container so I would like to mount it on the host (node than host the LXC) and then export the mount point to the LXC as suggest me Oguz in a previous thread. On the NFS server I have added the ip of the host to the exports file and then I have created the nfs-tuning mount point folder in /mnt but when I launch the mount command I get a Permission denied error. This is the result of the mount command:

Bash:
# mount.nfs -v serverdati:/home/tuning /mnt/nfs-tuning/
mount.nfs: timeout set for Tue Nov 10 08:30:55 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.70.5,clientaddr=192.168.70.32'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.70.5,clientaddr=192.168.70.32'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.70.5,clientaddr=192.168.70.32'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=192.168.70.5'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.70.5 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.70.5 prog 100005 vers 3 prot UDP port 57757
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting serverdati:/home/tuning

Please can you help me to solve this problem?

Piviul
 
hi,

have you tried to do it using the GUI? you can go to Datacenter -> Storage -> Add -> NFS and fill the blanks according to your setup.
 
Thank you very much Oguz! What kind of Content should I choose for user data files and directories?

Piviul
 
you can use anything you like - after adding the storage it's possible to go to the mountpoint on the terminal and create whichever directory you like (some directories are created by PVE, do not change the names of these or use them for custom data)
 
Please let me ask you a last question before marking this thread as solved: there is a way, using the GUI, to export this mount point to the container?

Best regards
Piviul
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!