Sample Header Ad - 728x90

Force NFS server to start after iSCSI targets connected

2 votes
1 answer
1246 views
I have a Ubuntu machine that takes an iSCSI block, mounts it as ext4, then exports it as an NFS share. On boot, NFS fails to start as the iSCSI directory mounts have not loaded yet. "exportfs: Failed to stat /mnt/iscsi/nfs: No such file or directory" This works fine if I run nfs-kernel-server after the server starts. Is there a way to force NFS to wait till the iSCSI block has been mounted? Edit: Further investigation.. By forcing nfs-server.service to wait for mnt-iscsi.mount, I've triggered a dependency loop.
Dec 02 09:16:09 on1 systemd: nfs-server.service: Found ordering cycle on mnt-iscsi.mount/start
Dec 02 09:16:09 on1 systemd: nfs-server.service: Found dependency on remote-fs-pre.target/start
Dec 02 09:16:09 on1 systemd: nfs-server.service: Found dependency on nfs-server.service/start
Dec 02 09:16:09 on1 systemd: nfs-server.service: Unable to break cycle starting with nfs-server.service/start
Am stuck trying to figure out what to change. Thanks!
Asked by Joshua (21 rep)
Dec 1, 2019, 10:51 PM
Last activity: Jul 19, 2023, 09:05 AM