On Sunday 08 July 2007 09:25, Brandon Carl wrote: > Ok, I got as far as creating a raid 1 array for each partition on /dev/hdb. > > I created these: > /dev/md0 /dev/hdb1 / > /dev/md1 /dev/hdb3 /home > /dev/md2 /dev/hdb5 swap
Hello Brandon, I have been following the thread. So far, the biggest problem you face is that software raid need to be define at the very first stage in setting up partition type, in this case your original harddrive's partitions are not setup for software raid. You said that on the least possible solution is to get mirroring done for /home, so here's how it can be done: 1. If possible, back all the data in /home to another computer. If it's not possible, back it up to your new 250GB disk: 0. boot into init 1. And work as root. We need this because we will destroy /home in the process. 1a. Assuming that your /home takes 100GB, then set 2 partition in the new 250GB disk: 1 100GB as ordinary partition, and the rest is 150GB as fd (linux raid auto). 1b. format the 100GB partition in the new disk, and mount it to for example /tmpdata 1c. copy all the data in /home to /tmpdata 1d. umount /home 2. Now you are ready to setup the raid. 2a. repartition your /home using fdisk, and change the type to fd (please make sure that all data has been successfully copy to /tmpdata, otherwise it's gone forever). 3. setup raid array. Assuming your original /home is sda2, and the new 150GB in the new disk is sdb2, the command is: mdadm -C /dev/md0 -l 1 -n 2 /dev/sda2 /dev/sdb2 3a. monitor the raid building process: watch cat /proc/mdstat 3b. format it to any filesystem you want: mkfs.ext3 /dev/md0 3c. mount /dev/md0 as /home 3d. copy all data from /tmpdata to /home 3e. make sure the ownership and permission is correct in the new /home. Use chown, chmod if necessary. 4. Edit /etc/fstab to reflect the new setting: /dev/md0 /home ext3 acl,user_xattr 1 2 5. Reboot to test it. 6. If all is ok, congratulations! You have mirror your /home :) HTH, -- Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial http://linux2.arinet.org 12:06pm up 5:03, 2.6.18.2-34-default GNU/Linux Let's use OpenOffice. http://www.openoffice.org
pgpcF01b77dTl.pgp
Description: PGP signature