>>> Michael Chapman <mike@xxxxxxxxxxxxxxxxx> schrieb am 27.08.2019 um 11:33 in Nachricht <alpine.LFD.2.21.1908271916080.3409@xxxxxxxxxx>: > On Tue, 27 Aug 2019, Tony Rodriguez wrote: >> Managed to detect/mount iscsi devices without using _netdev keyword in >> /etc/fstab. Made changes within src/fstab‑generator/ftstab‑generator.c and it >> seems to work. The only problem is during shutdown/reboot, my iscsi xfs >> filesystem does not unmount cleanly before the network/iscs service/system > is >> shutdown. When this happens I receive a xfs error/warning. >> >> However this doesn't happen when _netdev is specified in /etc/fstab for my >> iscsi device. Seems _netdev handles management of mounts/unmounts before >> killing things off. How exactly does _netdev manage unmounting filesystems >> during a shutdown/reboot? > > One of the "default dependencies" for a mount unit that systemd thinks is > a network filesystem is After=network.target. During shutdown, this > ensures the filesystem is unmounted before networking is brought down: > > > https://github.com/systemd/systemd/blob/fef40ceb5dfbb76d4733e579846a380a224ef > d55/src/core/mount.c#L455‑L482 > > If you're not using the _netdev keyword, and systemd does not otherwise > think this is a remote filesystem, you will need to add this dependency > manually. You'll probably also want: > > Wants=network‑online.target > After=network‑online.target I wonder: Shouldn't that be remote-fs-pre.target? For example if the NFS client starts AFTER the network target is done, the remote filesystem will start concurrently. In most cases it may work well, but in general it won't. > > to match the code linked above. > [...] Regards, Ulrich _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel