diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-07-01 07:30:01 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-07-01 07:30:01 +0000 |
commit | 53b773a3fdaf347b007f8430ba29489f5ac2c756 (patch) | |
tree | 0b34a086e035425ddc1dbafc774d1d085cfd02b8 /perl-install/lvm.pm | |
parent | 9a0018962f56eb5cbe04c1b892f9bd13c860fbb3 (diff) | |
download | drakx-53b773a3fdaf347b007f8430ba29489f5ac2c756.tar drakx-53b773a3fdaf347b007f8430ba29489f5ac2c756.tar.gz drakx-53b773a3fdaf347b007f8430ba29489f5ac2c756.tar.bz2 drakx-53b773a3fdaf347b007f8430ba29489f5ac2c756.tar.xz drakx-53b773a3fdaf347b007f8430ba29489f5ac2c756.zip |
create lvm::pv_physical_extents() and use it
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r-- | perl-install/lvm.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 9a68877af..d3a83a186 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -68,7 +68,10 @@ sub get_pv_field { my $dev = expand_symlinks(devices::make($pv->{device})); run_program::get_stdout('lvm2', 'pvs', '--noheadings', '--nosuffix', '-o', $field, $dev); } - +sub pv_physical_extents { + my ($pv) = @_; + split(' ', lvm::get_pv_field($pv, 'pv_pe_alloc_count,pv_pe_count')) +} sub pv_to_vg { my ($pv) = @_; get_pv_field($pv, 'vg_name') =~ /(\S+)/ && $1; |