On Friday February 15, babydr@baby-dragons.com wrote: > Thank you for responding . All I want to do is attempt to > document the possible syntax(s) of the file . Then I'd like > to submit a patch to allow mdctl to create a mdctl.conf from > an existing array . Soemthing like mdctl --detail --scan might be nice, but there are several ways to specify an array. You could tell it which one to use, or it could use them all, and you could then edit the file to remove what you don't like. > What is the "glob"-style based on ? Bash/Regex/... > man 7 glob man 3 glob There is a bit of history there too. > > > 3 ) ARRay Must contain a /dev/md* & May contain these options . > > > ARR /dev/md0 [uuid=whatever] [name=something] > > name=something doesn't work (yet) as superblocks do not contain a > > name. > Ok , What is lacking (other than time;-) to accomplish this > task ? - Refactor the RAID code so that it is not so dependant on the superblock format. - allow detection and handling of multiple different superblock formats. - define a new superblock format that doesn't contain so much redundant information and does contain new stuff like a textual name - teach mdctl to recognise this format and gather devices accordingly. I did a bit of work toward the first step last year, but it has languished. > > > The ways to identify a devices are: > > uuid=whatever > > super-minor=number > > devices=/dev/hda1,/dev/hdb1 > > > The first will assemble from any devices that were found with a RAID > > superblock with the given uuid. > I take it (from below) that this is only if mdctl (at present) > has written those UUID's ? Iirc , UUID's are not attached to a > disk but to a file system . Or is this after a file system has > been created on the array ? No. since raid 0.90 there has be 128bit uuids in the raid superblock. mdctl just uses those. These are different from filesystem uuids. They are a uuid for the raid device. > > >< UUID can be found with "mdctl --examine" > ??? , On a non-mdctl built 0.90.0 array ie: partitions 0xfd . > # mdctl --examine /dev/md0 > mdctl: No super block found on /dev/md0 (Expected magic a92b4efc, got 00000000) > > But : > # mdctl --detail /dev/md0 > ...snip... > UUID : b285b144:ae0b561b:b5b55686:ed216a4c > > What am I missing here ? --examine looks at the superblock on a device so see what array that device is part of. /dev/md0 is not part of an array, so it has no superblock so mdctl findes none. --detail looks at an array to see how it is configured. if /dev/md0 is made of /dev/hda1 and /dev/hda2 then mdctl --detail /dev/md0 and mdctl --detail /dev/hda1 will show similar information. > > > The second will select superblocks based on minor number. If you > > create an array as /dev/md3, then the minor number in the superblock > > will be 3. > This one I am (pretty) sure that mdctl has to write this one . > Or do all of the present tools do this as well ? I don't have > an idle md array to play with to find out . No. Again, raid 0.90 wrote the minor number into the superblock. This is how AUTODETECT knows which md device to assemble an array into. NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html