Le mercredi 09 septembre 2009 à 15:18 +0200, Michael Tautschnig a
écrit :
> [...]
> 
> > 
> > The problem disappear if I copy /usr/share/perl5/Linux/LVM.pm from
> > ubuntu to lenny (use liblinux-lvm-perl_0.13 instead of 0.14)
> > 
> > 
> > Something interesting is :
> > from vgdisplay:
> >     Alloc PE / Size       0 / 0   
> > 
> > and the associated regexp in LVM.pm:
> > m/^Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/
> > 
> > which doesn't match!
> > 
> > With lib 0.13 the is no complain about empty
> > "$vghash{$vgn}->{alloc_pe_size}" but it's not the case with lib 0.14.
> > 
> > I didn't found what's make the difference...
> 
> Maybe the output of LVM tools has changed, seems like it doesn't output units
> with 0 size allocations (0 / 0 won't match (\S+) \/ (\S+) (\S+)); could you 
> file
> a bug report against liblinux-lvm-perl and report this problem?
> 
> Thanks a lot,
> Michael
> 

I will... :)

however, this how I've managed to get it working :

/usr/share/perl5/Linux/LVM.pm Line 242

# Parse the number of allocated physical extents from the volume group.
-   elsif( m/Alloc PE \/ Size\s+(\S+) \/ (\S+) (\S+)/ ) {
+   elsif( m/Alloc PE \/ Size\s+(\S+) \/ (\S+)(?:\s+(\S+))?/ ) {
    $vghash{$vgn}->{alloc_pe} = $1;
    $vghash{$vgn}->{alloc_pe_size} = $2;
-   $vghash{$vgn}->{alloc_pe_size_unit} = $3;
+   $vghash{$vgn}->{alloc_pe_size_unit} = $3 || "B";
     next VGINF; }
-- 
Mathieu Alorent
Shell&Core Sophia-Antipolis
AUSY
Pour France Telecom – OPF/PORTAILS/DOP/HEBEX/SOPHIA

Tél: 04 97 12 6226

[email protected]

La signature de ce mail peut être vérifiée en installant les autorités de 
certifications CAcert suivantes :
http://www.cacert.org/certs/root.crt
http://www.cacert.org/certs/class3.crt

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Antwort per Email an