[systemd-devel] serialization bug, swap bug, etc.

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Nov 24 07:57:32 PST 2014


On Mon, Nov 24, 2014 at 07:48:17AM +0200, Mantas Mikulėnas wrote:
> On Mon, Nov 24, 2014 at 2:59 AM, Zbigniew Jędrzejewski-Szmek <
> zbyszek at in.waw.pl> wrote:
> > On Thu, Nov 20, 2014 at 09:13:02AM +0200, Mantas Mikulėnas wrote:
> > > ~ If there are two .swap units for the same partition (one made by
> > > fstab-generator, another by gpt-generator), systemd tries to swapon it
> > > twice, resulting in "swapon failed: Device or resource busy".
> > IIUC, the problem is that swapons are called concurently, and one fails.
> > If they were started sequentially, systemd would notice that they both
> > refer to the same device and make one of the follow the other. What
> > I'm guessing happens is that initially the units use different device
> > names, so they are not merged. Could you post both units (systemctl cat
> > would probably be best), so we can see what is going wrong?
> 
> Right, after all, since .swap unit names directly depend on device names,
> then it's pretty much guaranteed that the latter will differ...
> 
> What I have is:
> 
> ---
> # /run/systemd/generator/dev-disk-by\x2dpartlabel-swap.swap
> # Automatically generated by systemd-fstab-generator
> 
> [Unit]
> SourcePath=/etc/fstab
> Documentation=man:fstab(5) man:systemd-fstab-generator(8)
> 
> [Swap]
> What=/dev/disk/by-partlabel/swap
> Options=rw
> ---
> 
> ---
> # /run/systemd/generator.late/dev-sda7.swap
> # Automatically generated by systemd-gpt-auto-generator
> 
> [Unit]
> Description=Swap Partition
> Documentation=man:systemd-gpt-auto-generator(8)
> 
> [Swap]
> What=/dev/sda7
> ---
And what does 'udevadm info /dev/sda7' and 'systemctl show dev-sda7.swap' and
the same for dev-disk-by\x2dpartlabel-swap.swap?

Zbyszek


More information about the systemd-devel mailing list