LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-01-2013, 02:24 PM   #1
chiendarret
Member
 
Registered: Mar 2007
Posts: 212

Rep: Reputation: 15
RAID1 both HDs bootable


With a raid1 amd64 wheezy, one of the two HDs got broken.
Unfortunately, I had added grub to sda only, which is just the one
broken. So that, when it is replaced with a fresh HD, the OS is not
found. Inverting the SATA cables of course does not help (Operative
System Not Found). In a previous similar circumstance, I was lucky
that the broken HD was the one without grub.

Is any way to recover? perhaps through Knoppix? I know how to look
into undamaged RAID1 with Knoppix. If not, the best I can think of, is to insert the Debian install CD, use the same partitions and do not erase the content of my HOME.

Also, when making a fresh RAID1 from scratch, is any addendum to the Debian instructions as to make both disks bootable?

Thanks
chiendarret
 
Old 03-01-2013, 03:44 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
A raid 1 is a mirror which means both your drives are identical. You should be able to simply replace the drive and rebuild the array or just boot off the drive by itself. When you say you added grub to "sda" only then you werent running a raid. It should be reading both drives as sda, if you had an sdb as well you weren't running a raid. Are you using a software level raid within the OS or a hardware level raid via the motherboard/bios?
 
Old 03-01-2013, 05:42 PM   #3
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 86

Rep: Reputation: 24
USING GRUB to boot a SATA DISC (1 of a mirrored pair) that won't normally boot

Note: GRUB is avail on Linux CD by selecting Linux Rescue or use a Live Linux CD
grub
to confirm the hd parameters do a
find /grub/stage1 or find /sbin/init or find /boot/grub/stage1
hd parameter 1 is the drive, parameter 2 is the partition
check that grub can see the disk by doing a
cat (hd0,2)/etc/fstab should see md0, md1 etc
then
root (hd0,0)
setup (hd0) // this writes the MBR stuff

reboot

more grub ....
First, set the GRUB's root device to the partition containing the boot directory, like this:

grub> root (hd0,0)

If you are not sure which partition actually holds this directory, use the command find (see find), like this:

grub> find /boot/grub/stage1

This will search for the file name /boot/grub/stage1 and show the devices which contain the file.

Once you've set the root device correctly, run the command setup :

grub> setup (hd0)

This command will install the GRUB boot loader on the Master Boot Record (MBR) of the first drive.
 
Old 03-01-2013, 05:50 PM   #4
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Quote:
Originally Posted by Kustom42 View Post
A raid 1 is a mirror which means both your drives are identical. You should be able to simply replace the drive and rebuild the array or just boot off the drive by itself. When you say you added grub to "sda" only then you werent running a raid. It should be reading both drives as sda, if you had an sdb as well you weren't running a raid. Are you using a software level raid within the OS or a hardware level raid via the motherboard/bios?
Definitely not. I assume the OP is talking here about an mdadm raid. That mirrors on the partition level when typically used.

To be 100% accurate I should have a raid machine at my desk, which I haven't, but it boils down to this.

Boot from a live USB. The Live USB must be the same version as your disk. If not, you run into problems with incompatible versions and such.

When booted, mount the root partition of your sda in, say, /mnt/sda1. Mount the /home. /usr and /var in /mnt/sda1/home, /mnt/sda1/var, etc. Depending on what you have for partitions. Just make sure your entire tree is mounted below /mnt/sda1.

Now chroot into /mnt/sda1:
Code:
chroot /mnt/sda1
and run
Code:
grub-install --root-directory=/mnt/sda1 /dev/sda
Once you installed the second hard disk, do the same for /dev/sdb.

In case you can't get to the live USB for Wheezy, make a bare debian install on something, a small hard disk or so, not on /dev/sda, and proceed with mounting you /dev/sda1 als described above.

jlinkels
 
1 members found this post helpful.
Old 03-01-2013, 05:54 PM   #5
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
The above about software level raids is correct. You can follow the above to get grub back installed. On a side note, you are wasting a bunch of HD space by doing a software level raid 1 IMO. Either do a hardware level raid 1 or just setup an rsync to backup whatever data you want to your second drive for easy restore. Maybe its just me but I have never really seen a huge benefit to an mdadm raid 1 setup.
 
Old 03-01-2013, 08:15 PM   #6
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Quote:
Originally Posted by Kustom42 View Post
Maybe its just me but I have never really seen a huge benefit to an mdadm raid 1 setup.
As it happened, since I have been using raid1 with mdadm I have never lost a disk. But apparently the OP did loose a disk and he still is operational. About HW raid controllers: not too long ago I installed a DELL server with HW raid. Writing was as slow as molasses. This was because DELL sells low end HW raid controllers which are ... slow. To get fast raid you have to supply a considerate amount of money. Which is from a marketing point of view right, and if you are in serious business it should be a problem.

Until then, raid1 has suited me well, and an order of magnitude faster than entry level hw raid. So for entry level customers I would still recommend mdadm raid.

jlinkels
 
Old 03-02-2013, 01:45 PM   #7
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Quote:
Originally Posted by jlinkels View Post
As it happened, since I have been using raid1 with mdadm I have never lost a disk. But apparently the OP did loose a disk and he still is operational. About HW raid controllers: not too long ago I installed a DELL server with HW raid. Writing was as slow as molasses. This was because DELL sells low end HW raid controllers which are ... slow. To get fast raid you have to supply a considerate amount of money. Which is from a marketing point of view right, and if you are in serious business it should be a problem.

