[klibc] [patch] skip existing md devices

Neil Brown neilb at suse.de
Wed May 10 16:39:32 PDT 2006


On Wednesday May 10, hpa at zytor.com wrote:
> Aaron Griffin wrote:
> > The following patch will ignore already configured md devices in
> > kinit.  The rationale is that, if an md device already exists, it was
> > previously assembled by some other tool (e.g. mdadm) and should remain
> > there.  Currently, kinit removes it and attempts to recreate it, which
> > can cause all sorts of issues, especially in the situation that, the
> > md device is further encrypted and/or is an lvm volume.
> 
> I'm not sure if the existence of a device node in /dev should be sufficient to suppress 
> operation on that md device.  It would probably be better off querying the md device for 
> its state (via the GET_ARRAY_INFO) ioctl and skip it if it is running (or even just 
> assembled?)
> 
> [Neil: do you have any opinion on this?]
> 
> 	-hpa

I don't really know or the background, but based on the above, I would
suggest that if GET_ARRAY_INFO succeeds, and raid_disks > 0, then
leave the array alone.

NeilBrown



More information about the klibc mailing list