[systemd-devel] Reboot hangs at the very last step

Frank Steiner fsteiner-mail1 at bio.ifi.lmu.de
Tue Jul 19 10:21:58 UTC 2016


Hi Andrei,

thanks for your help!

Andrei Borzenkov wrote

> Well, that rather enforces this; when network filesystem is part of
> system startup it gets extra dependency on network and is unmounted
> before network is stopped; but manual mount does not (or at least did
> not - I believe there were some patches) have this dependency so may be
> delayed.

That seems to explain everything. I have some "no so important" iscsi
FS in fstab with "noauto" because the server should still boot when
they are not available. But if they are, they should be exported
by the nfs-server. So I have a pre-script for the nfs-server trying
to mount all "noauto" FS (not caring if they fail). Thus, some of the 
iscsi FS are mounted manually.

 
> Try to closely look at all units that need network - do all of them have
> proper Before and After to ensure they are stopped before network?

raid2 is the iscsi fs that gets mounted automatically during boot,
raid2-backup is the iscsi fs with the "noauto" option:

mnt-raid2.mount:
----------------
# Automatically generated by systemd-fstab-generator
[Unit]
SourcePath=/etc/fstab
Before=remote-fs.target

[Mount]
What=/dev/mapper/raid2--iscsi-backup--export
Where=/mnt/raid2
Type=xfs
Options=defaults,_netdev,usrquota,prjquota



mnt-raid2\x2dbackup.mount:
--------------------------
# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/etc/fstab

[Mount]
What=/dev/mapper/raid2--iscsi-backup
Where=/mnt/raid2-backup
Type=xfs
Options=defaults,_netdev,noauto,usrquota,prjquota


None of them contains a network dependency, but I guess the 
"Before=remote-fs.target" ensures that raid2 will be unmounted before 
network will shutdown.
Should the mnt-raid2\x2dbackup.mount contain sth. like "After=network.service"?
Maybe it's a missing patch in the quite old version of systemd in SLE 12.

cu,
Frank



-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


More information about the systemd-devel mailing list