Flaxplax

Personal documentation

NFS

NFS server need to be a privileged container to run

lxc config set <container> security.privileged true

You also need apparmor to allow nfs stuff

lxc config set <container> raw.apparmor 'mount fstype=nfs*, mount fstype=rpc_pipefs,'

Install nfs-kernel-server

apt install nfs-kernel-server

Check and see if it is running

systemctl status nfs-kernel-server

● nfs-server.service - NFS server and services
     Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2022-10-09 14:01:28 UTC; 1min 11s ago
   Main PID: 2427 (code=exited, status=0/SUCCESS)

Oct 09 14:01:27 nfs systemd[1]: Starting NFS server and services...
Oct 09 14:01:27 nfs exportfs[2426]: exportfs: can't open /etc/exports for reading
Oct 09 14:01:28 nfs systemd[1]: Finished NFS server and services.
Last updated on 9 Oct 2022
Published on 9 Oct 2022