Author: admin

~ 28/11/09

how to install ubuntu server on raid 10

Provided you have 4 hard drives,

boot on any live disk
open a console

Partition your four disk all the same

Repeat these steps for your four disks,
using the appropriate devices: e.g. sda, sdb, sdc, sdd,

fdisk /dev/sda
n p 1 (and pick enough space for boot)
t 1 fd (makes the partition Linux auto array)
a 1 (makes the partition bootable)
n p 2 (and pick most of space, leave enough for swap on the next one)
t 2 fd
n p 3 (and pick the rest of space, this one will be swap)
t 3 fd
w (writes partition table and exits)
(repeat for sdb, sdc, sdd)

so now you’ll have /dev/sda1 /dev/sda2 and /dev/sda3
and so on for sdb sdc and sdd after doing partitioning for all the four disks,

now create the raid devices,

mdadm –create /dev/md0 –level=1 –raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
(these are all the bootable ones, will be set for /boot later, note that is array 1 )

mdadm –create /dev/md1 –level=10 –raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
(these are for /, will be set later)

mdadm –create /dev/md2 –level=10 –raid-devices=4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
(these are the swap)

Note that you create a 5 with one spare as well,

# mdadm –create /dev/md1 –raid-devices=3 –spare-devices=1 –level=5 /dev/sd[a-c]1

And so on

now format the array devices
just format them,
do not ever think on putting a partition on top of an md device

mkfs.ext3 /dev/md0
mkfs.ext3 /dev/md1
mkswap /dev/md2

after that,
reboot using your install drive,
when going to partition, select manual,
it won’t see the devices,
click on manage array options and then on finish,
this is so the installer loads the array tools,
it will go back to partition dialog and will show the three devices devices now,

pick the first one, tell to use ext3 and mountpoint /boot
pick the second one, tell to use ext3 and mountpoint /
pick the third one, use as swap

note that you don’t need to format, because you already did.
and if you try formatting it will confuse the installer.

ok with the warnings and it will install like nothing happened
will boot from /dev/md0 which is an array 1 without problems,
and will use the rest of the system as array10

Post tags:

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.