lxc container nfs server

philthynz

New Member
Jun 23, 2016
1
0
1
37
Since upgrading to the Proxmox "Virtual Environment 5.1-51" and new kernel "Linux proxmox 4.13.16-2-pve" and Debian server "9.4" my lxc conatiner has issues starting an nfs server.

I have created a container and changed some config files:

In "/etc/pve/lxc/101.conf" I added "lxc.apparmor.profile: unconfined"

arch: amd64
cpulimit: 1
cpuunits: 1024
hostname: unifi
memory: 1024
nameserver: 8.8.8.8 8.8.4.4
net0: name=eth0,bridge=vmbr0,gw=192.168.2.1,hwaddr=72:62:49:F7:53:91,ip=192.168.2.5/23,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-zfs:subvol-101-disk-1,size=30G
searchdomain: local
swap: 1024
lxc.apparmor.profile: unconfined


In "/var/lib/lxc/101/config" I added "lxc.apparmor.profile = unconfined"

After installing "nfs-common" and "nfs-kernel-server". nfs-kernel-server has an issue starting:

Apr 19 15:19:54 netsus mount[757]: mount: cannot mount sunrpc read-only
Apr 19 15:19:54 netsus systemd[1]: run-rpc_pipefs.mount: Mount process exited, code=exited status=32
Apr 19 15:19:54 netsus systemd[1]: Failed to mount RPC Pipe File System.
-- Subject: Unit run-rpc_pipefs.mount has failed
-- Defined-By: systemd
-- Support: <link>
--
-- Unit run-rpc_pipefs.mount has failed.
--
-- The result is failed.
Apr 19 15:19:54 netsus systemd[1]: Dependency failed for RPC security service for NFS client and server.
-- Subject: Unit rpc-gssd.service has failed
-- Defined-By: systemd
-- Support: <link>
--
-- Unit rpc-gssd.service has failed.
--
-- The result is dependency.
Apr 19 15:19:54 netsus systemd[1]: rpc-gssd.service: Job rpc-gssd.service/start failed with result 'dependency'.
Apr 19 15:19:54 netsus systemd[1]: Dependency failed for RPC security service for NFS server.
-- Subject: Unit rpc-svcgssd.service has failed
-- Defined-By: systemd
-- Support: <link>
--
-- Unit rpc-svcgssd.service has failed.
--
-- The result is dependency.
Apr 19 15:19:54 netsus systemd[1]: rpc-svcgssd.service: Job rpc-svcgssd.service/start failed with result 'dependency'.
Apr 19 15:19:54 netsus systemd[1]: run-rpc_pipefs.mount: Unit entered failed state.



I have read through a few Proxmox threads. None seem to help.

Has anyone got this working in Proxmox 5.1-51?
 
same issue here, the mount for the rpc_pipefs fails even though no apparmor issues


Code:
root@ldap:~# systemctl status run-rpc_pipefs.mount
* run-rpc_pipefs.mount - RPC Pipe File System
   Loaded: loaded (/lib/systemd/system/run-rpc_pipefs.mount; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-08-26 08:48:24 CEST; 57s ago
    Where: /run/rpc_pipefs
     What: sunrpc
  Process: 41 ExecMount=/bin/mount sunrpc /run/rpc_pipefs -t rpc_pipefs (code=exited, status=32)

Aug 26 08:48:24 ldap mount[41]: mount: /run/rpc_pipefs: permission denied.
root@ldap:~# /bin/mount sunrpc /run/rpc_pipefs -t rpc_pipefs
mount: /run/rpc_pipefs: permission denied.

how do we allow the mount inside lxc?

update:
setting priviledged container the error changes to read only

Code:
root@ldap:~# systemctl status run-rpc_pipefs.mount
* run-rpc_pipefs.mount - RPC Pipe File System
   Loaded: loaded (/lib/systemd/system/run-rpc_pipefs.mount; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-08-26 09:56:38 CEST; 1min 35s ago
    Where: /run/rpc_pipefs
     What: sunrpc
  Process: 42 ExecMount=/bin/mount sunrpc /run/rpc_pipefs -t rpc_pipefs (code=exited, status=32)

Aug 26 09:56:38 ldap mount[42]: mount: /run/rpc_pipefs: cannot mount sunrpc read-only.
 
Last edited:
Proxmox 5.3

Under the Container's Options, there is a "new" Feature, where you can (and have to) select the "Nesting" and "NFS" options for at least Debian 9 to work
 
I had issues when cloning an LXC then trying to configure it for NFS.

After a clean install as a privileged container set the features to:

features: mount=nfs,nesting=1
 

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!