RecentChanges TextFormattingRules AllWikiTopics OrphanedWikiTopics ToDoWikiTopics WikiLockList RSS Export2HTML WikiSearch SetUsername StartingPoints Home |
4ksector:raid1:lvm:xfs @May 7, 2011 10:39:04 PM
Notes of making two 2TB WD Cavair Green (WD20EARS) drives into a RAID 1, LVM, XFS set.These disks lie. They say they have 512 byte sectors, but they are actually 4096 byte sectors. So, even though we are going to partition the disk by 512 byte sectors we have to make the partition on boundaries of 8 of those sectors. PartitionUse fdisk -u to make the parition by sectors.Use the 'n' option to create a new partition. Start at sector 64 (devisable by 8) and continue to the end of the disk. Use the 't' option to change the partition to type 'fd'. Use the 'w' option to write the partition table out, and quit. Test the speed: sudo /sbin/hdparm -tT /dev/sda1 sudo hdparm -tT /dev/sda2 RAIDCreate the RAID1 (mirror set)sudo /sbin/mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[ab]1 Check it looks ok - possably echo that into /etc/mdadm/mdadm.conf: sudo /sbin/mdadm --examine --brief --scan --config=partitions Test the speed: sudo /sbin/hdparm -tT /dev/md1 LVMInitalise the Physical Volume:sudo /sbin/pvcreate /dev/md1 Test: sudo /sbin/pvdisplay Create the Volume Group: sudo /sbin/vgcreate -s 16M lvm-raid1_md1 /dev/md1 Test: sudo /sbin/vgdisplay lvm-raid1_md1 Create the Logical Volume: sudo /sbin/lvcreate -l 100%FREE lvm-raid1_md1 -n media Test: sudo lvdisplay /dev/lvm-raid1_md1/media |