Hello all,
i have setup a LXC container and unchecked the unprivileged checkbox because I read somewhere that NFS is not working in a unprivilidged container.
I tried everything but I don't get NFS running. I install the server and it says he miss something. I tried debian11, debian12, ubuntu and privilege yes and no but every time it don't looks good.
Someone an idea?
root@ct-backup:~# apt-get install nfs-kernel-server -y
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
keyutils libevent-core-2.1-7 libnfsidmap1 libyaml-0-2 nfs-common python3-yaml rpcbind
Suggested packages:
open-iscsi watchdog
The following NEW packages will be installed:
keyutils libevent-core-2.1-7 libnfsidmap1 libyaml-0-2 nfs-common nfs-kernel-server python3-yaml rpcbind
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 872 kB of archives.
After this operation, 3342 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libevent-core-2.1-7 amd64 2.1.12-stable-8 [131 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libnfsidmap1 amd64 1:2.6.2-4 [54.7 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 rpcbind amd64 1.2.6-6+b1 [48.3 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 keyutils amd64 1.6.3-2 [54.5 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 nfs-common amd64 1:2.6.2-4 [260 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 libyaml-0-2 amd64 0.2.5-1 [53.6 kB]
Get:7 http://deb.debian.org/debian bookworm/main amd64 nfs-kernel-server amd64 1:2.6.2-4 [151 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 python3-yaml amd64 6.0-3+b2 [119 kB]
Fetched 872 kB in 0s (5877 kB/s)
Selecting previously unselected package libevent-core-2.1-7:amd64.
(Reading database ... 19147 files and directories currently installed.)
Preparing to unpack .../0-libevent-core-2.1-7_2.1.12-stable-8_amd64.deb ...
Unpacking libevent-core-2.1-7:amd64 (2.1.12-stable-8) ...
Selecting previously unselected package libnfsidmap1:amd64.
Preparing to unpack .../1-libnfsidmap1_1%3a2.6.2-4_amd64.deb ...
Unpacking libnfsidmap1:amd64 (1:2.6.2-4) ...
Selecting previously unselected package rpcbind.
Preparing to unpack .../2-rpcbind_1.2.6-6+b1_amd64.deb ...
Unpacking rpcbind (1.2.6-6+b1) ...
Selecting previously unselected package keyutils.
Preparing to unpack .../3-keyutils_1.6.3-2_amd64.deb ...
Unpacking keyutils (1.6.3-2) ...
Selecting previously unselected package nfs-common.
Preparing to unpack .../4-nfs-common_1%3a2.6.2-4_amd64.deb ...
Unpacking nfs-common (1:2.6.2-4) ...
Selecting previously unselected package libyaml-0-2:amd64.
Preparing to unpack .../5-libyaml-0-2_0.2.5-1_amd64.deb ...
Unpacking libyaml-0-2:amd64 (0.2.5-1) ...
Selecting previously unselected package nfs-kernel-server.
Preparing to unpack .../6-nfs-kernel-server_1%3a2.6.2-4_amd64.deb ...
Unpacking nfs-kernel-server (1:2.6.2-4) ...
Selecting previously unselected package python3-yaml.
Preparing to unpack .../7-python3-yaml_6.0-3+b2_amd64.deb ...
Unpacking python3-yaml (6.0-3+b2) ...
Setting up libnfsidmap1:amd64 (1:2.6.2-4) ...
Setting up libyaml-0-2:amd64 (0.2.5-1) ...
Setting up python3-yaml (6.0-3+b2) ...
Setting up rpcbind (1.2.6-6+b1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service -> /lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket -> /lib/systemd/system/rpcbind.socket.
Setting up libevent-core-2.1-7:amd64 (2.1.12-stable-8) ...
Setting up keyutils (1.6.3-2) ...
Setting up nfs-common (1:2.6.2-4) ...
Creating config file /etc/idmapd.conf with new version
Creating config file /etc/nfs.conf with new version
Adding system user `statd' (UID 104) ...
Adding new user `statd' (UID 104) with group `nogroup' ...
Not creating home directory `/var/lib/nfs'.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target -> /lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target -> /lib/systemd/system/nfs-client.target.
auth-rpcgss-module.service is a disabled or a static unit, not starting it.
nfs-idmapd.service is a disabled or a static unit, not starting it.
nfs-utils.service is a disabled or a static unit, not starting it.
proc-fs-nfsd.mount is a disabled or a static unit, not starting it.
rpc-gssd.service is a disabled or a static unit, not starting it.
rpc-statd-notify.service is a disabled or a static unit, not starting it.
rpc-statd.service is a disabled or a static unit, not starting it.
rpc-svcgssd.service is a disabled or a static unit, not starting it.
rpc_pipefs.target is a disabled or a static unit, not starting it.
var-lib-nfs-rpc_pipefs.mount is a disabled or a static unit, not starting it.
Setting up nfs-kernel-server (1:2.6.2-4) ...
Created symlink /etc/systemd/system/nfs-client.target.wants/nfs-blkmap.service -> /lib/systemd/system/nfs-blkmap.service.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.service -> /lib/systemd/system/nfs-server.service.
nfs-mountd.service is a disabled or a static unit, not starting it.
nfsdcld.service is a disabled or a static unit, not starting it.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
Creating config file /etc/exports with new version
Creating config file /etc/default/nfs-kernel-server with new version
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; preset: enabled)
Active: inactive (dead)
Jun 20 17:16:28 ct-backup systemd[1]: Dependency failed for nfs-server.service - NFS server and services.
Jun 20 17:16:28 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: Dependency failed for nfs-server.service - NFS server and services.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Failed to start nfs-kernel-server, ignoring.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9) ...
root@ct-backup:~#
root@ct-backup:~#
----------------------------------------------------------------------------------------------------------------
root@ct-backup:~# journalctl -xe
-- Support: https://www.debian.org/support
--
-- A start job for unit nfs-idmapd.service has finished with a failure.
--
-- The job identifier is 963 and the job result is dependency.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: Dependency failed for nfsdcld.service - NFSv4 Client Tracking Daemon.
-- Subject: A start job for unit nfsdcld.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit nfsdcld.service has finished with a failure.
--
-- The job identifier is 967 and the job result is dependency.
Jun 20 17:16:30 ct-backup systemd[1]: nfsdcld.service: Job nfsdcld.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup rpc.idmapd[1408]: exiting on signal 15
Jun 20 17:16:30 ct-backup systemd[1]: Stopping nfs-idmapd.service - NFSv4 ID-name mapping service...
-- Subject: A stop job for unit nfs-idmapd.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit nfs-idmapd.service has begun execution.
--
-- The job identifier is 975.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-idmapd.service: Deactivated successfully.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit nfs-idmapd.service has successfully entered the 'dead' state.
Jun 20 17:16:30 ct-backup systemd[1]: Stopped nfs-idmapd.service - NFSv4 ID-name mapping service.
-- Subject: A stop job for unit nfs-idmapd.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit nfs-idmapd.service has finished.
--
-- The job identifier is 975 and the job result is done.
lines 2081-2120/2120 (END)
Best
i have setup a LXC container and unchecked the unprivileged checkbox because I read somewhere that NFS is not working in a unprivilidged container.
I tried everything but I don't get NFS running. I install the server and it says he miss something. I tried debian11, debian12, ubuntu and privilege yes and no but every time it don't looks good.
Someone an idea?
root@ct-backup:~# apt-get install nfs-kernel-server -y
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
keyutils libevent-core-2.1-7 libnfsidmap1 libyaml-0-2 nfs-common python3-yaml rpcbind
Suggested packages:
open-iscsi watchdog
The following NEW packages will be installed:
keyutils libevent-core-2.1-7 libnfsidmap1 libyaml-0-2 nfs-common nfs-kernel-server python3-yaml rpcbind
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 872 kB of archives.
After this operation, 3342 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libevent-core-2.1-7 amd64 2.1.12-stable-8 [131 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libnfsidmap1 amd64 1:2.6.2-4 [54.7 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 rpcbind amd64 1.2.6-6+b1 [48.3 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 keyutils amd64 1.6.3-2 [54.5 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 nfs-common amd64 1:2.6.2-4 [260 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 libyaml-0-2 amd64 0.2.5-1 [53.6 kB]
Get:7 http://deb.debian.org/debian bookworm/main amd64 nfs-kernel-server amd64 1:2.6.2-4 [151 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 python3-yaml amd64 6.0-3+b2 [119 kB]
Fetched 872 kB in 0s (5877 kB/s)
Selecting previously unselected package libevent-core-2.1-7:amd64.
(Reading database ... 19147 files and directories currently installed.)
Preparing to unpack .../0-libevent-core-2.1-7_2.1.12-stable-8_amd64.deb ...
Unpacking libevent-core-2.1-7:amd64 (2.1.12-stable-8) ...
Selecting previously unselected package libnfsidmap1:amd64.
Preparing to unpack .../1-libnfsidmap1_1%3a2.6.2-4_amd64.deb ...
Unpacking libnfsidmap1:amd64 (1:2.6.2-4) ...
Selecting previously unselected package rpcbind.
Preparing to unpack .../2-rpcbind_1.2.6-6+b1_amd64.deb ...
Unpacking rpcbind (1.2.6-6+b1) ...
Selecting previously unselected package keyutils.
Preparing to unpack .../3-keyutils_1.6.3-2_amd64.deb ...
Unpacking keyutils (1.6.3-2) ...
Selecting previously unselected package nfs-common.
Preparing to unpack .../4-nfs-common_1%3a2.6.2-4_amd64.deb ...
Unpacking nfs-common (1:2.6.2-4) ...
Selecting previously unselected package libyaml-0-2:amd64.
Preparing to unpack .../5-libyaml-0-2_0.2.5-1_amd64.deb ...
Unpacking libyaml-0-2:amd64 (0.2.5-1) ...
Selecting previously unselected package nfs-kernel-server.
Preparing to unpack .../6-nfs-kernel-server_1%3a2.6.2-4_amd64.deb ...
Unpacking nfs-kernel-server (1:2.6.2-4) ...
Selecting previously unselected package python3-yaml.
Preparing to unpack .../7-python3-yaml_6.0-3+b2_amd64.deb ...
Unpacking python3-yaml (6.0-3+b2) ...
Setting up libnfsidmap1:amd64 (1:2.6.2-4) ...
Setting up libyaml-0-2:amd64 (0.2.5-1) ...
Setting up python3-yaml (6.0-3+b2) ...
Setting up rpcbind (1.2.6-6+b1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service -> /lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket -> /lib/systemd/system/rpcbind.socket.
Setting up libevent-core-2.1-7:amd64 (2.1.12-stable-8) ...
Setting up keyutils (1.6.3-2) ...
Setting up nfs-common (1:2.6.2-4) ...
Creating config file /etc/idmapd.conf with new version
Creating config file /etc/nfs.conf with new version
Adding system user `statd' (UID 104) ...
Adding new user `statd' (UID 104) with group `nogroup' ...
Not creating home directory `/var/lib/nfs'.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target -> /lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target -> /lib/systemd/system/nfs-client.target.
auth-rpcgss-module.service is a disabled or a static unit, not starting it.
nfs-idmapd.service is a disabled or a static unit, not starting it.
nfs-utils.service is a disabled or a static unit, not starting it.
proc-fs-nfsd.mount is a disabled or a static unit, not starting it.
rpc-gssd.service is a disabled or a static unit, not starting it.
rpc-statd-notify.service is a disabled or a static unit, not starting it.
rpc-statd.service is a disabled or a static unit, not starting it.
rpc-svcgssd.service is a disabled or a static unit, not starting it.
rpc_pipefs.target is a disabled or a static unit, not starting it.
var-lib-nfs-rpc_pipefs.mount is a disabled or a static unit, not starting it.
Setting up nfs-kernel-server (1:2.6.2-4) ...
Created symlink /etc/systemd/system/nfs-client.target.wants/nfs-blkmap.service -> /lib/systemd/system/nfs-blkmap.service.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-server.service -> /lib/systemd/system/nfs-server.service.
nfs-mountd.service is a disabled or a static unit, not starting it.
nfsdcld.service is a disabled or a static unit, not starting it.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
Creating config file /etc/exports with new version
Creating config file /etc/default/nfs-kernel-server with new version
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
invoke-rc.d: initscript nfs-kernel-server, action "start" failed.
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; preset: enabled)
Active: inactive (dead)
Jun 20 17:16:28 ct-backup systemd[1]: Dependency failed for nfs-server.service - NFS server and services.
Jun 20 17:16:28 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: Dependency failed for nfs-server.service - NFS server and services.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Failed to start nfs-kernel-server, ignoring.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9) ...
root@ct-backup:~#
root@ct-backup:~#
----------------------------------------------------------------------------------------------------------------
root@ct-backup:~# journalctl -xe
-- Support: https://www.debian.org/support
--
-- A start job for unit nfs-idmapd.service has finished with a failure.
--
-- The job identifier is 963 and the job result is dependency.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup systemd[1]: Dependency failed for nfsdcld.service - NFSv4 Client Tracking Daemon.
-- Subject: A start job for unit nfsdcld.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit nfsdcld.service has finished with a failure.
--
-- The job identifier is 967 and the job result is dependency.
Jun 20 17:16:30 ct-backup systemd[1]: nfsdcld.service: Job nfsdcld.service/start failed with result 'dependency'.
Jun 20 17:16:30 ct-backup rpc.idmapd[1408]: exiting on signal 15
Jun 20 17:16:30 ct-backup systemd[1]: Stopping nfs-idmapd.service - NFSv4 ID-name mapping service...
-- Subject: A stop job for unit nfs-idmapd.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit nfs-idmapd.service has begun execution.
--
-- The job identifier is 975.
Jun 20 17:16:30 ct-backup systemd[1]: nfs-idmapd.service: Deactivated successfully.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit nfs-idmapd.service has successfully entered the 'dead' state.
Jun 20 17:16:30 ct-backup systemd[1]: Stopped nfs-idmapd.service - NFSv4 ID-name mapping service.
-- Subject: A stop job for unit nfs-idmapd.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit nfs-idmapd.service has finished.
--
-- The job identifier is 975 and the job result is done.
lines 2081-2120/2120 (END)
Best