1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: vgdisplay prints no units with 0 size allocations
Origin: https://lists.uni-koeln.de/pipermail/linux-fai/2009-September/007285.html
Bug-Debian: https://bugs.debian.org/551083
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=96770
Author: Mathieu Alorent <malorent at echo.fr>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-02-11
Bug: https://rt.cpan.org/Ticket/Display.html?id=96770
--- a/LVM.pm
+++ b/LVM.pm
@@ -270,10 +270,10 @@
next VGINF; }
# 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; }
# Parse the volume group name.
|