Bug 15664 - "Erase disk" option fails to delete partitions when there's RAID/LVM
Summary: "Erase disk" option fails to delete partitions when there's RAID/LVM
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
: 15705 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-09 14:49 CEST by Thierry Vignaud
Modified: 2016-10-18 13:11 CEST (History)
3 users (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment:


Attachments
try harder to erase disk with RAID/LVM (1.10 KB, patch)
2015-04-13 00:20 CEST, Thierry Vignaud
Details | Diff

Description Thierry Vignaud 2015-04-09 14:49:25 CEST
This is a very old bug: "Erase disk" option in partitionning wizard fails to delete partitions when there's RAID and/or LVM b/c it doesn't destroy them first and thus the kernel complains they're busy

Reproducible: 

Steps to Reproduce:
Thierry Vignaud 2015-04-09 14:49:35 CEST

CC: (none) => pterjan

Comment 1 Thierry Vignaud 2015-04-13 00:20:38 CEST
Created attachment 6250 [details]
try harder to erase disk with RAID/LVM

still fails with "Remove the logical volumes first" because RemoveFromLVM()
calls lvm::vg_destroy() w/o removing the LVs first

If one manually run lvremove, one can go on.


Likewise for RAIDs, it fails to remove partitions belonging to RAID (busty) despite raid::removeDisk() having called mdadm --stop

Running mdadm --zero-superblock on each member is needed...
Comment 2 Thierry Vignaud 2015-04-13 00:21:31 CEST
Running mdadm --remove on the whole array could maybe do the trick too.
Comment 3 Thierry Vignaud 2015-04-13 00:22:13 CEST
We should maybe display warnings asking for confirmation before killing everything though
Comment 4 Thierry Vignaud 2015-04-16 14:45:56 CEST
*** Bug 15705 has been marked as a duplicate of this bug. ***

CC: (none) => alejandro.anv

Comment 5 Thierry Vignaud 2015-04-16 14:48:18 CEST
As note in bug #15705, that also happen when one manually delete a RAID.
We should probably run "mdadm --remove" after "mdadm --stop".
Comment 6 Alejandro Vargas 2015-04-16 14:49:28 CEST
I think you should remove the raid when you remove the last disk on it...
Samuel Verschelde 2015-05-31 22:42:21 CEST

Whiteboard: (none) => FOR_ERRATA

Marja Van Waes 2016-10-09 11:26:45 CEST

CC: (none) => marja11
Assignee: bugsquad => mageiatools

Samuel Verschelde 2016-10-18 13:11:36 CEST

Whiteboard: FOR_ERRATA => (none)


Note You need to log in before you can comment on or make changes to this bug.