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

Colin Guthrie gmane at colin.guthr.ie
Wed Jul 20 09:20:09 UTC 2016


Andrei Borzenkov wrote on 19/07/16 17:30:
> 19.07.2016 13:21, Frank Steiner пишет:
>> 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.
> 
> No.
> 
>> Should the mnt-raid2\x2dbackup.mount contain sth. like "After=network.service"?
> 
> Many dependencies are added implicitly and are not present in unit
> definition. Please show output of
> 
> systemctl show -p Before -p After mnt-raid2.mount
> systemctl show -p Before -p After mnt-raid2\\x2dbackup.mount
> 
> at runtime.
> 
>> Maybe it's a missing patch in the quite old version of systemd in SLE 12.
>>
> 
> I remember these problems were reported to (open)SUSE bugzilla and it
> may have some workarounds. SLES systemd is heavily patched.

Is it enough to just add the "_netdev" option to the fstab mounts in
question? I'd have thought that if this is present in the options then
the relevent deps should be added automatically. Could be wrong tho'.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org


More information about the systemd-devel mailing list