If you ask your self how to setup a mdadm raid 5 and LVM here is a quick Howto...
My Setup:
1x 4BG USB Stick for the OS Centos 6.3 64 bit.
1x HDD 160GB for temporary HDD work. so i don't have to start the idle raid every time...
3x 3TB HDDs for Raid 5.
Here are the commands i used for the partitioning + Raid 5 + LVM Setup.
Note 1: Do not use "fdisk" if i remember right it does not work with partitions larger then 2TB...
Note 2: Check your system and replace the below commands with your setup... (sdx, sdy).
Note 3: repeat Partitioning steps 2 - 7 for all your Raid Members.
Partitioning:
- yum install parted
- parted /dev/sda (see note 2)
- (parted) mklabel gpt
- (parted) unit TB
- (parted) mkpart primary 0.00TB 3.00TB
- (parted) print
- (parted) quit
Raid Setup:
- yum install mdadm
- mdadm --create /dev/md0 --level=raid5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
- cat /proc/mdstat (you will see that 1 drive is rebuilding. thats normal...)
- yum install lvm2.x86_64
- pvcreate /dev/md0
- vgcreate vgdata1 /dev/md0
- lvcreate --name lvdata1 -l 100%FREE vgdata1
- mkfs.ex4 /dev/vgdata1/lvdata1
No comments:
Post a Comment