On  7 Jan, [EMAIL PROTECTED] wrote:
>  Any additional pointers, reassurance ;) etc appreciated. 

Looks fine to me.  I see that my chunksize is bigger than yours, FWIW:

raiddev             /dev/md0
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
nr-spare-disks              0
    device          /dev/hda6
    raid-disk     0
    device          /dev/hde6
    raid-disk     1
raiddev             /dev/md2
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
nr-spare-disks              0
    device          /dev/hda7
    raid-disk     0
    device          /dev/hde7
    raid-disk     1



This old info, below, might contain something of use.  Oh, and I had
trouble making an initrd image that works, so I gave up on that, and
just built a kernel with raid support (and ext3 support too, for that
matter) built in, instead of as modules.

     From: [EMAIL PROTECTED]
 Subject: Restoring a RAID mirror
    Date: Tue, 12 Nov 2002 21:44:55 +1100 (EST)
      To: Sydney Linux Users Group <[EMAIL PROTECTED]>

Just thought I'd pass on the info below.  Also, if anyone running Red
Hat 8.0 could do a man raidhotadd and let me know whether the program
has a man page or not, I'll know whether or not to submit a bug report
to RH about the missing man page.  (I'm on RH 7.2.)

Recovering a RAID mirror is easy, as it says here
http://www.kieser.net/linux/raidhotadd.html or here
http://www-106.ibm.com/developerworks/linux/library/l-raid2/index.html

Basically, if you cat /proc/mdstat and see stuff like 

md2 : active raid1 hda7[0]
      29567488 blocks [2/1] [U_]

The U_ means only 1 volume is up (active), the other is down, and the
raid is running in degraded mode.  If you dmesg | more you'll find
messages to that effect.

Once you've sorted out the problem that lead to the partition from being
dropped from the raid array in the first place, then you use raidhotadd
to copy the good data from the active volume onto the other, on a
running system.  You can even cat /proc/mdstat to see the recovery 
progress.

You use /proc/mdstat and/or dmesg to work out what partition is out of
date.  Check that by looking at /etc/raidtab too.  In my case /dev/hde6
(the root partition on /dev/md0) and /dev/hde7 (/home on /dev/md2) need
to be brought back into the raid set.  Make sure the old or new
partition is big enough.  Ideally it should be the same size as the
working volume.

So, in my case I simply do this:

# /sbin/raidhotadd /dev/md0 /dev/hde6
# /sbin/raidhotadd /dev/md2 /dev/hde7

Being cautious, I watched /proc/mdstat until the first rebuild finished
before starting the second one.  But that's just me being careful.

# cat /proc/mdstat
Personalities : [raid1] 
read_ahead 1024 sectors
md0 : active raid1 hde6[1] hda6[0]
      3076352 blocks [2/2] [UU]
      
md2 : active raid1 hde7[2] hda7[0]
      29567488 blocks [2/1] [U_]
      [>....................]  recovery =  0.2% (70060/29567488) finish=49.0min 
speed=10008K/sec
unused devices: <none>

Easy as pie!

Also, since replacing motherboard, CPU, and memory, the system has been
3 days without a crash.  It's starting to feel like a normal Linux
system again.  Soon, I'll try running X11 in 1600x1200 mode again.

luke



-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to