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 > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-04-2011, 05:45 PM
David Lehman
 
Default Handle md name-mangling based on hostname/homehost WRT exclusiveDisks.

If, when assembling an array, the hostname does not match the hostname
in the array metadata mdadm will append an underscore and some number
of digits to the array name. This makes it impossible to identify such
arrays based on their metadata with 100% accuracy.

Related: rhbz#681608
---
pyanaconda/storage/devicetree.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 46394d5..ca46a8d 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -543,8 +543,13 @@ class DeviceTree(object):
udev_device_is_md(info) and
udev_device_get_md_name(info):
md_name = udev_device_get_md_name(info)
+ # mdadm may have appended _<digit>+ if the current hostname
+ # does not match the one in the array metadata
+ alt_name = re.sub("_d+$", "", md_name)
+ raw_pattern = "isw_[a-z]*_%s"
for i in range(0, len(self.exclusiveDisks)):
- if re.match("isw_[a-z]*_%s" % md_name, self.exclusiveDisks[i]):
+ if re.match(raw_pattern % md_name, self.exclusiveDisks[i]) or
+ re.match(raw_pattern % alt_name, self.exclusiveDisks[i]):
self.exclusiveDisks[i] = name
return False

--
1.7.3.5

_______________________________________________
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 04:28 AM.

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