Numbering of md devices
Michael Hipp
Michael
Wed Nov 15 19:28:20 PST 2006
Michael Hipp wrote:
> A. Khattri wrote:
>> On Wed, 15 Nov 2006, Michael Hipp wrote:
>>
>>> How do I nail down the numbering order of mdx devices?
>>>
>>> I have this arrangement:
>>>
>>> md0 /dev/sda1 /boot
>>> md1 /dev/sda2 /(root)
>>> md2 /dev/sda3 <swap>
>>> md3 /dev/hda5 /home
>>>
>>> I added another RAID1 device based on /dev/hdc1. It stupidly gives me this
>>> arrangement (and, of course, won't boot):
>>>
>>> md0 /dev/hdc1
>>> md1 /dev/sda1 /boot
>>> md2 /dev/sda2 /(root)
>>> md3 /dev/sda3 <swap>
>>> md4 /dev/hda5 /home
>>>
>>> How can I somewhere set in concrete the enumeration/ordering of the md devices?
>> How are you building the arrays? mdadm?
>
> Yes. Something along these lines...
>
> mdadm --create /dev/md4 --level 1 --raid-devices=2 missing /dev/hdc1
Well, I eventually figured out that you can add options to the kernel line to
specify how the md's are to be constructed. So my /boot/grub/menu.lst ends up
having lines like this in it:
kernel /vmlinuz-2.6.15-27-server md=0,/dev/sda1 md=1,/dev/sda2 md=2,/dev/sda3
md=3,/dev/hda1,/dev/hdc1 root=/dev/md1 ro quiet splash
Rather ugly, but it mostly works. It seems to obey the ones for sda but
ignores the hdx ones. Not sure why. But at least my system will now boot reliably.
I'm tempted to go report this stuff as a bug to the md maintainers.
Michael
More information about the Linux-users
mailing list