Error in setup-storage in FAI 4.1
Thomas Neumann
blacky+fai at fluffbunny.de
Fri Jun 13 16:55:37 CEST 2014
On Monday 26 May 2014 11:00:29 Andreas Heinlein wrote:
> Use liblinux-lvm-perl 0.17-1 with a patch from Roland Dieterich applied
> (https://rt.cpan.org/Public/Bug/Display.html?id=94991):
I'm reasonably sure that this is the correct path. In my branch I'm now able
to feed Linux::LVM custom input. Using input generated by LVM v2.02.66 and
v2.02.102 to a Linux::LVM 0.17 with Roland's patch applied yields the same
data structure. (In my branch I have rearranged the code to match the actual
ordering of lines in vgdisplay's output, but this has no influence. I just
checked with 0.17 using Roland's patch and it really results in the same
output.)
Testcase -> https://github.com/ThomasNeumann/setup-storage/blob/setup-storage_tn/t/02_SetupStorage-LVM/10-parse_vgdisplay.t
> Gives the wipefs bug again.
Reaching the wipefs-bug is actually a good thing.
LVM2 v2.02.66
LV Name /dev/vg_backup/backupstore
LVM2 v2.02.102
LV Path /dev/vg_system/root
LV Name root
patched code - Roland's version:
# Parse the logical volume name.
elsif( m/LV Name\s+(\S+)/ ) {
$lvn = $1 unless $lvn;
$vghash{$vgn}->{lvols}->{$lvn}->{name} = $1;
next VGINF; }
# since version 2.02.89 'LV Name' is no longer the full path, 'LV Path' is.
# LV Path may be bogus or missing in some cases, such as thin pools.
if( m/LV Path\s+(\S+)/ ) {
$lvn = $1;
$vghash{$vgn}->{lvols}->{$lvn}->{name} = $1;
next VGINF; }
patched code - my version:
# since version 2.02.89 'LV Name' is no longer the full path, 'LV Path' is.
# LV Path may be bogus or missing in some cases, such as thin pools.
if( m/LV Path\s+(\S+)/ ) {
$lvn = $1;
$vghash{$vgn}->{lvols}->{$lvn}->{name} = $1;
next VGINF; }
# Parse the logical volume name.
elsif( m/LV Name\s+(\S+)/ ) {
$lvn = $1
unless $lvn;
$vghash{$vgn}->{lvols}->{$lvn}->{name} = $1;
next VGINF; }
More information about the linux-fai
mailing list