summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-08 12:56:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-08 12:56:20 +0000
commit1d6487565219482153602db10442b828dba87447 (patch)
treee1f687e4994ae3b9603f92223c9b45edadf7f4d7
parent6e595219e3ef527de8a927064b4bfade3493acd9 (diff)
downloaddrakx-backup-do-not-use-1d6487565219482153602db10442b828dba87447.tar
drakx-backup-do-not-use-1d6487565219482153602db10442b828dba87447.tar.gz
drakx-backup-do-not-use-1d6487565219482153602db10442b828dba87447.tar.bz2
drakx-backup-do-not-use-1d6487565219482153602db10442b828dba87447.tar.xz
drakx-backup-do-not-use-1d6487565219482153602db10442b828dba87447.zip
make Clear_all work on a LVM VG
make Clear_all remove partitions from raids
-rw-r--r--perl-install/diskdrake/interactive.pm13
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 {