proxmox 6.3 + lxc+ nfs share

ilia987

Active Member
Sep 9, 2019
275
13
38
37
i would like to share nfs folder ,
the lxc is ubuntu 18.04

i tried but every time i receive an error:

Bash:
root@nfs-intenral:~# journalctl -xe
-- The result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: rpc-svcgssd.service: Job rpc-svcgssd.service/start failed with result 'dependency'.
Jan 12 11:21:13 nfs-intenral systemd[1]: Dependency failed for RPC security service for NFS client and server.
-- Subject: Unit rpc-gssd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit rpc-gssd.service has failed.
--
-- The result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: rpc-gssd.service: Job rpc-gssd.service/start failed with result 'dependency'.
Jan 12 11:21:13 nfs-intenral systemd[1]: Started Preprocess NFS configuration.
-- Subject: Unit nfs-config.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-config.service has finished starting up.
--
-- The start-up result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited status=1
Jan 12 11:21:13 nfs-intenral systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
Jan 12 11:21:13 nfs-intenral systemd[1]: Failed to mount NFSD configuration filesystem.
-- Subject: Unit proc-fs-nfsd.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit proc-fs-nfsd.mount has failed.
--
-- The result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: Dependency failed for NFS server and services.
-- Subject: Unit nfs-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-server.service has failed.
--
-- The result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: Dependency failed for NFS Mount Daemon.
-- Subject: Unit nfs-mountd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-mountd.service has failed.
--
-- The result is RESULT.
Jan 12 11:21:13 nfs-intenral systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Jan 12 11:21:13 nfs-intenral systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.


Code:
proxmox-ve: 6.3-1 (running kernel: 5.4.78-1-pve)
pve-manager: 6.3-2 (running version: 6.3-2/22f57405)
pve-kernel-5.4: 6.3-2
pve-kernel-helper: 6.3-2
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.78-1-pve: 5.4.78-1
pve-kernel-5.4.73-1-pve: 5.4.73-1
pve-kernel-5.4.65-1-pve: 5.4.65-1
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.10-1-pve: 5.3.10-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: not correctly installed
ifupdown2: 3.0.0-1+pve3
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.5
libproxmox-backup-qemu0: 1.0.2-1
libpve-access-control: 6.1-3
libpve-apiclient-perl: 3.1-1
libpve-common-perl: 6.3-1
libpve-guest-common-perl: 3.1-3
libpve-http-server-perl: 3.0-6
libpve-storage-perl: 6.3-2
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.3-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.0.5-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.4-3
pve-cluster: 6.2-1
pve-container: 3.3-1
pve-docs: 6.3-1
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-3
pve-firmware: 3.1-3
pve-ha-manager: 3.1-1
pve-i18n: 2.2-2
pve-qemu-kvm: 5.1.0-7
pve-xtermjs: 4.7.0-3
qemu-server: 6.3-1
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 0.8.5-pve1
 
Last edited:
Is that a unprivileged LXC? Unprivileged LXCs don't have the rights to mount CIFS/NFS shares. You need to use a privileged LXC with NFS or CIFS features enabled. Or you need to mount that NFS share to your host and bind-mount that mountpoint into your privileged LXC. But if you don't want to only use chmod 777 also you need manually edit the user/group remapping.
 
Last edited:
Is that a unprivileged LXC? Unprivileged LXCs don't have the rights to mount CIFS/NFS shares. You need to use a privileged LXC with NFS or CIFS features enabled. Or you need to mount that NFS share to your host and bind-mount that mountpoint into your privileged LXC. But if you don't want to only use chmod 777 also you need manually edit the user/group remapping.

Unprivileged container = NO,

what to do to enable the NFS?
 
Last edited:
Go to your
Unprivileged container = NO,

what to do to enable the NFS?
Go to your LXC -> Options -> Features and enable the NFS checkbox.
no nfs checkbox, and i cannot edit Features View attachment 22706
No idea why the edit button is disabled. You could manually edit the config file to enable the features but I think there must be a reason why proxmox don't want you to change this.
 
No idea why the edit button is disabled. You could manually edit the config file to enable the features but I think there must be a reason why proxmox don't want you to change this.
i found the reason, it is available only for root user.. and i was with another user ( but with root permissions )

Turned NFS feature on, and rebooted the machine,
now have this error:

Code:
root@nfs-intenral:~# systemctl restart nfs-kernel-server
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.



root@nfs-intenral:~# journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-idmapd.service has failed.
--
-- The result is RESULT.
Jan 12 13:33:54 nfs-intenral systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Jan 12 13:33:54 nfs-intenral systemd[1]: Dependency failed for RPC security service for NFS client and server.
-- Subject: Unit rpc-gssd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit rpc-gssd.service has failed.
--
-- The result is RESULT.
Jan 12 13:33:54 nfs-intenral systemd[1]: rpc-gssd.service: Job rpc-gssd.service/start failed with result 'dependency'.
Jan 12 13:33:54 nfs-intenral mount[277]: mount: only root can use "--types" option (effective UID is 100000)
Jan 12 13:33:54 nfs-intenral systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited status=1
Jan 12 13:33:54 nfs-intenral systemd[1]: proc-fs-nfsd.mount: Failed with result 'exit-code'.
Jan 12 13:33:54 nfs-intenral systemd[1]: Failed to mount NFSD configuration filesystem.
-- Subject: Unit proc-fs-nfsd.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit proc-fs-nfsd.mount has failed.
--
-- The result is RESULT.
Jan 12 13:33:54 nfs-intenral systemd[1]: Dependency failed for NFS server and services.
-- Subject: Unit nfs-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-server.service has failed.
--
-- The result is RESULT.
Jan 12 13:33:54 nfs-intenral systemd[1]: Dependency failed for NFS Mount Daemon.
-- Subject: Unit nfs-mountd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-mountd.service has failed.
--
-- The result is RESULT.
Jan 12 13:33:54 nfs-intenral systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Jan 12 13:33:54 nfs-intenral systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Jan 12 13:33:54 nfs-intenral systemd[1]: Started Preprocess NFS configuration.
-- Subject: Unit nfs-config.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nfs-config.service has finished starting up.
 
Last edited:
do you want to run a NFS server inside your container or do you want to mount a NFS share in your container?

running the nfs-kernel-server inside a LXC container does not make sense and does not really work (by design).
 
do you want to run a NFS server inside your container or do you want to mount a NFS share in your container?

running the nfs-kernel-server inside a LXC container does not make sense and does not really work (by design).
yes, i would like to run the nfs server inside the container, to enable another system to access it
 
Same here and did not find a way to make it work.

My LXC Container does not let me change the "option" from unpriviledged to priviledged. Editing is not possible.
 
In the meantime I did a backup of the container and restored it with priviledged option.
That worked fine but it broke my docker installations.

So I think you can either have an unpriviledged container working with docker or a priviledged working with nfs.
I got many apparmor errors after making the container priviledged and do not have enough knowledge to fix it on my own.
 
i made a separate container for docker and nfs
(to reduce and share load across the cluster )
 

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!