Networking Forums

Networking Forums > Computer Networking > Linux Networking > RAID 1

Reply
 
 
Lamar Thomas
Guest
Posts: n/a

 
      12-26-2003, 04:48 PM
Hi,

I am running RH 9.0 with two WD 40GB HDs in a RAID 1 (Mirror). This is just
a test system. So while the system was booting up I pulled the power on hdb
just to see what would happen. The system looked for hdb for a little while
then booted up fine.

I then shutdown the system and unplugged hda and made hdb the master (only
HD in the system). When I booted up the system I got an error saying
"Missing Operating System...". I then plugged both HDs back in as
master/slave (just like they were before I pulled the power on hdb) and the
system found BOTH drives and booted just fine.

I checked (using DOS fdisk) to make sure hdb was set to "Active" and it was.
Anyone have any ideas how to get hdb to boot if hda fails?

Let's say I replace hdb with a new HD. How would I get hda to regenerate
it's data to the new drive?

Thanks for any help.

Lamar


 
Reply With Quote
 
 
 
 
Skylar Thompson
Guest
Posts: n/a

 
      12-27-2003, 01:08 AM
["Followup-To:" header set to comp.os.linux.networking.]
On Fri, 26 Dec 2003 17:48:04 GMT, Lamar Thomas <(E-Mail Removed)> wrote:
> Hi,
>
> I am running RH 9.0 with two WD 40GB HDs in a RAID 1 (Mirror). This is just
> a test system. So while the system was booting up I pulled the power on hdb
> just to see what would happen. The system looked for hdb for a little while
> then booted up fine.


I hope you don't mean while it was on. IDE hot-swap is sketchy at best.

> I then shutdown the system and unplugged hda and made hdb the master (only
> HD in the system). When I booted up the system I got an error saying
> "Missing Operating System...". I then plugged both HDs back in as
> master/slave (just like they were before I pulled the power on hdb) and the
> system found BOTH drives and booted just fine.


Is this with software RAID? If so, you probably aren't (and can't, AFAIK)
mirror the boot sector, so you have to make it manually on /dev/hdb. You
probably should consider moving the primary slave to secondary master for
performance reasons, too.

> I checked (using DOS fdisk) to make sure hdb was set to "Active" and it was.
> Anyone have any ideas how to get hdb to boot if hda fails?
>
> Let's say I replace hdb with a new HD. How would I get hda to regenerate
> it's data to the new drive?


Use raidhotadd, like this:

raidhotadd /dev/md0 /dev/hdb

--
-- Skylar Thompson ((E-Mail Removed))
-- http://cs.earlham.edu/~skylar/
 
Reply With Quote
 
Clayton Sutton
Guest
Posts: n/a

 
      12-27-2003, 04:57 AM
See my other post in this group. "RAID 1 question". I asked that question
about mirroring the /boot partition and didn't get a real answer. Can you
provide more feedback?

Yes, it is software RAID. What does "AFAIK" mean". When you say you
"can't" mirror the boot sector, which one is the boot sector? / or /boot?
I'm thinking it's /boot because it's in the first cylinder.


Lamar


"Skylar Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ["Followup-To:" header set to comp.os.linux.networking.]
> On Fri, 26 Dec 2003 17:48:04 GMT, Lamar Thomas <(E-Mail Removed)> wrote:
> > Hi,
> >
> > I am running RH 9.0 with two WD 40GB HDs in a RAID 1 (Mirror). This is

just
> > a test system. So while the system was booting up I pulled the power on

hdb
> > just to see what would happen. The system looked for hdb for a little

while
> > then booted up fine.

>
> I hope you don't mean while it was on. IDE hot-swap is sketchy at best.
>
> > I then shutdown the system and unplugged hda and made hdb the master

(only
> > HD in the system). When I booted up the system I got an error saying
> > "Missing Operating System...". I then plugged both HDs back in as
> > master/slave (just like they were before I pulled the power on hdb) and

the
> > system found BOTH drives and booted just fine.

>
> Is this with software RAID? If so, you probably aren't (and can't, AFAIK)
> mirror the boot sector, so you have to make it manually on /dev/hdb. You
> probably should consider moving the primary slave to secondary master for
> performance reasons, too.
>
> > I checked (using DOS fdisk) to make sure hdb was set to "Active" and it

was.
> > Anyone have any ideas how to get hdb to boot if hda fails?
> >
> > Let's say I replace hdb with a new HD. How would I get hda to

regenerate
> > it's data to the new drive?

>
> Use raidhotadd, like this:
>
> raidhotadd /dev/md0 /dev/hdb
>
> --
> -- Skylar Thompson ((E-Mail Removed))
> -- http://cs.earlham.edu/~skylar/



 
Reply With Quote
 
s
Guest
Posts: n/a

 
      12-27-2003, 06:35 AM
Lamar Thomas wrote:

> Hi,
>
> I am running RH 9.0 with two WD 40GB HDs in a RAID 1 (Mirror). This is
> just
> a test system. So while the system was booting up I pulled the power on
> hdb
> just to see what would happen. The system looked for hdb for a little
> while then booted up fine.
>
> I then shutdown the system and unplugged hda and made hdb the master (only
> HD in the system). When I booted up the system I got an error saying
> "Missing Operating System...". I then plugged both HDs back in as


Sounds like only the bootsector on the original hda has anything in it.

Is this linux software raid or hardware raid ?

> master/slave (just like they were before I pulled the power on hdb) and
> the system found BOTH drives and booted just fine.
>
> I checked (using DOS fdisk) to make sure hdb was set to "Active" and it
> was. Anyone have any ideas how to get hdb to boot if hda fails?
>
> Let's say I replace hdb with a new HD. How would I get hda to regenerate
> it's data to the new drive?
>
> Thanks for any help.
>
> Lamar


 
Reply With Quote
 
Bill Davidsen
Guest
Posts: n/a

 
      12-27-2003, 02:56 PM
Clayton Sutton wrote:
> See my other post in this group. "RAID 1 question". I asked that question
> about mirroring the /boot partition and didn't get a real answer. Can you
> provide more feedback?
>
> Yes, it is software RAID. What does "AFAIK" mean". When you say you
> "can't" mirror the boot sector, which one is the boot sector? / or /boot?
> I'm thinking it's /boot because it's in the first cylinder.


Not the boot partition, the boot sector. If you are running lilo as the
boot loader and hdb as the mirror, you would (as root) run
lilo -b /dev/hdb
to write the boot sector. If you are running grub you have my best
wishes at finding someone who can help you. Not my thing.

--
bill davidsen <(E-Mail Removed)>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
 
Reply With Quote
 
Clayton Sutton
Guest
Posts: n/a

 
      12-27-2003, 04:19 PM
Thanks Bill for the good input. However, I am running GRUB. Anyone else
have any input?



Lamar




"Bill Davidsen" <(E-Mail Removed)> wrote in message
news:geednarh4IYeNnCiRVn-(E-Mail Removed)...
> Clayton Sutton wrote:
> > See my other post in this group. "RAID 1 question". I asked that

question
> > about mirroring the /boot partition and didn't get a real answer. Can

you
> > provide more feedback?
> >
> > Yes, it is software RAID. What does "AFAIK" mean". When you say you
> > "can't" mirror the boot sector, which one is the boot sector? / or

/boot?
> > I'm thinking it's /boot because it's in the first cylinder.

>
> Not the boot partition, the boot sector. If you are running lilo as the
> boot loader and hdb as the mirror, you would (as root) run
> lilo -b /dev/hdb
> to write the boot sector. If you are running grub you have my best
> wishes at finding someone who can help you. Not my thing.
>
> --
> bill davidsen <(E-Mail Removed)>
> CTO TMR Associates, Inc
> Doing interesting things with small computers since 1979



 
Reply With Quote
 
P.T. Breuer
Guest
Posts: n/a

 
      12-27-2003, 06:50 PM
Clayton Sutton <(E-Mail Removed)> wrote:
> Thanks Bill for the good input. However, I am running GRUB. Anyone else
> have any input?


On what?

(post comprehensibly and you will be helped - I know all about raid1,
and am the author of a raid1 driver)

Peter
 
Reply With Quote
 
Les Mikesell
Guest
Posts: n/a

 
      12-27-2003, 10:03 PM

"P.T. Breuer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> > Thanks Bill for the good input. However, I am running GRUB. Anyone

else
> > have any input?

>
> On what?
>
> (post comprehensibly and you will be helped - I know all about raid1,
> and am the author of a raid1 driver)
>

The question was obvious from the first post: "when you have mirrored
partitions, how do you convince grub to make both drive's boot sectors
bootable so that you can continue using the machine after the primary
drive breaks"?

---
Les Mikesell
(E-Mail Removed)


 
Reply With Quote
 
P.T. Breuer
Guest
Posts: n/a

 
      12-27-2003, 11:10 PM
Les Mikesell <(E-Mail Removed)> wrote:

> "P.T. Breuer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...


> > (post comprehensibly and you will be helped - I know all about raid1,
> > and am the author of a raid1 driver)
> >

> The question was obvious from the first post: "when you have mirrored


What "first post"? This is usenet!

> partitions, how do you convince grub to make both drive's boot sectors
> bootable so that you can continue using the machine after the primary


Are you sure you mean drives and not partitions? It is most unusual to
mirror whole drives because raid devices are not partitionable
themselves, and because the kernel relies on the *partition* typelabel
at boot to know if it is a raid device or not. It is normal to create
at least a token partition, even if it occupies the "whole" drive, in
order to deal with that. You want to give it the "raid" label number,
whatever that is ... "fd", I think I recall. Or you may prefer lvm ..

Perhaps you are running lvm over the raid1 device, in order to provide
partitions?

In that case, and if you are mirroring whole devices and not
partitioons, you will have to exclude from lvm the first block of the
raid device, in order to keep it clear for the boot sector(s). And you
will have quite a bot of trouble if the kernel image or grub second boot
phase is also on that device, since I don't know if grub knows how to
find a physical location through the layer of indirection. And the grub
second stage boot loader must be located physically by the first stage,
since the first stage is in the <512B of the boot sector, and has no
room for a fs driver!

And if you get past all that, then the raid1 partition might be
bootable. However, one does not normally raid-mirror boot partitions.
They don't change! So it is more usual to take a snapshot at the file
system level every 24 hours, and map it to another (bootable) partition.
(rsync is good).

Now, all you have to do if you really have mirrored full drives is
generate a grub boot sector on some device that grub vaguely understands
and copy it into place on the raid1 device. It will automatically go to
both of the underlying devices.

But I suspect that grub does understand raid1 devices, so you might not
even have to do as much work as that simple copy.

> drive breaks"?


I don't understand your question - why should you care if grub puts it
there or not? YOU can put it there, using the "cp" command, if grub
puts it anywhere at all. You will have more problem with getting grub to
locate the second stage loaders physical location on disk!

So, give us a clue, what *is* your problem, exactly?

Peter
 
Reply With Quote
 
Les Mikesell
Guest
Posts: n/a

 
      12-28-2003, 06:15 AM

"P.T. Breuer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> > The question was obvious from the first post: "when you have mirrored

>
> What "first post"? This is usenet!


Yes, usenet messages are threaded and reasonable readers can
traverse the list backwards to the beginning of the thread.

> > partitions, how do you convince grub to make both drive's boot sectors
> > bootable so that you can continue using the machine after the primary

>
> Are you sure you mean drives and not partitions? It is most unusual to
> mirror whole drives because raid devices are not partitionable
> themselves, and because the kernel relies on the *partition* typelabel
> at boot to know if it is a raid device or not.


That is precisely the problem. You create mirrored partitions. Update
your kernel a few times, then the primary drive breaks. You have
still have a copy of everything, but because grub didn't make the
drive containing the still-working mirror partition bootable, you
can't use it.

> Perhaps you are running lvm over the raid1 device, in order to provide
> partitions?


Well, that might be a problem if Redhat's installer would actually
install on lvm but I've never seen it work. It will install on
mirrors but leaves the mirror unbootable.

> I don't understand your question - why should you care if grub puts it
> there or not? YOU can put it there, using the "cp" command, if grub
> puts it anywhere at all. You will have more problem with getting grub to
> locate the second stage loaders physical location on disk!
>
> So, give us a clue, what *is* your problem, exactly?


As you've pointed out, it isn't simple to describe to grub how to
make the drive containing the spare partitions bootable, and after
going to the trouble and expense of mirroring the data it would be
nice to be able to use it when the primary drive fails. So, that is
the problem. Lilo seems to know enough about md devices to
make both mirrors boot. Grub doesn't, but it has some other
advantages and is now the default in a RedHat install. What does
it take to make grub know as much as lilo about md partitions? Or,
if grub can't do it, what command would you issue to make sure
the non-primary mirror will boot.

---
Les Mikesell
(E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID 1 recovering wwl725@yahoo.com Windows Networking 4 07-28-2009 03:27 PM
Best raid configuration... Cyphos Windows Networking 1 12-16-2005 10:00 AM
SATA Raid ping Windows Networking 1 09-12-2005 08:52 PM
RAID Armstrong Wong Windows Networking 0 11-23-2004 10:05 PM
Installation mit Raid Christian Berger Linux Networking 2 08-04-2003 04:23 PM



1 2 3 4 5 6 7 8 9 10 11