Skip to contentSkip to conversation

Change preferred minor number of an md device?

DISCUSSION Niccolo Rigacci 2 participants 2 messages Jan 31, 2005 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi to all, md gurus!

Is there a way to edit the preferred minor of a stopped device?

Alternatively, is there a way to create a raid1 device specifying the preferred minor number md0, but activating it provisionally as a different minor, say md5? An md0 is already running, so "mdadm --create /dev/md0" fails...

I have to dump my /dev/md0 to a different disk (/dev/md5), but when I boot from the new disk, I want the kernel to autmatically detect the device as /dev/md0.

Many thanks

Signature · 2 lines
Niccolo Rigacci
http://www.texnet.it/
#1 lore raw
Quoted 3 lines · On Monday January 31, [email protected] wrote:

Hi to all, md gurus!

Is there a way to edit the preferred minor of a stopped device?

mdadm --assemble /dev/md0 --update=super-minor /dev/....

will assemble the array and update the preferred minor to 0 (from /dev/md0).

However this won't work for you as you already have a /dev/md0 running...

Quoted 9 lines

Alternatively, is there a way to create a raid1 device specifying the preferred minor number md0, but activating it provisionally as a different minor, say md5? An md0 is already running, so "mdadm --create /dev/md0" fails...

I have to dump my /dev/md0 to a different disk (/dev/md5), but when I boot from the new disk, I want the kernel to autmatically detect the device as /dev/md0.

If you are running 2.6, then you just need to assemble it as /dev/md0 once and that will automatically update the superblock. You could do this with kernel parameters of
raid=noautodetect md=0,/dev/firstdrive,/dev/seconddrive

NeilBrown