administration:system-mirror
This is an old revision of the document!
Mini Raid Software howto
Prologue
- with the instructions that follow we move a complete root system disk from bare partitions to a raid 1 software layer.
- all the work is done without putting the server off-line.
- only one reboot process is needed if the disks are already installed on the server.
Preparing the system
We will move the system disk of a linux system from a standard partition scheme, to a raid 1 system withous
We suppose that the second disk is already installed and that the partition Table is empty
- /dev/sda: is the original disk from where the system boot
- /dev/sdb: is the second disk
- we need to create the correct partitions we need:
- 100 MB for the boot partition
- 2Gbyte for the swap partition (there's no need to put the swap partitions on a raid system)
- rest of the space disk for the root and others partitions
start fdisk and follow these commands
fdisk /dev/sdb n p 1 [enter] +100M n p 2 [enter] +2048M n p 3 [enter] [enter] t 2 82 t 3 fd w
- now we need to create the raid 1 partitions for the boot and the other partitions
- /dev/md0 will be the first raid 1 partition used only by the /boot directory
- /dev/md1 will be the raid 1 disk used for everything else
<code> mdadm –create /dev/md0 –level=1 –raid-devices=2 missing /dev/sdb1 mdadm –create /dev/md1 –level=1 –raid-devices=2 missing /dev/sdb3
administration/system-mirror.1205347201.txt.gz · Last modified: 2008/03/12 18:40 (external edit)