Hi Eric, Eric Engstrom wrote: > xen-create-image will hang on lvcreate call when creating a swap lv. > This occurs whenever the extents that the lv would use were previously > used for a swap partion, therefore a swap signature is found. > lvcreate hangs looking for user input which will never come.
Huh, that's new! > root@xavier:/etc/xen# lvcreate vg0 -L 2gb -n foobar > Logical volume "foobar" created > root@xavier:/etc/xen# mkswap /dev/vg0/foobar > Setting up swapspace version 1, size = 2097148 KiB > no label, UUID=6d95f27f-6e57-41c9-91d3-cfbd167e11d4 > root@xavier:/etc/xen# lvremove /dev/vg0/foobar > root@xavier:/etc/xen# lvcreate vg0 -L 2gb -n foobar > WARNING: swap signature detected on /dev/vg0/foobar. Wipe it? [y/n] Now that's a very strange and unexpected behaviour of LVM. I consider this being a severe misfeature in LVM. > Can be fixed by adding --yes argument to lvcreate, as in: > > root@xavier:/etc/xen# lvcreate vg0 -L 2gb --yes -n foobar > Wiping swap signature on /dev/vg0/foobar. > Logical volume "foobar" created > > I do not think this is an LVM issue, though I wonder why one would > bother checking the signature of the filesystem that was there before. ... especially if it's on a LV that has been recreated. > I did not find a relevant xen-tools bug, but I did note an FAI bug that > is effectively identical: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750212 Thanks for the reference. > Trivial patch attached, though I don't know of other ramifications from > __always__ using --yes on lvcreate. Eric Engstrom wrote: > I should have noted that the patch will only work on jessie or newer, or > at least with a version of LVM that includes the --yes option, which > wheezy does NOT have - at least not the installation I have handy at the > moment. Which makes the patch way less trivial. No idea at the moment how to fix that so it works with both LVM versions. :-( So for the Debian package for Jessie that would be a workaround, but not for upstream... And since I'm upstream, too, I definitely prefer to solve it independent of the LVM version. Regards, Axel -- ,''`. | Axel Beckert <[email protected]>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

