[systemd-devel] Hang when mounting NFS via systemd

Wolf Erik Erik.Wolf at neuberger.net
Fri Oct 19 00:17:41 PDT 2012


Wolf Erik wrote:
> Lennart Poettering wrote:
>> On Sun, 23.09.12 17:21, Bardur Arantsson (spam at scientician.net)
>> wrote: 
>> 
>>> Hi all,
>>> 
>>> (Hopefully this list is appropriate for this -- please let me know
>>> if there's a more appropriate one.)
>>> 
>>> I'm having a little trouble with NFS mounts when starting them via
>>> systemd, but I'm hoping that I may have missed something obvious.
>>> 
>>> Here's the snippet from /etc/fstab:
>>> 
>>> 192.168.0.1:/srv/vg0p-data  /data nfs \
>>>    defaults,proto=tcp,nfsvers=4,vers=4,noauto 0 1
>>> 
>>> (Line split here for readability, it's a single line in the actual
>>> file.) 
>>> 
>>> When I run
>>> 
>>>    # systemctl --version
>>>    systemd 189
>>>    arch
>>>    +PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT \
>>>          +LIBCRYPTSETUP +GCRYPT +ACL +XZ
>>> 
>>>    # systemctl start data.mount
>>> 
>>> I get the output
>>> 
>>>    A dependency job failed. See system journal for details.
>>> 
>>> after a longish timeout (guessing it's the default 90s). In the
>>> journal I get: 
>>> 
>>> Sep 23 17:08:45 gwendolyn systemd[1]: Job
>>> 192.168.0.1:-srv-vg0p\x2ddata.device/start timed out.
>>> Sep 23 17:08:45 gwendolyn systemd[1]: Job data.mount/start failed
>>> with result 'dependency'.
>> 
>> This indicates a bug i systemd actually. For some reason systemd
>> appears to believe that your NFS share is a device to wait for.
>> 
>> I tried to fix this in git with two commits. Please test!
> 
> Hi,
> 
> I got probably a similar problem to this one.
> 
> I have a mount unit which will mount my home device if my system boot
> from NAND. 
> 
> [Unit]
> Description=Mount Home Directory
> Requires=check-data.service
> Before=local-fs.target
> ConditionKernelCommandLine=root=ubi0:root
> DefaultDependencies=false
> 
> [Mount]
> What=/dev/ubi1_0
> Where=/home
> Type=ubifs
> Options=defaults
> 
> If I start from NAND I've got the accordingly device "dev/ubi1_0" -
> but if I start from NFS, the device isn't available. 
> But systemd creates the dependencies between home.mount and
> dev-ubi1_0.device whether if I boot from NAND or NFS and therefore
> the system boot fails in case of boot from NFS.  
> 
> [ TIME ] Timed out waiting for device dev-ubi1_0.device.
> [DEPEND] Dependency failed for Mount Home Directory.
> 
> I've tried to disable this cause with
> ConditionKernelCommandLine=root=ubi0:root and
> DefaultDependencies=false --> No improvment. Also disabling the mount
> unit isn't the solution.   
> 
> Is there a possibility to disable the dependencies or is this the
> problem at all? 

The Problem is in systemd-194 still available.

> 
>> 
>> Lennart
> 
> 
> 
> Mit freundlichen Grüßen
> 
> i.A. Erik Wolf
> Hardwareentwicklung
> 
> Neuberger Gebäudeautomation GmbH
> Oberer Kaiserweg 6
> 91541 Rothenburg o.d.T.
> 
> Telefon:  +49 9861 402-542
> Telefax:  +49 9861 402-533
> E-Mail:   erik.wolf at neuberger.net
> Internet: www.neuberger.net
> 
> Handelsregister: AG Ansbach HRB 4933
> Sitz: Rothenburg ob der Tauber
> Geschäftsführer: Klaus Lenkner
> Ust.IdNr. DE 271 188 426
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel



Mit freundlichen Grüßen

i.A. Erik Wolf
Hardwareentwicklung

Neuberger Gebäudeautomation GmbH
Oberer Kaiserweg 6
91541 Rothenburg o.d.T.

Telefon:  +49 9861 402-542
Telefax:  +49 9861 402-533
E-Mail:   erik.wolf at neuberger.net
Internet: www.neuberger.net

Handelsregister: AG Ansbach HRB 4933
Sitz: Rothenburg ob der Tauber
Geschäftsführer: Klaus Lenkner
Ust.IdNr. DE 271 188 426


More information about the systemd-devel mailing list