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 > Redhat > Enterprise Watch List

 
 
LinkBack Thread Tools
 
Old 07-24-2012, 07:02 PM
 
Default mdraid DDF container support

Greetings,

I've been working on a feature to add DDF container support using mdraid to Anaconda. It should be building on the work done to support IMSM containers using mdraid instead of dmraid. I've been hoping to have a patch ready already, but I'm running into some problems related to differences in how metadata for the two container formats is exposed. This is also the first time I've worked on Anaconda so am still familiarizing myself with the codebase. For IMSM, Anaconda has a udev rule that gets a value for MD_DEVICES:
ENV{ID_FS_TYPE}=="isw_raid_member", IMPORT{program}="$env{ANACBIN}/mdadm --examine --export $tempnode"

Alas, for DDF, the same rule doesn't get a value for MD_DEVICES. One can get this information for DDF by first doing "mdadm -A -e ddf --scan". Subsequently, "mdadm --detail --export /dev/md127" will give MD_DEVICES. However, it seems to me to be a poor practice to assemble any arrays in 70-anaconda.rules. Besides, while testing, Anaconda seems not to like this in there anyway:
ENV{ID_FS_TYPE}=="ddf_raid_member", RUN+="$env{ANACBIN}/mdadm -A -e ddf --scan"
KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="$env{ANACBIN}/mdadm --detail --export $tempnode"
It interferes with Anaconda accessing the array with mdadm, causing Anaconda to hang indefinitely.

Might anyone with more Anaconda development experience have suggestions for where to try collecting this one piece of information?

--Jared

--
Jared Dominguez
Linux Engineering
Dell | Enterprise Product Group



_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 07-24-2012, 08:02 PM
David Lehman
 
Default mdraid DDF container support

On Tue, 2012-07-24 at 14:02 -0500, Jared_Dominguez@dell.com wrote:
> Greetings,
>
> I've been working on a feature to add DDF container support using mdraid to Anaconda. It should be building on the work done to support IMSM containers using mdraid instead of dmraid. I've been hoping to have a patch ready already, but I'm running into some problems related to differences in how metadata for the two container formats is exposed. This is also the first time I've worked on Anaconda so am still familiarizing myself with the codebase. For IMSM, Anaconda has a udev rule that gets a value for MD_DEVICES:
> ENV{ID_FS_TYPE}=="isw_raid_member", IMPORT{program}="$env{ANACBIN}/mdadm --examine --export $tempnode"
>
> Alas, for DDF, the same rule doesn't get a value for MD_DEVICES. One can get this information for DDF by first doing "mdadm -A -e ddf --scan". Subsequently, "mdadm --detail --export /dev/md127" will give MD_DEVICES. However, it seems to me to be a poor practice to assemble any arrays in 70-anaconda.rules. Besides, while testing, Anaconda seems not to like this in there anyway:
> ENV{ID_FS_TYPE}=="ddf_raid_member", RUN+="$env{ANACBIN}/mdadm -A -e ddf --scan"
> KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="$env{ANACBIN}/mdadm --detail --export $tempnode"
> It interferes with Anaconda accessing the array with mdadm, causing Anaconda to hang indefinitely.
>
> Might anyone with more Anaconda development experience have suggestions for where to try collecting this one piece of information?

Short answer:
Take a look at the function mdexamine in
pyanaconda/storage/devicelibs/mdraid.py.

Longer answer:
I haven't read the DDF spec, but it sounds like there is no way to
determine the number of component devices without first
assembling/activating the array. If this is not the case, file a bug
against mdadm to fix the output of 'mdadm --examine --export'.

If it is the case that one can never know the number of members of a DDF
array without first assembling the array, you'll need to add special
code to anaconda to accommodate setting up an array without knowing the
number of member devices. Some of the areas you'll need to work to do
that are

pyanaconda/storage/devicetree.pyeviceTree.addUdevDiskDevice
pyanaconda/storage/devicetree.pyeviceTree.handleUdevMDMemberFormat
pyanaconda/storage/devices.py:MDRaidArrayDevice
pyanaconda/storage/devicelibs/mdraid.py

Good luck.

David

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 07-25-2012, 05:03 PM
 
Default mdraid DDF container support

> > Might anyone with more Anaconda development experience have
> suggestions for where to try collecting this one piece of information?
>
> Short answer:
> Take a look at the function mdexamine in
> pyanaconda/storage/devicelibs/mdraid.py.
>
> Longer answer:
> I haven't read the DDF spec, but it sounds like there is no way to
> determine the number of component devices without first
> assembling/activating the array. If this is not the case, file a bug
> against mdadm to fix the output of 'mdadm --examine --export'.
>
> If it is the case that one can never know the number of members of a DDF
> array without first assembling the array, you'll need to add special
> code to anaconda to accommodate setting up an array without knowing the
> number of member devices. Some of the areas you'll need to work to do
> that are
>
> pyanaconda/storage/devicetree.pyeviceTree.addUdevDiskDevice
> pyanaconda/storage/devicetree.pyeviceTree.handleUdevMDMemberFor
> mat
> pyanaconda/storage/devices.py:MDRaidArrayDevice
> pyanaconda/storage/devicelibs/mdraid.py
>
> Good luck.
>
> David

Thank you, David. When I glanced at the DDF spec, it seemed to me that mdadm should be able to pass this information on before assembling. I've been reading through the files in pyanaconda/storage quite a bit, especially devicetree.py and devices.py, and considered doing some special casing in devicelibs/mdraid.py. I wasn't confident on that being the best path. However, I just looked in super-ddf.c in the mdadm source, and both detail_super_ddf() and brief_detail_super() have big "FIXME"s, so I think I'll need to patch that up first.

--Jared

_______________________________________________
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 02:47 PM.

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