md (software RAID) and lvm (logical volume management)
md
Building a RAID array using mdadm - two primary steps:
- mdadm --create to build the array using available resources
- mdadm --detail --scan to build config string for /etc/mdadm/mdadm.conf
Simple examples:
RAID6 array
Set up partitions to be used (in this case the whole disk):
# for x in /dev/sd{b,c,d,e,f}1 ; do fdisk $x ; doneCreate the array (in this case, with one hot-spare):
# mdadm --create /dev/md0 --level=6 --raid-devices=4 --spare-devices=1 /dev/sd{b,c,d,e,f}1Configure the array for reboot (append to the end of /etc/mdadm/mdadm.conf):
# mdadm --detail --scan ARRAY /dev/md/0 metadata=1.2 spares=1 name=debian6-vm:0 UUID=9b42abcd:309fabcd:6bfbabcd:298dabcd
Considerations when setting up the partitions might be that any replacement disks will need to support that same size partition. Unconfirmed but it sounds like it might be a reasonable concern: "Enter a value smaller than the free space value minus 2% or the disk size to make sure that when you will later install a new disk in replacement of a failed one, you will have at least the same capacity even if the number of cylinders is different." (http://www.jerryweb.org/settings/raid/)
RAID1 array
lvm
TODO
