RAID Configuration in Linux

Raid level - 0 Stripping :- Converting two or more total number of disks into a single disk is called Stripping

Command for Creating Raid


mdadm -C /dev/md0 -l 0 -n 2 /dev/sda{5,6}

creating array ? Y

Formatting Raid Device

mkfe2fs -j /dev/md0

mkdir /ab

Mounting Raid Device under directory /ab

mount /dev/md0 /ab

df -h -- shows the mounted raid device on a folder

mdadm -D /dev/md0 -- shows the details of the raid-device

to stop a raid device first unmount

umount /ab

Stopping the Raid Device

mdadm -S /dev/md0 -- the raid device will be stopped

-------------------------------------------------------------------------------------------------------------

Raid level -1 Converting two disk into a single disk is called as mirroring

Creating Raid Device:

mdadm -C /dev/md0 -l 1 -n 2 /dev/sda{5,6}

creating array ? y

Formatting the RaidDevice:
mke2fs -j /dev/md0

mkdir /ac

mount /dev/md0 /ac


df -h shows the mounted filesystem on the raid system currentyly

mdadm -D /dev/md0 -- shows the details of the raid-device

to stop a raid device first umount the device

umount /ac

Stopping Raid Device:
mdadm -S /dev/md0 -- the raid device will be stoped

-----------------------------------------------------------------------------------------------------------------------------------------

Raid level -5 creating a stripped disk with parity

Creating Raid Device:

mdadm -C /dev/md0 -l 5 -n 3 /dev/sda{5,6} dev/sda7

creating array ? y

Formatting the RaidDevice:
mke2fs -j /dev/md0

mkdir /ad

mount /dev/md0 /ad

mdadm -D /dev/md0 shows the details of raid device

umount /ad

Stopping Raid Device:
mdadm -S /dev/md0 -- to stop a raid device.

 


Another articles: