[PATCH] Deactivate md arrays regardless of state if the device is present. (#496441)

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

 



Instead of only deactivating an array whose state is some variation on
"active", try to deactivate any array that appears to be assembled.
---
 storage/devices.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 44dc878..5a04b79 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2494,7 +2494,10 @@ class MDRaidArrayDevice(StorageDevice):
             self.format.teardown()
             udev_settle(timeout=10)
 
-        if self.status:
+        # We don't really care what the array's state is. If the device
+        # file exists, we want to deactivate it. mdraid has too many
+        # states.
+        if os.path.exists(self.path):
             mdraid.mddeactivate(self.path)
 
         if recursive:
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux