From 279ee686301222fd40cc71f0129b3949c9f6367e Mon Sep 17 00:00:00 2001 From: "Thierry.Vignaud" Date: Wed, 28 May 2014 22:37:24 +0200 Subject: podify++ fs::dmraid --- perl-install/fs/dmraid.pm | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/perl-install/fs/dmraid.pm b/perl-install/fs/dmraid.pm index 109126872..ee1674ffc 100644 --- a/perl-install/fs/dmraid.pm +++ b/perl-install/fs/dmraid.pm @@ -39,12 +39,24 @@ sub init() { 1; } -#- call_dmraid is overloaded when debugging, see the end of this file +=item call_dmraid($option, @args) + +Runs dmraid with $option & @args. +It is overloaded when debugging, see the end of this file. + +=cut + sub call_dmraid { my ($option, @args) = @_; run_program::get_stdout('dmraid', $option, @args); } +=item check($in) + +Ensures dmraid is installed. If yes, calls init(). + +=cut + sub check { my ($in) = @_; @@ -53,8 +65,13 @@ sub check { 1; } +=item _raid_devices_raw() + +Get the real VG names, needed for ddf1, and safer than begins_with for raid10 + +=cut + sub _raid_devices_raw() { - # get the real vg names, needed for ddf1, and safer than begins_with for raid10 log::l("_raid_devices_raw"); my %vgs; my %pv2vg = map { @@ -124,6 +141,12 @@ sub _sets() { @sets; } +=item vgs() + +Returns the list of VGs corresponding to dmraid + +=cut + sub vgs() { map { my $dev = "mapper/$_->{name}"; -- cgit v1.2.1