diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-08 12:56:20 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-08 12:56:20 +0000 |
commit | 1d6487565219482153602db10442b828dba87447 (patch) | |
tree | e1f687e4994ae3b9603f92223c9b45edadf7f4d7 /perl-install/diskdrake | |
parent | 6e595219e3ef527de8a927064b4bfade3493acd9 (diff) | |
download | drakx-1d6487565219482153602db10442b828dba87447.tar drakx-1d6487565219482153602db10442b828dba87447.tar.gz drakx-1d6487565219482153602db10442b828dba87447.tar.bz2 drakx-1d6487565219482153602db10442b828dba87447.tar.xz drakx-1d6487565219482153602db10442b828dba87447.zip |
make Clear_all work on a LVM VG
make Clear_all remove partitions from raids
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index b86c32839..1b62cdc47 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -265,8 +265,17 @@ sub hd_possible_actions_interactive { sub Clear_all { my ($in, $hd, $all_hds) = @_; - isPartOfLVM($_) and RemoveFromLVM($in, $hd, $_, $all_hds) foreach partition_table::get_normal_parts($hd); - partition_table_raw::zero_MBR_and_dirty($hd); + + my @parts = partition_table::get_normal_parts($hd); + foreach (@parts) { + RemoveFromLVM($in, $hd, $_, $all_hds) if isPartOfLVM($_); + RemoveFromRAID($in, $hd, $_, $all_hds) if isPartOfRAID($_); + } + if (isLVM($hd)) { + lvm::lv_delete($hd, $_) foreach @parts + } else { + partition_table_raw::zero_MBR_and_dirty($hd); + } } sub Auto_allocate { |