Sorry for the typo.
The previous description of method a) is not working.
"mount /dev/md0" would get error; "fsck /dev/md0" also
gives error message.
But it seems there's a way to fix it.
I did a experiment using /dev/hda8 and /dev/hda8(this
one has data) to make raid-1 device, /dev/md0.
Here are the steps:
a) ;;specify /dev/hdc8 as failed-disk.
;; make sure both constituent partitions (/dev/hda8
and /dev/hdc8) are not mounted.
mkraid --really-force /dev/md0.
(the message will say /dev/hdc8 is a failed disk)
;; /proc/mdstat should indicate raid1 is running
using only /dev/hda8.
;; data is still in /dev/md0, which has only
/dev/hda8.
raidhotadd /dev/md0 /dev/hdc8
(this will sync hdc8 to hda8, thus the /dev/md0
will have the data we want to keep)
mke2fs -S /dev/md0
e2fsck /dev/md0
;;it will try to fix a lot of problems, and you
need to enter "y" to a lot of questions.
e2fsck /dev/md0
;; this time it should say "clean."
;;modify raidtab to specify /dev/hdc8 as
raid-disk.
(So next reboot will have /dev/md0 running
normally)
Let me know if I miss anything. Thanks.
Jason
---------------------------------------------------
Since raid stores information on state of the raid and
configuration of
a
raid device on each of the partitions (in the raid
superblock), the
raid
device is smaller than the physical partition. This is
why you MUST use
mke2fs on the raid device; you CAN NOT reuse the
pre-existing
filesystem
from one of the physical partitions for the raid
device.
>a) ;;specify /dev/hdc8 as failed-disk.
> mkraid /dev/md0.
> (the message will say /dev/hdc8 is a failed disk)
> ;; /proc/mdstat should indicate raid1 is running
>using only /dev/hda8.
>
> raidhotadd /dev/md0 /dev/hdc8
> (this will sync hdc8 to hda8, thus the /dev/md0
>will have the data we want to keep)
>
> ;;modify raidtab to specify /dev/hdc8 as
raid-disk.
> (So next reboot will have /dev/md0 running
>normally)
This does not work for the reason specified above.
Sooner or later
there'll
be an access to the last few K of the ext2 fileystem
which will fail
because the space is no longer accessible because the
space is occupied
by
the raid superblocks.
------------------------------------------
__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com