Still Need Help on mdadm and udev
Okay,
PLEASE somebody who knows answer the following:
1) what is the difference between running
mdadm -A -ayes 1/dev/md1--uuid=xxxxx /dev/sd*
and
mdadm -A -amd 1/dev/md1 --uuid=xxxxx /dev/sd*
In other words, how do the "yes" and "md" options behave differently.2) If you create an array /dev/md0 with mdadm, is there any reason why you shouldn't start it as /dev/md1?
The second option above (-amd 1) would NOT start an array that was created as /dev/md0 (under an older mdadm -- 1.8.? ) whereas the first option (-ayes /dev/md1) had no difficulty.
Thank you.
Andy Liebman
Quoted 19 lines
Okay,
PLEASE somebody who knows answer the following:
1) what is the difference between running
mdadm -A -ayes 1/dev/md1--uuid=xxxxx /dev/sd* and mdadm -A -amd 1/dev/md1 --uuid=xxxxx /dev/sd* In other words, how do the "yes" and "md" options behave differently.2) If you create an array
/dev/md0with mdadm, is there any reason why you shouldn't start it as/dev/md1?
Quoted 8 lines
The second option above (-amd 1) would NOT start an array that was created as
/dev/md0(under an older mdadm -- 1.8.? ) whereas the first option (-ayes/dev/md1) had no difficulty.Thank you.
Andy Liebman
Sorry, my bad:
I meant to give as my examples:
mdadm -A -amd 1 --uuid=xxxxx /dev/sd*
and
mdadm -A -ayes /dev/md1 --uuid=xxxxx /dev/sd*
Andy
Quoted 8 lines · On Wednesday November 9, [email protected] wrote:
Quoted 8 lines
Okay,
PLEASE somebody who knows answer the following:
1) what is the difference between running
mdadm -A -ayes 1/dev/md1--uuid=xxxxx /dev/sd*
Quoted 7 lines
Quoted 7 lines
and
mdadm -A -amd 1/dev/md1 --uuid=xxxxx
/dev/sd*In other words, how do the "yes" and "md" options behave differently.
From 'man mdadm'
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocat- ing an unused minor number. "md" causes a non-partitionable array to be used. "mdp", "part" or "p" causes a partitionable array (2.6 and later) to be used. "yes" requires the named md device to have a from this. See DEVICE NAMES below.
Hmmm. there is some text missing there. It should read:
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocating an unused minor number. "md" causes a non-partition- able array to be used. "mdp", "part" or "p" causes a partition- able array (2.6 and later) to be used. "yes" requires the named md device to have a 'standard' format, and the type and minor number will be determined from this. See DEVICE NAMES below.
(typo in the mdadm.8 source file).
Does that help?
Quoted 4 lines
Quoted 4 lines
2) If you create an array
/dev/md0with mdadm, is there any reason why you shouldn't start it as/dev/md1?
No technical reason. This works perfectly.
Quoted 10 lines
Quoted 9 lines
The second option above (-amd 1) would NOT start an array that was created as
/dev/md0(under an older mdadm -- 1.8.? ) whereas the first option (-ayes/dev/md1) had no difficulty.Thank you.
Andy Liebman
Quoted 5 lines
Sorry, my bad:
I meant to give as my examples:
mdadm -A -amd 1 --uuid=xxxxx /dev/sd*
This is wrong. It will create a device files called '1' in the current directory (assuming it works at all).
Quoted 4 lines
and
mdadm -A -ayes /dev/md1 --uuid=xxxxx /dev/sd*Given that /dev/md1 is a 'standard' format name, this will have the same effect as "-amd /dev/md1". You only get the difference when you want to use a name like "/dev/md/home" or "/dev/swap", in which case, "-ayes" isn't allowed as mdadm cannot differentiate between partitioned and not.
NeilBrown
Quoted 19 lines · Neil Brown
From 'man mdadm'
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocat- ing an unused minor number. "md" causes a non-partitionable array to be used. "mdp", "part" or "p" causes a partitionable array (2.6 and later) to be used. "yes" requires the named md device to have a from this. See DEVICE NAMES below.Hmmm. there is some text missing there. It should read:
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocating an unused minor number. "md" causes a non-partition- able array to be used. "mdp", "part" or "p" causes a partition- able array (2.6 and later) to be used. "yes" requires the named md device to have a 'standard' format, and the type and minor number will be determined from this. See DEVICE NAMES below.
Quoted 1 line
(typo in the mdadm.8 source file).
Oh good, I though I was going senile... I haven't had a good use for a partitionable device, although I can think of some unusual applications for this, such as creating two RAID-6 partitionable arrarys on separate controllers, then combining a partition from each as RAID-1 for even more reliability, and doubg RAID-0 over another two to spread head motion for a very active application.
Yes, I know there are other ways to do that, it was an example...
Signature · 3 lines
bill davidsen <[email protected]> CTO TMR Associates, Inc Doing interesting things with little computers since 1979
Quoted 1 line · Bill Davidsen
I haven't had a good use for a partitionable device
i've used it to have root, swap, and some external xfs/ext3 logs on a single raid1... (the xfs/ext3 logs are for filesystems on another raid5) rather than managing 4 or 5 separate raid1s on the same 2 disks.
-dean
Quoted 76 lines · Neil Brown
Quoted 8 lines · On Wednesday November 9, [email protected] wrote:
Quoted 8 lines
Okay,
PLEASE somebody who knows answer the following:
1) what is the difference between running
mdadm -A -ayes 1/dev/md1--uuid=xxxxx /dev/sd*Quoted 8 lines
Quoted 8 lines
and
mdadm -A -amd 1/dev/md1 --uuid=xxxxx
/dev/sd*In other words, how do the "yes" and "md" options behave differently.
From 'man mdadm'
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocat- ing an unused minor number. "md" causes a non-partitionable array to be used. "mdp", "part" or "p" causes a partitionable array (2.6 and later) to be used. "yes" requires the named md device to have a from this. See DEVICE NAMES below.Hmmm. there is some text missing there. It should read:
-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocating an unused minor number. "md" causes a non-partition- able array to be used. "mdp", "part" or "p" causes a partition- able array (2.6 and later) to be used. "yes" requires the named md device to have a 'standard' format, and the type and minor number will be determined from this. See DEVICE NAMES below.(typo in the mdadm.8 source file).
Does that help?
Quoted 3 lines
Quoted 3 lines
2) If you create an array
/dev/md0with mdadm, is there any reason why you shouldn't start it as/dev/md1?No technical reason. This works perfectly.
Quoted 9 lines
Quoted 9 lines
The second option above (-amd 1) would NOT start an array that was created as
/dev/md0(under an older mdadm -- 1.8.? ) whereas the first option (-ayes/dev/md1) had no difficulty.Thank you.
Andy LiebmanQuoted 6 lines
Sorry, my bad:
I meant to give as my examples:
mdadm -A -amd 1 --uuid=xxxxx /dev/sd*This is wrong. It will create a device files called '1' in the current directory (assuming it works at all).
Quoted 4 lines
and mdadm -A -ayes /dev/md1 --uuid=xxxxx /dev/sd*
Quoted 10 lines
Given that
/dev/md1is a 'standard' format name, this will have the same effect as "-amd/dev/md1". You only get the difference when you want to use a name like "/dev/md/home" or "/dev/swap", in which case, "-ayes" isn't allowed as mdadm cannot differentiate between partitioned and not.NeilBrown
Thank you Neil. I get it now. I guess it WOULD have been helpful to have that missing text you supplied above!! I really wasn't interested in doing anything I couldn't do two years ago with mdadm -- /dev/mdX was all I wanted or needed.
But still, a few concrete examples in "man mdadm" would helpful . For instance, I don't think it's clear that you can create DEVICE NAMES like /dev/md/home. It's a little fuzzy what exactly you are allowed to substitute for {NN}. So, it might be useful to give a few more explicit examples:
mdadm -A -ayes /dev/md1 --uuid=xxxxx /dev/sd* OKAY
mdadm -A -ayes /dev/md/home --uuid=xxxxx /dev/sd* NO GOOD
mdadm -A -amp /dev/md1 --uuid=xxxxx /dev/sd* OKAY
mdadm -A -amp /dev/md/home --uuid=xxxxx /dev/sd* OKAY
mdadm -A -amp /dev/md/5 -- uuid=xxxxx /dev/sd* IS THIS OKAY?
...etc, for other options.
I guess it's also the same for "mdadm -C" (spelling it out always helps tremendously). In fact, I suppose the MOST important examples would be for "mdadm -C" -- because if you can't create an array, you certainly won't be assembling one! It just so happens that in my case I was assembling arrays that had been created on another OS that used devfs and an older version of mdadm.
And finally, you might give a phrase after each example indicating why you might want to create a device with such a name. I understand creating a swap partition on a RAID, but I've never heard of naming a RAID device /dev/swap. So, you might give a hint about what the advantage of the latter could be (if there is an advantage).
I'm not trying to make work for you. If I could answer these questions, I'd be happy to make this additions to the man page.
Thanks again. Couldn't get my work done without mdadm...
Andy Liebman