Show number of mirrors

This commit is contained in:
Jamie Cameron
2022-07-05 13:25:37 -07:00
parent 05f0b11c2f
commit 29c036da6e
4 changed files with 9 additions and 0 deletions

View File

@@ -217,6 +217,10 @@ elsif (!$lv->{'is_snap'}) {
print &ui_table_row($text{'lv_stripesize'},
&nice_size($lv->{'stripesize'}*1024));
}
if ($lv->{'mirrors'}) {
print &ui_table_row($text{'lv_mirror'}, $lv->{'mirrors'});
}
}
if (!$lv->{'is_snap'}) {

View File

@@ -82,6 +82,7 @@ lv_alloc=Allocation method
lv_allocy=Contiguous
lv_allocn=Non-contiguous
lv_stripe=Volume striping
lv_mirror=Number of mirrors
lv_nostripe=Disabled (always allocate from start)
lv_stripes=Stripe across $1 physical volumes
lv_stripes2=Physical volumes to stripe across

View File

@@ -361,6 +361,9 @@ else {
elsif (/Stripes\s+(\d+)/) {
$lv->{'stripes'} = $1;
}
elsif (/Mirrored\s+volumes\s+(\d+)/) {
$lv->{'mirrors'} = $1;
}
elsif (/Stripe\s+size\s+(\S+)\s+(\S+)/) {
$lv->{'stripesize'} = &mult_units($1, $2);
}

View File

@@ -15,6 +15,7 @@ for(my $i=0; defined($cron->{'arg'.$i}); $i++) {
# Force webmin script type to be cron
$main::webmin_script_type = 'cron';
$main::webmin_script_webmincron = $cron->{'module'}."::".$cron->{'func'};
# Require the module, call the function
eval {