raid, linux, md

General information

The Software-Raid HowTo:   http://tldp.org/HOWTO/Software-RAID-HOWTO.html

How to create a software-raid with ubuntu

The main tool is mdadm http://en.wikipedia.org/wiki/Mdadm#Types_of_MD_device

In Ubuntu 11.04 (Desktop edition) one has to install it manually during the live session. Then one can use

sudo mdadm –create /dev/md0 –level=mirror –raid-devices=2 /dev/sda1 /dev/sdb1

To remove the array again one can use

sudo mdadm –remove /dev/md0

To check the status of the array use

sudo mdadm –detail /dev/md0

Grub installation problem

I configured a software-raid (fdisk)

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        5100    40960000   83  Linux
/dev/sda2            5100        5610     4096000   82  Linux swap / Solaris
/dev/sda3            5610      121602   931704832   83  Linux

And cat /proc/mdstat gives

Personalities : [raid1]
md1 : active raid1 sdb3[1] sda3[0]
931703672 blocks super 1.2 [2/2] [UU]
[====>…………….]  resync = 23.0% (215158720/931703672) finish=113.6min speed=105109K/sec

md0 : active raid1 sdb1[1] sda1[0]
40958904 blocks super 1.2 [2/2] [UU]

unused devices: <none>

And I partioned the md-drives again

ls /dev/md
md0    md0p1  md1    md1p1

Then I had problems installing grub   http://osdir.com/ml/debian-bugs-dist/2011-02/msg04477.html

sudo grub-install –recheck –root-directory=/media/hdd /dev/md0p1
/usr/sbin/grub-probe: error: no such disk.
Auto-detection of a filesystem of /dev/md0p1 failed.
Please report this together with the output of “/usr/sbin/grub-probe –device-map=”/media/hdd/boot/grub/device.map” –target=fs -v /media/hdd/boot/grub” to <bug-grub@gnu.org>
ubuntu@ubuntu:/$ grub-install –version
grub-install (GRUB) 1.99~rc1-13ubuntu3

About Installing Ubuntu 11.04

The setup program is called  ubiquity, see https://wiki.ubuntu.com/Ubiquity

It crashed because it could not install grub.

Due to the installing problem I formated the disks by hand using

sudo mkfs -t ext4 /dev/md0

sudo mkfs -t ext4 /dev/md1

and not using gparted (gparted did not recognize my md0/md1 drives). Then after restarting the installer and choosing manual configuration I could install everything.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: