FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 08-24-2010, 04:32 PM
Ales Kozumplik
 
Default mpath: do not deactivate mpath partitions in teardown().

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
--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-24-2010, 04:47 PM
David Cantrell
 
Default mpath: do not deactivate mpath partitions in teardown().

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@redhat.com>
Red Hat / Honolulu, HI

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

Thread Tools




All times are GMT. The time now is 05:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org