[SOLVED] Problem installing CentOS with a RAID 1

General support questions

[SOLVED] Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/04/25 17:39:59

I try install CentOS 6.2 with a RAID 1 following the steps in http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5, with the only exception that in 'method 1 of GRUB' I have to use 'root (hd1,1) instead of 'root (hd1,0)'.

The system boot perfect with two disks, but when I disconnect one (emulating a failure) the next error appear:

kernel panic - not syncing: attempted to kill init!
panic occurred, switching back to the console

What can I do?

PD: Sorry for my bad english :-(
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

Re: Problem installing CentOS with a RAID 1

Postby TrevorH » 2012/04/25 20:10:05

There was a bug in the original dracut version that shipped with CentOS 6.2 that caused boots from a broken RAID 1 array to fail. Have you yum updated your system? If you have then you have the latest version of dracut and need to rebuild the initramfs with it using something like

Code: Select all
dracut /boot/initramfs-2.6.32-220.el6.img 2.6.32-220.el6
User avatar
TrevorH
Forum Moderator
 
Posts: 9130
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/04/26 15:48:28

Thanks a lot! I'll try with that...
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

Re: Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/05/09 19:24:47

In '/boot' I have:

[root@ls2 administrator]# dracut /boot/
config-2.6.32-220.13.1.el6.x86_64
config-2.6.32-220.el6.x86_64
efi/
grub/
initramfs-2.6.32-220.13.1.el6.x86_64.img
initramfs-2.6.32-220.el6.x86_64.img
initrd-2.6.32-220.13.1.el6.x86_64kdump.img
initrd-2.6.32-220.el6.x86_64kdump.img
lost+found/
symvers-2.6.32-220.13.1.el6.x86_64.gz
symvers-2.6.32-220.el6.x86_64.gz
System.map-2.6.32-220.13.1.el6.x86_64
System.map-2.6.32-220.el6.x86_64
vmlinuz-2.6.32-220.13.1.el6.x86_64
.vmlinuz-2.6.32-220.13.1.el6.x86_64.hmac
vmlinuz-2.6.32-220.el6.x86_64
.vmlinuz-2.6.32-220.el6.x86_64.hmac


I execute the next command:

[root@ls2 administrator]# dracut /boot/initramfs-2.6.32-220.el6.x86_64.img --force
E: Will not override existing initramfs (/boot/initramfs-2.6.32-220.el6.x86_64.img) without --force


What's wrong? Thanks you again! ;)
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

[SOLVED] Problem installing CentOS with a RAID 1

Postby pschaff » 2012/05/09 19:45:03

You did not give all the required parameters, you did not specify a different filename for the initramfs, and you did not use the latest kernel. Try
Code: Select all
cd /boot
dracut initramfs-2.6.32-220.13.1.el6.x86_64_new.img 2.6.32-220.13.1.el6.x86_64
mv initramfs-2.6.32-220.13.1.el6.x86_64.img initramfs-2.6.32-220.13.1.el6.x86_64_old.img
mv initramfs-2.6.32-220.13.1.el6.x86_64_new.img initramfs-2.6.32-220.13.1.el6.x86_64.img

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/05/10 14:50:56

Thanks so much!

I just try that commands in the terminal from CentOS, and when I disconnect a disk (like a disk failure) the system boots, but when I disconnect the other disk the system doesn't boot (black display with a pointer flashing).

Do I forget anything?
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

Re: Problem installing CentOS with a RAID 1

Postby jlehtone » 2012/05/10 14:57:44

Each disk has its own MBR; they are not mirrored.
Filesystem on software RAID-1 can be accessed directly without the md subsystem. Read-only access is safe.

Grub stage1 within MBR has a pointer to a partition that contains the /boot. Either one of the disks lacks stage1 from its MBR, or the pointer refers to the other disk. When the other disk is "dead", the pointer is wrong.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/05/10 15:42:41

Thanks jlehtone! And... How can I resolve that?

When I install CentOS y formated the partitions in 'ext4' and in http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5 says 'ext3'... Is that a problem?
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

Re: Problem installing CentOS with a RAID 1

Postby pschaff » 2012/05/10 17:21:11

No. For CentOS-5 ext3 was the default. For CentOS-6 it is ext4.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Problem installing CentOS with a RAID 1

Postby Lisandro1987 » 2012/05/10 17:22:59

Thanks pschaff! :) Any idea about the other question?
Lisandro1987
 
Posts: 33
Joined: 2012/04/25 17:37:40

Next

Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 10 guests