[opensuse] /dev/md0 does not start up at system boot (opensuse 11.2 x86_64)
OS: opensuse 11.2 x86_64 with stock kernel 2.6.31.5-0.1-desktop Motherboard: DG45ID CPU: Intel C2Q 8400 HDD1(sda): WD 320GB sataII HDD2 (sdb): Seagate 160GB sata II (a) Using the mdadm tool created /dev/md0 (raid1 /dev/sda5 and /dev/sdb1 both 160GB) - OK (b) Create ext4 filesystem on /dev/md0 - OK (c) Mounted /dev/md0 on /mnt/md0 - OK (d) Added to /etc/fstab: /dev/md0 /mnt/md0 ext4 acl,user_xattr 1 2 (e) Created an updated "initrd" file to include the "md" drivers mkinitrd -f "md lvm2" - OK (e) mdadm --detail --scan > /etc/mdadm.conf - OK (f) Reboot the system and expect to have /dev/md0 mounted on /mnt/md0 - NOK. Boot process is unable to find /dev/md0 and prompts for root pass to fix the error. Upon logging in with root password I find: - /proc/mdstat does not list any active raid device :( - lsmod lists that raid1 module is loaded - mdadm --examine /dev/sda5 /dev/sdb1 shows UUID in /etc/mdadm.conf match with that in sda5 and sdb1 During the repair mode, if do: mdadm --auto-detect Voila, /proc/mdstat shows /dev/md0 with raid1 is active! Removing the /dev/md0 entry from /etc/fstab and booting gives similar result i.e. - /proc/mdstat shows raid not active - lsmod shows raid1 module is loaded - UUID in /etc/mdadm.conf and in /dev/sda5 /dev/sdb1 match - mdadm --auto-detect activates /dev/md0 (sda5 and sdb1) Done some Google search and found the following to be similar to my problem except that it is on Debian and in 2006! http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287415 What step(s) am I missing to be able to activate /dev/md0 during system boot and have it mounted via /etc/fstab entry? TIA, -- Arun Khan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 05 Feb 2010, 17:50:59 +0100, Arun Khan wrote:
OS: opensuse 11.2 x86_64 with stock kernel 2.6.31.5-0.1-desktop Motherboard: DG45ID CPU: Intel C2Q 8400
HDD1(sda): WD 320GB sataII HDD2 (sdb): Seagate 160GB sata II
(a) Using the mdadm tool created /dev/md0 (raid1 /dev/sda5 and /dev/sdb1 both 160GB) - OK (b) Create ext4 filesystem on /dev/md0 - OK (c) Mounted /dev/md0 on /mnt/md0 - OK (d) Added to /etc/fstab: /dev/md0 /mnt/md0 ext4 acl,user_xattr 1 2 (e) Created an updated "initrd" file to include the "md" drivers mkinitrd -f "md lvm2" - OK (e) mdadm --detail --scan > /etc/mdadm.conf - OK
You should have run (e) _before_ running (e) ;-) To be serious, /etc/mdadm.conf might be stored in the generated initrd, so before running mkinitrd, it's always reasonable to have /etc/mdadm.conf as current as possible. HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 February 2010 18:08:48 Manfred Hollstein wrote:
You should have run (e) _before_ running (e) ;-) To be serious, /etc/mdadm.conf might be stored in the generated initrd, so before running mkinitrd, it's always reasonable to have /etc/mdadm.conf as current as possible.
There is absolutely no purpose in having raid in the initrd if root is not on raid. It is an unnecessary and useless complication The initrd is there to enable the kernel to mount the root file system. It should contain only the drivers needed for that purpose and nothing else Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, Feb 6, 2010 at 12:38 AM, Anders Johansson
There is absolutely no purpose in having raid in the initrd if root is not on raid. It is an unnecessary and useless complication
Agree about the driver in initrd if "/" is on raid. I thought maybe it would be help to activate /dev/md0 during boot - clutching at straws sort of :( -- Arun Khan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Feb 5, 2010 at 10:38 PM, Manfred Hollstein
On Fri, 05 Feb 2010, 17:50:59 +0100, Arun Khan wrote:
OS: opensuse 11.2 x86_64 with stock kernel 2.6.31.5-0.1-desktop Motherboard: DG45ID CPU: Intel C2Q 8400
HDD1(sda): WD 320GB sataII HDD2 (sdb): Seagate 160GB sata II
(a) Using the mdadm tool created /dev/md0 (raid1 /dev/sda5 and /dev/sdb1 both 160GB) - OK (b) Create ext4 filesystem on /dev/md0 - OK (c) Mounted /dev/md0 on /mnt/md0 - OK (d) Added to /etc/fstab: /dev/md0 /mnt/md0 ext4 acl,user_xattr 1 2 (e) Created an updated "initrd" file to include the "md" drivers mkinitrd -f "md lvm2" - OK (e) mdadm --detail --scan > /etc/mdadm.conf - OK
You should have run (e) _before_ running (e) ;-) To be serious, /etc/mdadm.conf might be stored in the generated initrd, so before running mkinitrd, it's always reasonable to have /etc/mdadm.conf as current as possible.
The second (e) should have been (f) :). Yes, I did generate a fresh initrd after creating the /etc/mdadm.conf. It did not make any difference and also it was not copied over in the initrd. The real issue was that the boot.md service was OFF as Anders suspected. Thanks for your help. -- Arun Khan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010-02-06 06:23, Arun Khan wrote:
Yes, I did generate a fresh initrd after creating the /etc/mdadm.conf. It did not make any difference and also it was not copied over in the initrd.
The real issue was that the boot.md service was OFF as Anders suspected.
I realize this matter is solved, but I've had problems sending mails so I need to test if the list receives my mail this time... At least I can contribute with this info; I used Yast (system - partitioner) to create my RAID1 array and it works without a flaw. My system is very similar; 11.2, 2.6.31.8-0.1, etc. (However, RAID5 is another matter; it mounts fine but errors when running...) /Dan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Arun Khan wrote:
Done some Google search and found the following to be similar to my problem except that it is on Debian and in 2006!
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287415
What step(s) am I missing to be able to activate /dev/md0 during system boot and have it mounted via /etc/fstab entry?
Do you have all the necessary drive modules in the initrd? Ie. SATA drivers etc. Check the bootlog and see when/if the individual drives are detected. Maybe even error messages from mdadm. /Per -- Per Jessen, Zürich (2.8°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2010-02-05 17:50, Arun Khan wrote:
What step(s) am I missing to be able to activate /dev/md0 during system boot and have it mounted via /etc/fstab entry?
I don't know what modules may be missing in initrd, but I created my RAID1 array in Yast (partitioner) and It works without a flaw; activated and mounted at boot. My system is very similar; 11.2, 2.6.31.8-0.1, etc. (However, RAID5 is another matter; it mounts fine but errors when running...) /Dan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 February 2010 17:50:59 Arun Khan wrote:
(e) Created an updated "initrd" file to include the "md" drivers mkinitrd -f "md lvm2" - OK
Remove this. It serves no purpose
(e) mdadm --detail --scan > /etc/mdadm.conf - OK
What is generated there? What is in mdadm.conf
What step(s) am I missing to be able to activate /dev/md0 during system boot and have it mounted via /etc/fstab entry?
Make sure boot.md is set to start on boot with "chkconfig boot.md" and if it isn't, enable it with "chkconfig boot.md on" If it is set to start on boot, you need to make sure that "/etc/init.d/boot.md start" can activate the raid. Look for any error messages in /var/log/boot.msg Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, Feb 6, 2010 at 12:42 AM, Anders Johansson
On Friday 05 February 2010 17:50:59 Arun Khan wrote:
(e) Created an updated "initrd" file to include the "md" drivers mkinitrd -f "md lvm2" - OK
Remove this. It serves no purpose
Will do so.
(e) mdadm --detail --scan > /etc/mdadm.conf - OK
What is generated there? What is in mdadm.conf
# cat /etc/mdadm.conf ARRAY /dev/md0 UUID=64d74b7f:47855ec7:d5e93e8e:f905c3d3
Make sure boot.md is set to start on boot with "chkconfig boot.md" and if it isn't, enable it with "chkconfig boot.md on"
This is what I missed! boot.md is OFF duh After turning it ON, /dev/md0 is now activated and mounted on /mnt/md0 at boot time. Thank you Anders. -- Arun Khan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Anders Johansson
-
Arun Khan
-
Dan Kopparhed
-
Manfred Hollstein
-
Per Jessen