[systemd-devel] confusing output with a swap device missing

Colin Guthrie gmane at colin.guthr.ie
Tue May 29 12:58:25 PDT 2012


'Twas brillig, and Zbigniew Jędrzejewski-Szmek at 23/05/12 15:36 did
gyre and gimble:
> Hi,
> 
> I booted a system after (inadvertently) changing the UUID of a swap
> device. This causes the .swap unit to time-out, and since swap.target
> wants the .swap unit, this makes the whole boot very slow.
> 
> Unfortunately, understanding what is the cause of the timeout is not
> trivial, unless one knows what to look for.
> 
> $ journalctl -a |grep Startup
> May 23 15:44:31 fedora-15 systemd[1]: Startup finished in 740ms 270us (kernel) + 1s 934ms 75us (initrd) + 1min 33s 387ms 780us (userspace) = 1min 36s 62ms 125us.
> 
> $  systemd-analyze blame
>   2746ms network.service
>    355ms udev-settle.service
> ...
> 
> (nothing here)
> 
> $  systemctl status swap.target 
> swap.target - Swap
> 	  Loaded: loaded (/usr/lib/systemd/system/swap.target; static)
> 	  Active: active since Wed, 23 May 2012 15:44:28 +0200; 34min ago
> 
> (Completely misleading -- no swap devices were activated...)
> 
> $  systemctl --failed
> ...
> (nothing interesting here)
> 
> $ systemctl --failed --all
> ...
> (nothing interesting here)
> 
> $ systemd-analyze plot
> Here one can see that swap.target is the first thing which is active a long delay.
> 
> $ systemctl show swap.target
> ...
> Wants=dev-disk-by\x2duuid-xxxxxx.swap
> 
> $ systemctl status dev-disk-by\x2duuid-xxxxxx.swap
> ...
> Active: inactive (dead)
> 
> (OK, now it becomes obvious... but such information should be more visible.)
> 
> $ journalctl
> ...
> May 23 15:42:59 fedora-15 systemd-tmpfile[519]: Successfully loaded SELinux database in 21ms 628us, size on heap is 536K.
> May 23 15:44:28 fedora-15 systemd[1]: Job dev-disk-by\x2duuid-xxxxxx.device/start timed out.
> May 23 15:44:28 fedora-15 systemd[1]: Job dev-disk-by\x2duuid-xxxxxx.swap/start failed with result 'dependency'.
> May 23 15:44:28 fedora-15 systemd[1]: Job dev-disk-by\x2duuid-xxxxxx.device/start failed with result 'timeout'.
> 
> It would be really nice if this information which is buried in the logs
> could be displayed more prominently when one uses other diagnostic tools.
> 
> Zbyszek

Yup, this can sometimes get pretty hidden.

I've also seen some strange situations where some swap units are active
but others are failed when they are, in actual fact, just aliases for
each other (e.g. one unit is by-uuid and another is the traditional
/dev/sda2 name...)

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