Bug#757818: partman-lvm: Refuses to reinstall if it find old lvm volume
On Mon, Aug 11, 2014 at 05:39:43PM +0200, Petter Reinholdtsen wrote:
> Package: partman-lvm
> Version: 91
>
> After the parted API change and fixes, I ran into a new problem when
> testing Debian Edu based on Jessie. The installation hang and the log
> report that something is waiting on a prompt. I normally test in a
> virtual machine, and reuse the hard drive every time. After
> <URL: https://bugs.debian.org/757417 > and related bugs were fixed in
> partman, reinstallation hang. These are the last few messages in the
> syslog before the hang:
[...]
> Aug 11 15:01:10 partman-lvm: WARNING: swap signature detected on /dev/vg_system/swap_1. Wipe it? [y/n]
>
> Checking ps show that lvcreate is hanging, with a call looklike like
> this: "lvcreate -l 255 -n swap_1 vg_system" from partman-lvm.
>
> Looking in the partman-lvm source, I find the code in
> <URL:http://sources.debian.net/src/partman-lvm/91/lib/lvm-base.sh/?hl=480#L480>,
> which I suspect is the cause of this hang:
[...]
> log-output -t partman-lvm lvcreate -l "$extents" -n "$lv" $vg
[...]
>
> Could the old behaviour where reinstallation work be reintroduced?
Same problem with xen-tools and fai-setup-storage (CC'ing bugs).
lvm2 2.02.105 introduces --wipesignatures option, so another option
along with --yes missing in wheezy.
https://git.fedorahosted.org/cgit/lvm2.git/tree/WHATS_NEW?id=v2_02_109#n262
man lvcreate says that if not specified, signature wiping is done each
time zeroing is done, and given zeroing is enabled by default, shouldn't
it wipe signatures by default? I didn't test it.
-W, --wipesignatures {y|n}
Controls wiping of detected signatures on newly created Logical Volume.
If this option is not specified, then by default signature wiping is
done each time the zeroing (-Z/--zero) is done. This default behaviour
can be controlled by allocation/wipe_signatures_when_zeroing_new_lvs
setting found in lvm.conf(5).
If blkid wiping is used (allocation/use_blkid_wiping setting in
lvm.conf(5)) and LVM2 is compiled with blkid wiping support, then
blkid(8) library is used to detect the signatures (use blkid -k command
to list the signatures that are recognized). Otherwise, native LVM2
code is used to detect signatures (MD RAID, swap and LUKS signatures are
detected only in this case). Logical Volume is not wiped if the read
only flag is set.
-Z, --zero {y|n}
Controls zeroing of the first 4KiB of data in the new logical volume.
Default is yes.
Volume will not be zeroed if the read only flag is set.
Snapshot volumes are zeroed always.
--
G..e
Reply to: