Hello,
i use OMV from version 2 and it's fantastic. Recently I have encuntered a problem with the service NFS.
I am running version 6.5.0-2 and i cannot change any NFS configuration. When i do so, the service nfs-server will not start.
This is the error that OMV gave me:
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color nfs 2>&1' with exit code '1': /usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
NasCube:
----------
ID: configure_default_nfs-common
Function: file.managed
Name: /etc/default/nfs-common
Result: True
Comment: File /etc/default/nfs-common is in the correct state
Started: 11:51:13.314355
Duration: 114.886 ms
Changes:
----------
ID: configure_default_nfs-kernel-server
Function: file.managed
Name: /etc/default/nfs-kernel-server
Result: True
Comment: File /etc/default/nfs-kernel-server is in the correct state
Started: 11:51:13.429433
Duration: 24.623 ms
Changes:
----------
ID: configure_nfsd_exports
Function: file.managed
Name: /etc/exports
Result: True
Comment: File /etc/exports updated
Started: 11:51:13.454247
Duration: 80.799 ms
Changes:
----------
diff:
---
+++
@@ -3,7 +3,6 @@
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
-/export/TempStorage 192.168.1.0/24(fsid=21c1d2be-30ef-4a0d-9705-1a0c4ebd907a,rw,subtree_check,insecure,no_root_squash)
/export/Storage 192.168.1.0/24(fsid=064121a0-1dc6-492e-a749-29e042f283b5,rw,subtree_check,insecure)
/export/Public 192.168.1.0/24(fsid=ce8480a5-6504-47cd-94f3-887d10305478,rw,subtree_check,insecure)
/export/BackupTemp 192.168.1.0/24(fsid=b92cae1e-998a-48a9-b393-ba7f392181b3,rw,subtree_check,insecure)
----------
ID: start_rpc_statd_service
Function: service.running
Name: rpc-statd
Result: True
Comment: The service rpc-statd is already running
Started: 11:51:13.560490
Duration: 53.241 ms
Changes:
----------
ID: start_nfs_server_service
Function: service.running
Name: nfs-server
Result: False
Comment: A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
Started: 11:51:13.752877
Duration: 167.555 ms
Changes:
Summary for NasCube
------------
Succeeded: 4 (changed=1)
Failed: 1
------------
Total states run: 5
Total run time: 441.104 ms
[ERROR ] Command 'systemd-run' failed with return code: 1
[ERROR ] stderr: Running scope as unit: run-r887fae4b66b44a8b85cca6d2d74f2f61.scope
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] retcode: 1
[ERROR ] A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] Command 'systemd-run' failed with return code: 1
[ERROR ] stderr: Running scope as unit: run-r5ccabc5da32c4651b89149e446051374.scope
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] retcode: 1
[ERROR ] A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color nfs 2>&1' with exit code '1': /usr/local/lib/python3.9/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
NasCube:
----------
ID: configure_default_nfs-common
Function: file.managed
Name: /etc/default/nfs-common
Result: True
Comment: File /etc/default/nfs-common is in the correct state
Started: 11:51:13.314355
Duration: 114.886 ms
Changes:
----------
ID: configure_default_nfs-kernel-server
Function: file.managed
Name: /etc/default/nfs-kernel-server
Result: True
Comment: File /etc/default/nfs-kernel-server is in the correct state
Started: 11:51:13.429433
Duration: 24.623 ms
Changes:
----------
ID: configure_nfsd_exports
Function: file.managed
Name: /etc/exports
Result: True
Comment: File /etc/exports updated
Started: 11:51:13.454247
Duration: 80.799 ms
Changes:
----------
diff:
---
+++
@@ -3,7 +3,6 @@
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
-/export/TempStorage 192.168.1.0/24(fsid=21c1d2be-30ef-4a0d-9705-1a0c4ebd907a,rw,subtree_check,insecure,no_root_squash)
/export/Storage 192.168.1.0/24(fsid=064121a0-1dc6-492e-a749-29e042f283b5,rw,subtree_check,insecure)
/export/Public 192.168.1.0/24(fsid=ce8480a5-6504-47cd-94f3-887d10305478,rw,subtree_check,insecure)
/export/BackupTemp 192.168.1.0/24(fsid=b92cae1e-998a-48a9-b393-ba7f392181b3,rw,subtree_check,insecure)
----------
ID: start_rpc_statd_service
Function: service.running
Name: rpc-statd
Result: True
Comment: The service rpc-statd is already running
Started: 11:51:13.560490
Duration: 53.241 ms
Changes:
----------
ID: start_nfs_server_service
Function: service.running
Name: nfs-server
Result: False
Comment: A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
Started: 11:51:13.752877
Duration: 167.555 ms
Changes:
Summary for NasCube
------------
Succeeded: 4 (changed=1)
Failed: 1
------------
Total states run: 5
Total run time: 441.104 ms
[ERROR ] Command 'systemd-run' failed with return code: 1
[ERROR ] stderr: Running scope as unit: run-r887fae4b66b44a8b85cca6d2d74f2f61.scope
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] retcode: 1
[ERROR ] A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] Command 'systemd-run' failed with return code: 1
[ERROR ] stderr: Running scope as unit: run-r5ccabc5da32c4651b89149e446051374.scope
A dependency job for nfs-server.service failed. See 'journalctl -xe' for details.
[ERROR ] retcode: 1
[ERROR ] A dependency job for nfs-server.service failed. See 'journalctl -xe' for details. in /usr/share/php/openmediavault/system/process.inc:220
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(62): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(174): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(619): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatush9...', '/tmp/bgoutput1I...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(195): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}
Alles anzeigen
Then i start digging into the configuration file and found that the service nfs-mountd (/usr/sbin/rpc.mountd) is not starting. The problem seems that the arguments of rpc.mountd that OMV generate into the file /run/sysconfig/nfs-utils are not correct. This is nfs-utils
PIPEFS_MOUNTPOINT=/run/rpc_pipefs
RPCNFSDARGS="--no-nfs-version 2 --nfs-version --nfs-version 3 --nfs-version 4 --nfs-version 4.1 --nfs-version 4.2 8"
RPCMOUNTDARGS="--no-nfs-version 2 --nfs-version 0 --nfs-version 3 --nfs-version 4 --manage-gids"
STATDARGS=""
GSSDARGS=""
RPCSVCGSSDARGS=""
SVCGSSDARGS=""
The service nfs-mountd is trying to start /usr/sbin/rpc.mountd with $RPCMOUNTARGS and /usr/sbin/rpc.mountd can't recognize the option "--nfs-version 0"..
If i remove that from the file the services are working again.
Any advice?
Thx