Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 481913 Details for
Bug 680226
DeviceTreeError: MD RAID device md127 already in devicetree as md0
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to improve handling of active fwraid during devicetree populate
680226.patch (text/plain), 3.99 KB, created by
David Lehman
on 2011-03-02 17:19:12 UTC
(
hide
)
Description:
Patch to improve handling of active fwraid during devicetree populate
Filename:
MIME Type:
Creator:
David Lehman
Created:
2011-03-02 17:19:12 UTC
Size:
3.99 KB
patch
obsolete
>diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py >index a57e5e1..d281a79 100644 >--- a/pyanaconda/storage/devicetree.py >+++ b/pyanaconda/storage/devicetree.py >@@ -1311,36 +1311,61 @@ class DeviceTree(object): > log.warning("invalid data for %s: %s" % (name, e)) > return > >- # try to name the array based on the preferred minor >- md_info = devicelibs.mdraid.mdexamine(device.path) >- md_path = md_info.get("device", "") >- md_name = devicePathToName(md_info.get("device", "")) >- if md_name: >+ md_name = None >+ minor = None >+ >+ # check the list of devices udev knows about to see if the array >+ # this device belongs to is already active >+ for dev in self.topology.devices_iter(): >+ md_dir = "/sys" + udev_device_get_sysfs_path(dev) + "/md" >+ if not os.path.exists(md_dir): >+ continue >+ > try: >- # md_name can be either md# or md/# >- if md_name.startswith("md/"): >- minor = int(md_name[3:]) # strip off leading "md/" >- md_name = "md%d" % minor # use a regular md# name >- else: >- minor = int(md_name[2:]) # strip off leading "md" >- except (IndexError, ValueError): >- minor = None >- md_name = None >- else: >- array = self.getDeviceByName(md_name) >- if array and array.uuid != md_uuid: >- md_name = None >+ dev_uuid = udev_device_get_md_uuid(dev) >+ dev_level = udev_device_get_md_level(dev) >+ except KeyError: >+ continue >+ >+ if dev_uuid is None or dev_level is None: >+ continue >+ >+ if dev_uuid == md_uuid and dev_level == md_level: >+ md_name = udev_device_get_name(dev) >+ minor = udev_device_get_minor(dev) >+ break > > if not md_name: >- # if we don't have a name yet, find the first unused minor >- minor = 0 >- while True: >- if self.getDeviceByName("md%d" % minor): >- minor += 1 >+ # try to name the array based on the preferred minor >+ md_info = devicelibs.mdraid.mdexamine(device.path) >+ md_path = md_info.get("device", "") >+ md_name = devicePathToName(md_info.get("device", "")) >+ if md_name: >+ try: >+ # md_name can be either md# or md/# >+ if md_name.startswith("md/"): >+ minor = int(md_name[3:]) # strip off leading "md/" >+ md_name = "md%d" % minor # use a regular md# name >+ else: >+ minor = int(md_name[2:]) # strip off leading "md" >+ except (IndexError, ValueError): >+ minor = None >+ md_name = None > else: >- break >+ array = self.getDeviceByName(md_name) >+ if array and array.uuid != md_uuid: >+ md_name = None >+ >+ if not md_name: >+ # if we don't have a name yet, find the first unused minor >+ minor = 0 >+ while True: >+ if self.getDeviceByName("md%d" % minor): >+ minor += 1 >+ else: >+ break > >- md_name = "md%d" % minor >+ md_name = "md%d" % minor > > log.debug("using name %s for md array containing member %s" > % (md_name, device.name))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 680226
:
480825
|
481472
|
481913
|
481914