From 1d6487565219482153602db10442b828dba87447 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 8 Jul 2002 12:56:20 +0000 Subject: make Clear_all work on a LVM VG make Clear_all remove partitions from raids --- perl-install/diskdrake/interactive.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'perl-install/diskdrake') 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 { -- cgit v1.2.1