Re: [PATCH] Changes for using mdadm for isw_raid_member

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

 



Hans de Goede wrote:

Isn't
"/dev/md/%s" % self.path.split("/")[2]

The same as just "self.path" ?

name=/dev/md/imsm0
self.path=/dev/imsm
Mdadm 3.0 allows to create files with specific name in /dev/md not in /dev


Can't you just do:
-       elif udev_device_is_dmraid(info):
+       elif udev_device_is_dmraid(info) or udev_device_is_mdraid(info):

I've merged these lines

Also we only want to this for disks which are part of an mdraid so that
we do not try to partition them, not for partitions, which your
current udev rule does not seem to handle

In partitioning window I can see container in section "RAID DEVICES", and md array in "HARD Drives". I can partitioning only md array not a container.

I think we should just rename
udev_device_is_dmraid() to udev_device_is_fakeraidset_member(),
that should do the trick nicely, it will cause us to not add the
disks to the devicetree as disks, which is all what we try to accomplish
by adding them as StorageDevice.

In the next step I can merge udev_device_is_dmraid and udev_device_is_mdraid to one function udev_device_is_fakeraidset_member()


@@ -1120,9 +1136,18 @@ class DeviceTree(object):
                 except KeyError:
                     log.debug("mdraid member %s has no md uuid" % name)
             elif format_type == "isw_raid_member":
-                # We dont add any new args because we intend to use the same
-                # block.RaidSet object for all the related devices.
-                pass
+                if  flags.cmdline.has_key("iswmd"):
+                    # mdadm
+                    try:
+                        kwargs["mdUuid"] = udev_device_get_md_uuid(info)
+                        log.debug("mdUuid=%s" % kwargs["mdUuid"])
+                    except KeyError:
+                        log.debug("mdraid member %s has no md uuid" % name)
+                else:
+                    #dmraid
+                    # We dont add any new args because we intend to use the same
+                    # block.RaidSet object for all the related devices.
+                    pass
             elif format_type == "LVM2_member":
                 # lvm
                 try:

This chunk should be dropped, the elif format_type == "isw_raid_member":
is gone from the most recent code.
I've rebased and repatched my code to the latest git and merge this chunk with "linux_raid_member".

Instead we will need a utitlity
function: format_type_is_mdraid(format_type) which replaces the
format_type == linux_raid_member check, this function will
check for the passed in type being linux_raid_member and if the
cmdline arg is given also for it isw_raid_member. I want to have
things like this in functions to:
1) minize the amount of checks for the cmdline parameter
2) make it easy to later switch other fakeraid formats to
    mdraid to (if that will ever happen).
Ok, I'll prepare this function.


<snip>

The rest looks good. Although I'm not all to happy with all the
level=="container" checks, it would be good if you could somehow
generalize that, or atleast hide it in some function somehow.

I'll change this.

Thank you for your comments.
Regards

_______________________________________________
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