Until then, raid1 has suited me well, and an order of magnitude faster than entry level hw raid. So for entry level customers I would still recommend mdadm raid.

jlinkels


That is completely false. I have been working with Dell hardware in production enterprise environments since 8G. Previous to their 11G hardware their Raid controller was a pain to work with but it was never slow. If you can provide one piece of research to back this up I would be surprised.
 
Old 03-02-2013, 02:24 PM   #8
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
This is part of the report I used in the discussion with DELL:


Have a look at these events:
I used 4 machines, all carrying out this command.
Configurations are self-explanatory.
The last one is a VM on the DELL server.

Linux server bij RNW, 2GHz, 2xSATA software RAID1
jlinkels@fserv:/tmp$ dd if=/dev/zero of=/tmp/zero.weg bs=10M count=50
50+0 records in
50+0 records out
524288000 bytes (524 MB) copied, 5.58924 s, 93.8 MB/s

Server bij mij thuis, Atom 1.6 GHz, 1x SATA
jlinkels@homeserv:/data/movies$ dd if=/dev/zero of=/tmp/zero.weg bs=10M count=50
50+0 records in
50+0 records out
524288000 bytes (524 MB) copied, 5.48204 s, 95.6 MB/s

Virtual machine op mijn desktop bij RNW, 3.2GHz, 1x SATA
jlinkels@jlinkels-ub:~$ dd if=/dev/zero of=/tmp/zero.weg bs=10M count=50
50+0 records in
50+0 records out
524288000 bytes (524 MB) copied, 5.96353 s, 87.9 MB/s

Trickykid4:
jlinkels@mail:/tmp$ dd if=/dev/zero of=/tmp/zero.weg bs=10M count=50
50+0 records in
50+0 records out
524288000 bytes (524 MB) copied, 46.3924 s, 11.3 MB/s

Trickykid4 is the DELL server with HW RAID. It is a DELL PowerEdge R210. Trickykid is running on top of ESXi5. After 4-5 days, about 50% of the 1TB RAID was synced. Mind you, DELL support was 100% sure that this was quite normal and nothing was wrong with the hardware. Googling at that time showed that this was a common problem with this hardware.

This happened 12 months ago, I am not sure about which generation we are talking.

jlinkels

Last edited by jlinkels; 03-02-2013 at 02:25 PM.
 
Old 03-04-2013, 11:14 AM   #9
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I havent worked with the 210's and that should be on Dell's latest RAID controller, it sounds like 11G hardware which is relatively new. I have never had any of those problems with speeds dipping off like that working on 20,000+ sq feet of Dell hardware. Mind you I was working on the higher end servers, the 610's 710's and 810's so I am not sure what difference there could be.

Your original post just kind of irked me as it was a generalization against all the Dell hardware and its something I've never experienced in all the time I've worked with Dell hardware. I'd be curious if you end up finding anything more about the write speeds, I'm assuming you checked all of the basics like the stripe size and other controller settings.
 
Old 03-04-2013, 11:49 AM   #10
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,487

Rep: Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626Reputation: 626
Quote:
Originally Posted by Kustom42 View Post
I havent worked with the 210's and that should be on Dell's latest RAID controller, it sounds like 11G hardware which is relatively new. I have never had any of those problems with speeds dipping off like that working on 20,000+ sq feet of Dell hardware. Mind you I was working on the higher end servers, the 610's 710's and 810's so I am not sure what difference there could be.
Those servers use high end RAID controllers and these are much faster.

Quote:
Originally Posted by Kustom42 View Post
Your original post just kind of irked me as it was a generalization against all the Dell hardware and its something I've never experienced in all the time I've worked with Dell hardware. I'd be curious if you end up finding anything more about the write speeds, I'm assuming you checked all of the basics like the stripe size and other controller settings.
That was not my intention. Therefore I wrote "DELL sells low end RAID controllers". As a hindsight I see that such a sentence can be interpreted as "all what DELL sells are low end RAID controllers". Obviously my statement should be read as "for the low end server market, DELL sells low end RAID controllers".

And there wasn't a thing wrong, DELL support confirmed this was a normal writing speed.

The problem is that the RAID controller in the 210 doesn't have a battery back-up and is strictly write through. The higher-end RAID controllers have much better performance.

What I don't like about this policy is that DELL doesn't warn the customer about the performance and sells the 210 advertising a 6 Gb/s disk transfer speed. Yes, that is the disk property, but not with that RAID controller. And secondly, a third party RAID controller, like Adaptec's doesn't work in that hardware.

Had we only known, we would have bought the $700 DELL RAID controller.

jlinkels
 
Old 03-04-2013, 01:18 PM   #11
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
That makes sense jlinkels, and from seeing all your other posts I shouldve known there was something more there. Looks like we are getting this post a little off topic anyways.


chiendarret, were you able to get your mdadm raid rebuilt and booting off the secondary drive?
 
  


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
[SOLVED] slackware 13.37 and bootable software RAID1 asidko Linux - Software 1 07-05-2012 03:33 PM
Bootable Raid1 Reconstruction Help bearbo Linux - Hardware 2 08-08-2011 12:57 PM
mdadm raid1 both bootable chiendarret Linux - Server 1 03-09-2009 07:53 AM
Making bootable both disks of mdadm raid1 chiendarret Linux - Software 0 03-08-2009 05:15 AM
Non-bootable software RAID1 partitions also cannot be mounted pcardout Linux - Server 4 06-28-2007 08:13 PM


All times are GMT -5. The time now is 05:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration