Re: software raid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 07, 2006 at 12:52:35 -0500,
  Jeffrey Ross <jeff@xxxxxxxxxx> wrote:
> I'm looking for a howto guide that will allow me to convert my currently
> running system (FC6) from a non RAID system to a RAID-1 (mirror) system
> using IDE driver (hda and hdc) without loosing the existing data on the
> system.
> 
> Current partition table is:
> 
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/hda6              2972236    280372   2538448  10% /
> /dev/hda1               505604     14881    464619   4% /boot
> tmpfs                  1037684         0   1037684   0% /dev/shm
> /dev/hda7             58449748  10858968  44573776  20% /home
> /dev/hda2              5944440   2073532   3564068  37% /usr
> /dev/hda5              3765832    337868   3233580  10% /var
> 
> swap is on /dev/hda3

The software raid partition uses a bit of space at the end of a partition
to keep information about the array. So you will need to shrink the file
systems slightly.
If the two drives are the same size, I would suggest coping over the partition
table from hda to hdc and then change all of the partitions on hdc to
software raid (fd). If you reboot at that point the OS will see the
partitions. Then you can create a raid 1 partition with one member for
each partition. You will need to use the force option to do this. Then
you can create the appropiate file system on each partition. (This might
be mkfs.ext3 for ext3 and mkswap for swap.) Then you need to copy over
the files from the old partitions to the new ones. Probably copying the
file systems over is best done with a live CD. You can copy over each
file system from the hda partition to the corresponding md arrays.
You can then unmount the hda partitions and add the corresponding hda
partitions to the md arrays. You will also need to grow the md devices
so that both drives are used (when you first add a new partition to an
md array it will be a spare). Once the arrays are all synced you should
be able to reboot, thought you might want to install grub on hdc as well,
so that if hda fails you can boot off of hdc. Usually what I do for that
is have grub.conf set up to use an hd0 partition and then do
root (hd1)
setup (hd1)
to install the stage 2 stuff on the hdc MBR.
Then
root (hd0)
setup (hd1)
setup (hd0)
to have both MBRs use the first drive to boot. This way if hdc becomes the
first drive you can boot off of it.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux