[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Don't clear BIOS RAID member disks (#586985)



With the new whole disk support code, we are now putting a fresh disklabel
on any BIOS RAID member disks (and multipath members) when
clearPartType is CLEARPART_TYPE_ALL. This is a rather serious bug, so
this patch should go to f13-branch and rhel6-branch as well.
---
 storage/partitioning.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index c50dd0c..00c1986 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -310,6 +310,10 @@ def shouldClear(device, clearPartType, clearPartDisks=None):
         if clearPartDisks and device.name not in clearPartDisks:
             return False
 
+        # Never clear disks with hidden formats
+        if device.format.hidden:
+            return False
+
         if clearPartType == CLEARPART_TYPE_LINUX and \
            not device.format.linuxNative:
             return False
-- 
1.7.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]