Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mdadm - change /dev/md122 to /dev/md3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Sum1
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2006
Posts: 104

PostPosted: Tue Feb 19, 2013 1:01 pm    Post subject: mdadm - change /dev/md122 to /dev/md3 Reply with quote

Hello,

Not really an installation, but a kernel re-compile and kernel panic upon re-boot.
I chrooted from minimal install iso on usb device and recompiled kernel.
In the chroot environment, cat /proc/mdstat shows all my raid partitions as /dev/md122 - /dev/md127 instead of what my fstab indicates: /dev/md0 through /dev/md6.

I didn't think there was a problem because I was able to compile kernel and access all data on partitions.
Now, upon new kernel install, the boot states:

md6 (driver?)
md5 (driver?)
md4 (driver?)
md122 (driver?)
md2 (driver?)
md123 (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (2,0).

It appears md122 is what my /etc/fstab knows as /dev/md0 root partition and /dev/md123 is the /dev/md1.
I didn't change anything in my grub.conf or fstab.
How do I make mdadm properly read/report the raid partitions as they are in /etc/fstab upon reboot.

Thank you for your help.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Tue Feb 19, 2013 3:34 pm    Post subject: Reply with quote

The metadata stores hostnames and super-minor number. You can update these on assemble, see man mdadm on --update.

However probably more important is what your /etc/mdadm.conf says about your RAID arrays. They should be specified by UUID there and given a /dev/mdX device name to be used on assembly. mdadm will use mdadm.conf to build the arrays whenever possible and only fall back to alternate methods such as when scanning and assembling RAIDs in a live/rescue system.
Back to top
View user's profile Send private message
Sum1
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2006
Posts: 104

PostPosted: Tue Feb 19, 2013 9:39 pm    Post subject: Reply with quote

frostschutz wrote:
The metadata stores hostnames and super-minor number. You can update these on assemble, see man mdadm on --update.

However probably more important is what your /etc/mdadm.conf says about your RAID arrays. They should be specified by UUID there and given a /dev/mdX device name to be used on assembly. mdadm will use mdadm.conf to build the arrays whenever possible and only fall back to alternate methods such as when scanning and assembling RAIDs in a live/rescue system.


Thanks for your reply, Frostschutz.
I see part of the trouble may be that my mdadm.conf is entirely commented out by #'s.
I should have provided parameters in there a long time ago.

I'll definitely look more closely on the mdadm --update capabilities.
Back to top
View user's profile Send private message
Sum1
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2006
Posts: 104

PostPosted: Tue Feb 19, 2013 9:58 pm    Post subject: Reply with quote

Probably a dumb question, but better safe than sorry --

Should any/all mdadm commands on partitions be performed with them unmounted and not while chrooted?

I see that I could do: mdadm -A --name=/dev/md3 /dev/sda3 /dev/sdb3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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