LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-27-2010, 09:09 PM   #1
gardar
LQ Newbie
 
Registered: Apr 2005
Location: Reykjavik, Iceland
Distribution: ArchLinux, Debian, CentOs, RHEL, Ubuntu
Posts: 22

Rep: Reputation: 3
Moved to mdadm raid1 and now I'm having grub problems


Posted this on the centos forum too, but I might get better attention here...


Hello.

I just moved my centos server to a mdadm raid1 array.

I went partially after this guide: http://www.tolaris.com/2008/10/01/mo...ition-to-raid/

What I did was to boot up a livecd and made three partitions on both of my empty disks, one for / one for swap and one for /vz (it's an openvz server).
Made those partitions into seperate raid1 arrays and then rsync-ed everything from the old disk to the new partitions.

After I had moved everything I did chroot into the new raid array and edited both grub config files and fstab, according to the guide.

But when I try to set up grub on the new array I get this:

Code:
grub-install /dev/sda
The file /boot/grub/stage1 not read correctly
Code:
grub> device (hd0) /dev/sda
device (hd0) /dev/sda

root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd

setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 2: Bad file or directory type
Code:
grub> 
find /boot/grub/stage1
Error 15: File not found

find /grub/stage1
Error 15: File not found
But when I do a ls of the grub directory I can see the file.
Code:
ls /boot/grub

device.map device.map.backup e2fs_stage1_5 fat_stage1_5 fs_stage1_5 grub.conf iso9960_stage1_5 jfs_stage1_5 menu.lst menu.lst_orig minix_stage1_5 reiserfs_stage1_5 splash.xpm.gz stage1 stage2 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5
I have managed to run the system on the raid1 disks when using super grub2 disk off a cd, but it has it's own grub and can boot any distro, so I can see that the system is working fine, except for grub.
I have tried installing grub both from a livecd (ubuntu 64bit) and when booted into the raid1 array, but it gives the same results as stated above.


I've been google-ing my ass of but no luck so far.


Any that knows what's wrong?
 
Old 11-28-2010, 08:46 AM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
You might have an issue with /boot being part of one of your raid devices. In other words it can't be seen until the OS has assembled your arrays and in order for the OS to load it has to see /boot first.


Regards,

Fordeck
 
Old 11-28-2010, 09:59 AM   #3
gardar
LQ Newbie
 
Registered: Apr 2005
Location: Reykjavik, Iceland
Distribution: ArchLinux, Debian, CentOs, RHEL, Ubuntu
Posts: 22

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by fordeck View Post
You might have an issue with /boot being part of one of your raid devices. In other words it can't be seen until the OS has assembled your arrays and in order for the OS to load it has to see /boot first.


Regards,

Fordeck

According to what I've seen it is supposed to be possible.
For example according to this manual: http://www.texsoft.it/index.php?c=ha...grubraid1&l=it

I'ts supposed to be possible to have everything on raid1, but you have to install grub directly to /dev/sda and /dev/sdb and I don't see the instruction stating you should have a seperate partition for that.

I have another server that is running debian successfully with mdadm raid1.But the main difference is that the debian server was set up from the debian cd while the centos server was copyed to raid1 afterwards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mdadm raid1 both bootable chiendarret Linux - Server 1 03-09-2009 07:53 AM
Migrate to a raid1 with mdadm Ossar Linux - Software 2 08-19-2008 11:55 AM
Problems with Grub and Mdadm katvis Linux - Newbie 1 11-02-2007 01:07 AM
Software RAID1 with mdadm bujecas Debian 0 10-26-2006 09:56 AM
Problems with setting up raid1 with mdadm on slackware kikola Slackware 0 08-21-2006 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration