Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A few questions regarding MD devices
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1974

PostPosted: Fri Jan 04, 2013 2:48 pm    Post subject: A few questions regarding MD devices Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32091
Location: 56N 3W

PostPosted: Fri Jan 04, 2013 4:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1974

PostPosted: Fri Jan 04, 2013 4:35 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32091
Location: 56N 3W

PostPosted: Fri Jan 04, 2013 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bigun
Veteran
Veteran


Joined: 21 Sep 2003
Posts: 1974

PostPosted: Fri Jan 04, 2013 5:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32091
Location: 56N 3W

PostPosted: Fri Jan 04, 2013 6:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum