[rhel6-branch 1/2] mpath: teardown format from MultipathDevice.teardown()

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

 



Sometimes there's no partition table on the multipath disk, just
filesystem. If we don't call teardown on the device format, such
filesystems will stay mounted.
---
 storage/devices.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 321a746..7ef1160 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3205,6 +3205,14 @@ class MultipathDevice(DMDevice):
         if not self.exists and not recursive:
             raise DeviceError("device has not been created", self.name)
 
+        if self.status:
+            # in case format is not a disklabel but a filesystem
+            if self.originalFormat.exists:
+                self.originalFormat.teardown()
+            if self.format.exists:
+                self.format.teardown()
+            udev_settle()
+
         if self.exists and os.path.exists(self.path):
             #self.teardownPartitions()
             #rc = iutil.execWithRedirect("multipath",
-- 
1.7.1.1

_______________________________________________
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