RAID – Grow existing array…

Unmount the array, i don’t know if this is necessary, but doing so means less stuff to go wrong.
sudo umount /dev/md0

Then you need to go and prepare the disk(s) to be added. (The prepare section of the guide)

Then tell mdadm that it can play with it:
sudo mdadm --add /dev/md0 /dev/sda2

Then tell mdadm to stop playing and use it to expand/grow your raid5 array(make sure that the number of raid devices is correct, it should be the number of disks/partitions the grown/expanded array will have):
sudo mdadm --grow /dev/md0 --raid-devices=4

View and wait for the new array to reshape:
cat /proc/mdstat

Check the filesystem (required to resize it):
sudo e2fsck -f /dev/md0

Resize the filesystem on the new array so that you can use it for something useful.
sudo resize2fs /dev/md0

Mount the expanded/grown array with it’s resized filesystem(remember to change the mount point):
sudo mount -t ext3 /dev/md0 /home/tore/raid

Go check your files:
cd /home/tore/raid
cksfv -r -q


Create Raid0+1 Array w/ Mdadm (Striping & Mirroring)

Install mdadm
apt-get install mdadm

Create the fisrt striped set:

sudo mdadm –create –force /dev/md0 –level=stripe –chunk=4096 –raid-devices=2 /dev/sdc /dev/sdd

Create the second striped set:
sudo mdadm –create –force /dev/md1 –level=stripe –chunk=4096 –raid-devices=2 /dev/sde /dev/sdf

You now have two 2tb striped arrays. We now want to take those and tell mdadm to mirror them w/ Raid 1, hence the
name Raid0+1.

Raid 1 both of your stripe sets

sudo mdadm –create –force /dev/md2 –level=mirror –chunk=4096 –raid-devices=2 /dev/md0 /dev/md1

Partition the drive w/ fdisk

fdisk /dev/md2
-Create a new partition.
-Write to disk

Next, format the new drive

mkfs.ext3 /dev/md2

Finally, mount the drive and use!

mount -t ext3 /dev/md2 /mnt/raid1

View the details of the array…

mdadm -D /dev/md2

$ cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid0] [raid1]
md2 : active raid1 md1[1] md0[0]
1953521600 blocks [2/2] [UU]
[===========>………] resync = 59.3% (1160324480/1953521600) finish=973.8min speed=13574K/sec

md1 : active raid0 sdf[1] sde[0]
1953521664 blocks 4096k chunks

md0 : active raid0 sdd[1] sdc[0]
1953521664 blocks 4096k chunks

unused devices: