Goal: 4x RAID 6 arrays
Each array will consist of 10 disks + 2 spares.
For the first array:
Use fdisk to partition the HDs
Active: /dev/sd[b-k]
Spare: /dev/sd[l-m]
Examine the disks
mdadm -E /dev/sd[b-k]1
Create RAID 6 array
mdadm --create /dev/md0 --level=6 --raid-devices=10 /dev/sd[b-k]1
Create 2 spare disks
mdadm --add /dev/md0 /dev/sdl1 /dev/sdm1
Sanity check
cat /proc/mdstat
mdadm -E /dev/sd[b-m]1
mdadm --detail /dev/md0
Do the same for the remaining 3 arrays. Remember to save the mdadm config by
LVM
vgcreate vg1 /dev/md0 /dev/md1 /dev/md2
lvcreate -l 100%FREE -n lv1 vg1
mkfs.xfs /dev/vg1/lv1
mount -t xfs /dev/vg1/lv1 /mnt/test
In case of one array fails.
lvremove /dev/vg1/lv1
vgreduce vg1 --removemissing
#Remove the offending array, e.g /dev/md0
mdadm --stop /dev/md0
mdadm --zero-superblock /dev/sd[b-m]1
#Recreate the RAID array.
#Then add to vg1
vgextend vg1 /dev/md0
#Recreate the volume group and mount.
-------------------
References
http://www.tecmint.com/create-raid-6-in-linux/
http://www.thegeekstuff.com/2010/08/how-to-create-lvm/
https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/VG_admin.html
http://ubuntuforums.org/showthread.php?t=884556
No comments:
Post a Comment