Re: [rhel6-branch] mpath: do not deactivate mpath partitions in teardown().

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

 



On Tue, 24 Aug 2010, Ales Kozumplik wrote:

This should be a part of 5c83bbf01800ca86d1c8e4cd95d14480165b344c that
does the same thing for mpath devices.

Related: rhbz#624175
---
storage/devices.py |   23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 82a46f8..dfe6371 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1402,17 +1402,24 @@ class PartitionDevice(StorageDevice):
                self.originalFormat.teardown()
            if self.format.exists:
                self.format.teardown()
-            if self.parents[0].type == 'dm-multipath':
-                devmap = block.getMap(major=self.major, minor=self.minor)
-                if devmap:
-                    try:
-                        block.removeDeviceMap(devmap)
-                    except Exception as e:
-                        raise DeviceTeardownError("failed to tear down device-mapper partition %s: %s" % (self.name, e))
-                udev_settle()

        StorageDevice.teardown(self, recursive=recursive)

+    def deactivate(self):
+        """
+        This is never called. For instructional purposes only.
+
+        We do not want multipath partitions disappearing upon their teardown().
+        """
+        if self.parents[0].type == 'dm-multipath':
+            devmap = block.getMap(major=self.major, minor=self.minor)
+            if devmap:
+                try:
+                    block.removeDeviceMap(devmap)
+                except Exception as e:
+                    raise DeviceTeardownError("failed to tear down device-mapper partition %s: %s" % (self.name, e))
+            udev_settle()
+
    def _getSize(self):
        """ Get the device's size. """
        size = self._size


Ack.

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
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