This commit is contained in:
Jamie Cameron
2012-03-10 11:26:41 -08:00
parent 6466469ebe
commit 279a71de5a

View File

@@ -297,12 +297,15 @@ else {
open(DISPLAY, "lvdisplay -m 2>/dev/null |");
while(<DISPLAY>) {
s/\r|\n//g;
if (/LV\s+Name\s+(.*\/(\S+))/i) {
$lv = { 'name' => $2,
'device' => $1,
if (/LV\s+(Name|Path)\s+(.*\/(\S+))/i) {
$lv = { 'name' => $3,
'device' => $2,
'number' => scalar(@rv) };
push(@rv, $lv);
}
elsif (/LV\s+Name\s+[^\/]/) {
# Ignore this, as we got the name from LV Path line
}
elsif (/VG\s+Name\s+(.*)/) {
$lv->{'vg'} = $1;
}