9
RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks.

RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

Embed Size (px)

Citation preview

Page 1: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

RAIDRAID stands for Redundant Array of Inexpensive (Independent) Disks.

Page 2: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

TYPES

• On most situations you will be using one of the following four levels of RAIDs.• RAID 0• RAID 1• RAID 5• RAID 10 (also known as RAID 1+0)

Page 3: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks
Page 4: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks
Page 5: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks
Page 6: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks
Page 7: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

RHEL MDADM -RAID (software)

• Install RAID Utility• yum install mdadm

• To Create RAID-0 (Stripe)• mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb /dev/sdc

• To create RAID-1 (Mirror)• mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sdb /dev/sdc

• To create RAID-5• mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd --spare-devices=1 /dev/sde1

*Note: Spare device is optional, raid will use incase of primary disk failure.• To create RAID-10

• mdadm --create /dev/md0 --level raid10 --name data --raid-disks 4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Note: Save your RAID configuration after you create & update.• mdadm --detail --scan >> /etc/mdadm.conf

• Use RAID device as regular device for LVM & file system creation• Example to use your RAID device:

• pvcreate /dev/md0• vgcreate raidvg /dev/md0• Lvcreate –n raid-lv –size 1G raidvg• mkfs –t ext4 /dev/raidvg/raid-lv• mkdir /raid• mount –t ext4 /dev/raidvg/raid-lv

Page 8: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

RAID operations:• To Stop the RAID device

• mdadm --stop /dev/md0

• To start the RAID device• mdadm --run /dev/md0

• To report detail RAID detail• mdadm --detail-platform

• To remove the failed disk• We can’t remove a disk directly from the array, unless it is failed, so we first have to fail it (if the drive it is failed this is normally

already in failed state and this step is not needed):• mdadm --fail /dev/md0 /dev/sda1

• Now you can remove it:• mdadm --remove /dev/md0 /dev/sda1

• Or you can do this in single step:• mdadm /dev/md0 --fail /dev/sda1 --remove /dev/sda1

• To add a new disk (after failed hardware replacement)• mdadm --add /dev/md0 /dev/sdb1

• To Verify:• cat /proc/mdstat

• Or • mdadm --detail /dev/md0

Page 9: RAID RAID stands for Redundant Array of Inexpensive (Independent) Disks

To delete the RAID (de-commission)

• First stop the RAID• mdadm --stop /dev/md0

• Remove the RAID permanently• mdadm --remove /dev/md0

• Note:• For lab purpose you can use standard partions (ex: /dev/sda1, /dev/sda2) as a devices for RAID