Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Friday, October 1, 2010

ubuntu Desktop live CD and fakeRAID-1

FakeRAID howto
RAID-1


/!\ You should be aware that dmraid (especially the dm-raid1 target of the device mapper) currently (including kernel version 2.6.17) supports the mirroring with RAID-1, but it has no error handling. When a block on one disk fails a failure reaches up to the application level, currently it doesn't try to read from the second disk. It only mirrors all data to the second disk.
So it secures the system from data loss, but the system can nonetheless crash. There exists patches for the 2.6.17 kernel series which enables a higher read speed and error handling in failure case, but until now they are not incorporated.
External links regarding RAID-1: Running Ubuntu On a Fakeraid/1 array described how to adapt the original HOWTO to a RAID-1 (mirroring) array.

Ubuntu 9.10 ( Karmic Koala)

The automatic installer may or may not work out of the box. When I tried it, it didn't work the first time and I had to manually install dmraid. But it did work the second time on the same machine, (with disks that had been wiped) The problem appears to be installing grub2
Use the LiveCD method
* Boot the system with the Live CD
* Run the partitioner program gpartd (System->Gpart)
9.10 loads dmraid automatically so you should see for a disk device
/dev/mapper/pdc_feddabdf or some suchlike
if dmraid detected and can use a fakeraid partition
* Setup an extended partition using whatever space your going to allocate for Ubuntu or the entire drive. Setup a minimum of 2 logical partitions in the extended partition, the first will be formatted ext4 and the last swap. Set the type on the swap partition to swap. Format the first partition. Exit gpart
* Run the installer. When it gets to it's partitioner, change the mount point on the first partition to / DO NOT format it! Do NOT make any partition changes! The installer partitioner does not understand dmraid partitions properly
* In the installer summary screen right before the copy process starts, click the Advanced button. Change the boot partition (this is the MSDOS-style "parent" partition not the Linux partitions) to /dev/mapper/pdc_feddabdf (or whatever dmraid lists as your fakeraid partition) Make sure the checkbox is clicked to boot from this disk. note that the installer will modify grub2 to point to the correct logical partition /dev/mapper/pdc_feddabdf1 or whatever / is on.
* When the installer finishes DO NOT REBOOT, the new system will be mounted on /target. If you rebooted then run the terminal screen and mount the /dev/mapper/pdc_feddabddf4 (root) partition (this is the target the installer put the root on) on some convenient directory (/tmp/tmp or some such) chroot that directory (/target or whatever it's mounted on)
* Run the command "apt-get install dmraid" If your lucky you will get a message back saying that the system didn't need to do anything as the installer will have correctly built initrd for grub to include dmraid. Otherwise this will update dmraid and rebuild the grub init to load dmraid. Exit the terminal and click reboot, or type "shutdown -r now" at the terminal window
* When the system comes back up login and verify that /dev/mapper/pdc_feddabdf (or whatever dmraid names your fakeraid) exists, and use df to verify that the system is mounted on it. (it will say it at the top)

tecnicambalandia ...dmraid-on-ubuntu

use Clonezilla, a software especially made to copy partitions and entire drives.

No comments: