The code to parse the output from vos listvol didn't work properly
in the presence of read-only or backup volumes on the partition.
my ($volume, %results);
local $_;
while (<LVOL>) {
- if (/^(\S+)\s+\d+ RW\s+(\d+) K\s+On-line\s*$/) {
+ if (/^(\S+)\s+\d+ (RW|RO|BK)\s+(\d+) K\s+On-line\s*$/) {
$volume = $1;
- $results{$volume}{size} = $2;
+ $results{$volume}{size} = $3;
} elsif (/^\s+MaxQuota\s+(\d+) K\s*$/) {
$results{$volume}{quota} = $1 if defined $volume;
}