View previous topic :: View next topic |
Author |
Message |
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Fri Jan 04, 2013 2:48 pm Post subject: A few questions regarding MD devices |
|
|
I've noticed a pattern with md devices, let's say I create four of them:
Code: | /dev/md1
/dev/md2
/dev/md3
/dev/md4 |
Then time passes and I have to change out motherboards or whatever, and this requires me to boot off of a liveCD.
After boot I notice that the nodes are numbered differently:
Code: | /dev/md120
/dev/md121
/dev/md122
/dev/md123 |
Ehh... whatever, I mount them, make my kernel and flag changes, then I try to boot off of the hard disks. Through some issues of grub not being able to find a root partition and fstab complaining that it wasn't able to mount all the partitions, I find out that somehow all the md's got renumbered in the OS itself.
I know how to fix and re-number the md's (here's a link if your curious on how to do this), but that isn't my question.
My questions are:
1) Why does this happen? This isn't an isolated incident, it happens a lot, and it's happened to me several times on several machines, in several different environments.
2) Any way to prevent this from happening? _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Jan 04, 2013 4:01 pm Post subject: |
|
|
Bigun,
System rescue CD seems to number md devices from /dev/md127 working down, regardless of the preferred minor number in the raid superblocks.
I've given up revering the numbering after needing to use System Rescue CD and assemble the raid sets by UUID and mount filesystems by UUID.
Then it JustWorks.
I'm not sure exactly why it happens. What annoys me more is that SystemRescueCD updates the preferred minor number in the raid superblock, so you don't get your md numbers back when you boot normally. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Fri Jan 04, 2013 4:35 pm Post subject: |
|
|
NeddySeagoon wrote: | Bigun,
System rescue CD seems to number md devices from /dev/md127 working down, regardless of the preferred minor number in the raid superblocks.
I've given up revering the numbering after needing to use System Rescue CD and assemble the raid sets by UUID and mount filesystems by UUID.
Then it JustWorks.
I'm not sure exactly why it happens. What annoys me more is that SystemRescueCD updates the preferred minor number in the raid superblock, so you don't get your md numbers back when you boot normally. |
Shouldn't this be filed as a bug then? _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Jan 04, 2013 4:37 pm Post subject: |
|
|
Bigun,
I'm sure I've seen it documented somewhere but I can't recall where.
That makes it a feature :) _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Bigun Advocate
Joined: 21 Sep 2003 Posts: 2196
|
Posted: Fri Jan 04, 2013 5:51 pm Post subject: |
|
|
NeddySeagoon wrote: | I've given up revering the numbering after needing to use System Rescue CD and assemble the raid sets by UUID and mount filesystems by UUID. |
Does grub recognize UUID's? For the root argument I mean. _________________ "It's ok, they might have guns but we have flowers." - Perpetual Victim |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Jan 04, 2013 6:02 pm Post subject: |
|
|
Bigun,
The short answer is no.
However, I have to use an initrd as I have root in LVM on raid5, so I have to start the raid, and run LVM before I can even see root.
I also have separate /usr and /var so the extra complication of mounting root by UUID is just a small niggle.
/usr and /var are also mounted by UUID
UUID is reported to JustWork of you use a GID partition table. I have one system that uses GID partition tables but it too has root in LVM on raid5, so I can't test. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|