by hankivy » Jun 30th, '14, 03:59
I have four backups of my data on the old system.
And two brand new identical disk drives.
I want all of my data, including the /boot partition, to be mirrored as RAID1.
I want Mageia 4. And get there via only Mageia utilities.
I have the "Mageia 4 Live" DVD, and the "Mageia 4" DVD.
Boot Mageia 4 Live, pick language, etc.
Launch DiskDrake, and enter Expert mode.
Repeat the following paragraph for both disk drives:
Clear all partitions. Now both drives only have an empty Partition table.
DiskDrake says "Partition table type:table::dos".
Create /boot partition, first sector 2048, type Linux RAID, size 8GB, (Pick your own size, PYOS.) [The device names of the /boot partitions will be sda1, and sdb1. DiskDrake will only know the partitions by their device names, until we add Mount Points. Optionally, we could add labels.] (I am leaving space at the beginning of the disk for a future GUID Partition Table, GPT; or GRUB2.)
Create partitions, type Linux RAID, PYOS, for / (aka root).
Create swap partition, type SWAP, size 8GB, PYOS.
Create partitions, type Linux RAID, PYOS, for /usr, /var, /tmp, /home, etc.
[For legacy reasons, I put the /boot, and / partitions at the beginning of the disks.]
Select the / partition on one drive, and click "Add to RAID".
(The system will ask "Do you want to install the mdadm package?" Say yes.)
Put the partition into a new md device.
Select the / partition on the other drive, and click "Add to RAID".
Put this partition into the md device that was just created.
Select the newly created md device on the raid tab. Label it, pick a partition type like EXT4, and format it.
[The label just helps to bring order to potential chaos, and document our method. We will not tell the system the mount points until later. The labels remind us which mount point we meant to use for the partition.]
Repeat the paragraph above for all of the other pairs of partitions, EXCEPT /boot, and SWAP.
(We could have, but I choose not to use RAID1 for the SWAP space partitions.)
[The "Add to RAID" button action created RAID metadata, version 1.20 in the pairs so far.
We need RAID metadata, version 0.90 in the /boot partitions.]
Close the DiskDrake window.
Launch a console window, aka Konsole, or Command Line Interface, or terminal.
If you need to be the super, or root user; use the command: "su root".
$ su root
# ls -l /dev/md*
[Pick an unused md device number similar to the listing above; like /dev/md6, or /dev/md126]
# mdadm --create /dev/md6 --metadata=0.90 --raid-devices=2 --level=raid1 /dev/sda1 /devsdb1
# sync ; sync
[The command line above would force all pending writes to disk to complete on some legacy systems. I do not know a better way in Mageia.]
Launch Diskdrake, and enter Expert mode.
Select the raid device (tab), and the /boot partition.
Set the type of the /boot partition.
Label the /boot partition as desired.
Format the /boot partition.
Verify that the partitions all look as desired.
Shutdown Mageia 4 Live.
Boot "Install Mageia 4" from the Mageia 4 DVD.
Go through the install process.
When you are asked about disk partitioning, select "Custom Partitioning".
All of the partitions should be like you want them.
Select the raid tab to see all of the raid partitions.
Set the mount points of the partitions.
Select "Done".
Finish the install process.