| 390 |
# parse the output line by line and call vgdisplay -v <VG> |
# parse the output line by line and call vgdisplay -v <VG> |
| 391 |
foreach my $line (@vgdisplay_print) |
foreach my $line (@vgdisplay_print) |
| 392 |
{ |
{ |
| 393 |
( $line =~ |
( |
| 394 |
/^\s*"(\S+)"\s+\d+\.\d+ MB\s+\[\d+\.\d+ MB\s+used \/ \d+\.\d+ MB\s+free\]$/ |
# example output with an empty vg: |
| 395 |
|
# "my_pv" 267476.00 MB [0 MB used / 267476.00 MB free] |
| 396 |
|
$line =~ |
| 397 |
|
/^\s*"(\S+)"\s+\d+\.\d+ MB\s+\[\d+\.*\d* MB\s+used \/ \d+\.\d+ MB\s+free\]$/ |
| 398 |
) or die "Unexpected vgdisplay output $line"; |
) or die "Unexpected vgdisplay output $line"; |
| 399 |
|
|
| 400 |
# the name of the volume group |
# the name of the volume group |