How to Create RAID in Linux - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Friday, September 5, 2014

How to Create RAID in Linux

RAID
###RAID###
Features:
 1. The ability to increase availability and reliability of data
      (originally redundant array of inexpensive disks; now commonly redundant array of independent disks)
Tasks:
 1. Create a RAID-1 Device (/dev/md0..n)
  a. fdisk /dev/sdb - to create usable raw partitions
  b. partprobe /dev/sdb - to force a kernel update of the partition layout of the      disk: /dev/sdb
  b. mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb5 /dev/sdb6
  c. cat /proc/mdstat - lists active RAID (md) information
  d. mke2fs -j /dev/md0 - overlays a file system on the RAID device
  e. mount /dev/md0 /raid1
  f. update: /etc/fstab

Note: use 'mdadm --query /dev/md0' to get information about a RAID device

Note: You may create RAID volumes/devices on a single or on multiple disks
Ideally, your RAID volumes should span multiple physical disks to improve:
 a. reliability
 b. performance
 c. availability

 2. Remove the RAID-1 device
 a. umount /dev/md0
 b. mdadm --manage --stop /dev/md0

 3. Create a RAID-5 Volume
 a. fdisk /dev/sdb - to create a partition number 7
 b. partprobe /dev/sdb - to update the kernel's view of the partition table
 c. mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb5 /dev/sdb6 /dev/sdb7
 d. watch cat /proc/mdstat - refreshes every 2 seconds
 e. Overlay a file system: mke2fs -j /dev/md0
 f. mount /dev/md0 /raid5
 g. Test I/O to RAID-5 device
 h. Update: /etc/fstab

Thanking You
Hope U Like it.....

Fedora 20 in Virtual box

Roboform in linux

Ubuntu server 12.04

Nagios 4.0.7

Oracle Linux 7
Free BSD 10