\n";
if ($stat[2]) {
print " | $text{'lv_name'} | \n";
print "$lv->{'name'} | \n";
print "$text{'lv_size'} | \n";
print "$lv->{'size'} kB | \n";
}
else {
print " | $text{'lv_name'} | \n";
print " | \n";
print "$text{'lv_size'} | \n";
print " kB | \n";
}
print " | $text{'lv_petotal'} | \n";
print "",&text('lv_petotals', $vg->{'pe_alloc'}, $vg->{'pe_total'}),
" | \n";
print "$text{'lv_pesize'} | \n";
print "$vg->{'pe_size'} kB | \n";
if ($in{'lv'}) {
print " | $text{'lv_device'} | \n";
print "$lv->{'device'} | \n";
print "$text{'lv_status'} | \n";
if (!@stat) {
print $text{'lv_notused'};
}
else {
$msg = &device_message(@stat);
print $msg;
}
print " | \n";
}
if ($lv->{'is_snap'}) {
print " | $text{'lv_snapof'} | \n";
if ($in{'lv'}) {
# Show which LV this is a snapshot of
local @snapof = grep { $_->{'size'} == $lv->{'size'} &&
$_->{'has_snap'} } @lvs;
if (@snapof == 1) {
print "$snapof[0]->{'name'}";
}
else {
print "$text{'lv_nosnap'}";
}
}
else {
# Allow selection of snapshot source
print "\n";
}
print " | \n";
}
elsif ($stat[2]) {
# Display current permissons and allocation method
print " | $text{'lv_perm'} | \n";
print "",$text{"lv_perm".$lv->{'perm'}}," | \n";
print "$text{'lv_alloc'} | \n";
print "",$text{"lv_alloc".$lv->{'alloc'}}," | \n";
}
else {
# Allow editing of permissons and allocation method
print " | $text{'lv_perm'} | \n";
printf " %s\n",
$lv->{'perm'} eq 'rw' ? 'checked' : '', $text{'lv_permrw'};
printf " %s | \n",
$lv->{'perm'} eq 'r' ? 'checked' : '', $text{'lv_permr'};
print "$text{'lv_alloc'} | \n";
printf " %s\n",
$lv->{'alloc'} eq 'y' ? 'checked' : '', $text{'lv_allocy'};
printf " %s | \n",
$lv->{'alloc'} eq 'n' ? 'checked' : '', $text{'lv_allocn'};
}
if (!$in{'lv'} && !$lv->{'is_snap'}) {
print " | $text{'lv_stripe'} | \n";
printf " %s\n",
$text{'lv_nostripe'};
print "\n";
print &text('lv_stripes', ""),
" | \n";
}
print " |