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

Mantas Mikulėnas grawity at gmail.com
Sun Nov 23 21:48:17 PST 2014


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
---

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141124/6064e3ae/attachment.html>


More information about the systemd-devel mailing list