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

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



On 08/05/2010 05:53 PM, Ales Kozumplik wrote:
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",


Those are both related to 616273. I'll only push them if the reporter verifies they helped.

Ales


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