Koozali.org: home of the SME Server

Damaged Software-RAID

gery

Damaged Software-RAID
« on: February 21, 2005, 07:53:28 PM »
Hope you can help me.
Ist there a way to repair /dev/md1.
It contained /dev/hda2 and /dev/hdc2.

# This raidtab was generated by lsraid version 0.7.0.
# It was created from a query on the following devices:
#       /dev/md0
#       /dev/md1
#       /dev/md2
#       /dev/hdc
#       /dev/hdc1
#       /dev/hdc2
#       /dev/hdc3
#       /dev/hda
#       /dev/hda1
#       /dev/hda2
#       /dev/hda3

# md device [dev 9, 0] /dev/md0 queried online
raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              64

        device          /dev/hda1
        raid-disk               0
        device          /dev/hdc1
        raid-disk               1

# md device [dev 9, 1] /dev/md1 queried online
raiddev /dev/md1
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              64

        device          /dev/hda2
        raid-disk               0
        device          /dev/null
        failed-disk             1

# md device [dev 9, 2] /dev/md2 queried online
raiddev /dev/md2
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              64

        device          /dev/hda3
        raid-disk               0
        device          /dev/hdc3
        raid-disk               1

Offline pfloor

  • *****
  • 889
  • +1/-0
Damaged Software-RAID
« Reply #1 on: February 21, 2005, 09:30:01 PM »
[Post erased by pfloor]
In life, you must either "Push, Pull or Get out of the way!"

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Damaged Software-RAID
« Reply #2 on: February 22, 2005, 01:41:12 AM »
You might want to take a look at this thread which seems to match your circumstances:

http://forums.contribs.org/index.php?topic=25747.msg104375#msg104375
--
Nick......

Offline Reinhold

  • *
  • 517
  • +0/-0
    • http://127.0.0.1
Damaged Software-RAID
« Reply #3 on: February 23, 2005, 10:55:46 AM »
gery,

Since you can (obviously) boot and
since the system (obviously) works (albeit in degraded mode = limping with 1 of 2 disks working)
you basically seem to have "no immediate operational" problem (right now).

Here is your problem:
A single partition of md1 is dead:
Quote
device /dev/hda2
raid-disk 0
device /dev/null
failed-disk 1


should be:
Quote
device /dev/hda2
raid-disk 0
device /dev/hdc2
raid-disk 1


Let's first assume hdc2 was just "kicked out" briefly...(you may check your syslog ...)
Log into the SME with putty, try (omit #):
# cat /proc/mdstat  >dataa.txt
(just to save)
# /sbin/raidhotremove /dev/md1 /dev/hdc2
# /sbin/raidhotadd /dev/md1 /dev/hdc2
then check:
# cat /proc/mdstat
if you see a (U_) (not working) then save things to (maybe) show us:
# cat /proc/mdstat >datab.txt
save the partition data:
# fdisk -l > datac.txt

If the raid1 called md1 works = fine
... it may however happen again and you find out the reason (CABLE ?!) or better buy a new 2nd disk ...
install new hd on IDE1 master (where is your CD-ROM?)... boot direct to single user or
# shutdown now
# fdisk /dev/hdc
...identical to hda incl. the all important raid label "fd" on hdc1 hdc2 hdc3  (maybe more)
Now either reboot - and look that it's resyncing with
# cat /proc/mdstat
(it should !) or manually
# /sbin/raidhotadd /dev/md0 /dev/hdc1
# /sbin/raidhotadd /dev/md1 /dev/hdc2
# /sbin/raidhotadd /dev/md2 /dev/hdc3

If things don't turn out ...give us more data (as shown).

Regards
Reinhold
P.S.: Install the DarrellMay "Raidmonitor" stuff - it helps in a standard SME configuration as yours (seems to be)...
............

gery

Everythings OK again
« Reply #4 on: February 28, 2005, 11:17:35 AM »
Thank you, Reinhold.
Everything is OK again.
Your tips helped me a lot.