[sclug] Setting up SATA RAID for /home not / (Debian Lenny)

Keith Edmunds kae at midnighthax.com
Wed May 20 06:32:47 UTC 2009


On Wed, 20 May 2009 04:11:03 +0100, sclug at yaph.org.uk said:

> just 
> want to configure 2 SATA drives as a separate RAID

You set up RAID on a per-partition basis (usually). Assuming you
have /dev/sdc1 and /dev/sdd1 that you want at mirrored RAID (RAID 1):

# mdadm -C /dev/md0 /dev/sdc1 /dev/sdd1 -n 2 -l 1

which says:

mdadm - the RAID administration program
-C - create
/dev/md0 - the RAID devicd to create
/dev/sdc1 /dev/sdd1 - the members of the array
-n 2 - the number of disks in the array
-l 1 - the level of RAID (ie, RAID 1, mirroring)

Watch the array build with:

watch cat /proc/mdstat

...but you don't need to wait for it to complete before using it. After
creating:

# mke2fs -j /dev/md0 (or whatever filesystem you want)
# mount /dev/md0 /it/goes/here

Add /dev/md0 to /etc/fstab if desired.

That's it in a nutshell. There are more options to mdadm, such as having
spare drives, etc, but the above should get you started.

Regards,
Keith

-- 
Keith Edmunds

+-------------------------------------------------------------------------+
|    Tiger Computing Ltd    |  Helping businesses make the most of Linux  |
|  "The Linux Specialists"  |       http://www.tiger-computing.co.uk      |
+-------------------------------------------------------------------------+



More information about the Sclug mailing list