Re: Replacing disk in Linux Software RAID 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nigel,

 --- Nigel Wade <nmw@xxxxxxxxxxxx> wrote: 
> Michael E. Webster wrote:
> > Michael,
> > 
> > Probably - I went with "ghost" because I had a
> boot floppy handy.
> 
> You should not need to ghost. Add the new drive as a
> hot spare and md should 
>   take care of building the new drive whilst the
> system is running (it does 
> need to be partitioned correctly first).

I wish I knew this before I did the work :) ... I
ended up using ghost but it would have been easier if
not I think.

What I ended up doing was purchasing two new drives,
popping one in, ghosting, then the next (while
removing the old) and re-ghosting. At the same time I
decided to use Partition Magic to extend my "/home"
partition as I needed the space (and since I had both
original drives I didn't mind stuffing things up since
I could then just pop in the old drives).

What I then found was that I needed to boot off rescue
and re-sync the mirrors.

When this completed, I re-booted and /home refused to
mount complaining that the partition table size and
the physical size were different. After alot of
googling, I found out this occured because software
raid (which partition magic doesn't recognise - I can
explain more here if requested) reserves some space at
the end of the partition for itself. I had to use the
"resize2fs" command to resize the md before it would
successfully boot.

> > The main thing is to get the MBR from that first
> drive - without it,
> > you're out of luck.  

Well, what I did was create a grub 0.93 boot disk,
from there I already had my grub.conf documented and
it was a simple procedure to:

grub> root (hd0,1)
grub> kernel blah blah
grub> initrd blah blah
grub> setup (hd0)

to get grub back on there.

> > In software RAID, the MBR is only written to the
> first drive, which
> > really doesn't make sense.  I would think that if
> you had the first
> > drive fail, you should be able to boot off the
> second one - IMHO.
> > 
> > 
> > Mike.
> > 
> > 
> 
> I don't think that's right.

That is right actually. What you'll find with grub is
if you pull out the first disk, the system won't boot
from the second. You have to put grub back onto the
MBR of the second to boot from it.

> In the case of lilo it writes MBRs such that each
> drive will boot from 
> itself, and either drive can work with the other
> removed. OTOH, due to the 
> way grub works, only one drive can be used as the
> boot device (each will try 
> to boot from the same drive).
> 
> At least this was the case in RH9 which is the
> latest mirrored boot system 
> I've setup. It's entirely possible that lilo has
> since been broken so that 
> it no longer handles booting from mirrored disks.

The above is current as of FC1, since I did all this
on my FC1 server.

Michael.


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux