Mike Frisch <[EMAIL PROTECTED]> writes:
> > If the drives are the same size, the following command works very well to
> > copy a partition table from one to the other:
> > dd if=/dev/sda of=/dev/sdb bs=1024 count=5
> I am curious to know if this can help in creating a RAID1 mirror from an
> existing single disk setup?  I would like to mirror the drive on my server
> without having to reinstall anything.

No, not really. The biggest problem with adding a mirror to an
existing system is that the RAID code needs a spare 4KB in the end of
each mirrored/otherwise-RAID partition for its own superblock, and the 
existing configuration most likely does not have that available (the
ext2 on the partitions of the first disk fills the partitions
entirely).

That being said, what you can do is install a special version of the
RAID kernel patches and toolset which understands a keyword
"failed-disk", partition the second disk exactly like the first one
(maybe the dd above helps there), initialize the RAID-1 setup so that
the system considers the first disk as failed, make filesystems on the 
RAID-1 volumes, copy all files over, reboot the system with root and
other volumes pointing to the RAID partitions, and then raidhotadd the 
partitions on the first disk. It sounds more complex than it really
is..

-- 
Osma Ahvenlampi

Reply via email to