At 21:10 17.04.00, you wrote:
>Assmuming /dev/hda7 contains the needed data and
>/dev/hdc8 is 2nd partition. We want to make a raid1
>device /dev/md0 on top of /dev/hda8 and /dev/hdc8.
If this is true:
none of the partitions to use as part of the raid array contain data;
create raid device without using failed-disk, mke2fs raid device and copy data.
If the above is a typo and you actually want to keep the data on /dev/hda8:
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.
>b) ;;specify /dev/hda8 as failed-disk.
> mkraid /dev/md0.
> (the message will say /dev/hdc8 is a failed disk)
> ;;/proc/mdstat should indicate raid is running
>using only /dev/hdc8.
mke2fs /dev/md0
> ;;copy contenet of /dev/hda8 to /dev/md0
change configuration to mount / boot the new /dev/md0 device. reboot to
check if it actually works. only AFTER everything is checked out and
confirmed to work OK (without accessing the old /dev/hda8 partition)
continue with
> raidhotadd /dev/md0 /dev/hda8
> (hda8 will be sync'ed to hdc8. That's OK, because
>both have the same contenet now)
> ;;modify raidtab to specify /dev/hda8 as raid-disk.
>Apparently method a) is a little easier.
>Hope this will help others who are trying to do the
>same thing.
As stated, a) won't work and will result in file system errors sooner or
later. The only case where it might work is if you use some additional
utility to shrink the ext2 filesystem to make room for the superblock - I
don't have personal experience with this approach though.
Bye, Martin
"you have moved your mouse, please reboot to make this change take effect"
--------------------------------------------------
Martin Bene vox: +43-316-813824
simon media fax: +43-316-813824-6
Andreas-Hofer-Platz 9 e-mail: [EMAIL PROTECTED]
8010 Graz, Austria
--------------------------------------------------
finger [EMAIL PROTECTED] for PGP public key