Linux Sysadmin Test Prep
Redundant Array of Independent Disks (RAID)
Redundant Array of Independent Disks (RAID)
Sofware RAID with mdadm (multiple disks admin).
Create
fdisk /dev/sdX(t fd; for each)partprobe -smdadm -C /dev/md0 -l1 -n2 /dev/sdX# /dev/sdY#(-Cis--create;-l1is--level=1;-n2is--raid-disks=2)cat /proc/mdstat
mkfs.ext4 /dev/md0mount /dev/md0 <MountPoint>For automount at boot:mdadm --detail --scan | tee -a /etc/mdadm/mdadm.confecho 'UUID=whatever /mnt/md0 ext4 defaults,nofail 0 0' | tee -a /etc/fstabFor early boot process availability:update-initramfs -u
Remove
mdadm --stop /dev/md0mdadm --remove /dev/md0cat /proc/mdstat
mdadm --zero-superblock -f /dev/sdX(for each)update-initramfs -u
Levels
| Level | Description | Min. Drives | Fault Tolerance |
|---|---|---|---|
| RAID 0 | Block-level striping; no parity or mirroring | 2 | None |
| RAID 1 | Mirroring; no parity or striping | 2 | None |
| RAID 4 | Block-level striping; dedicated parity | 3 | One Drive |
| RAID 5 | Block-level striping; distributed parity | 3 | One Drive |
| RAID 6 | Block-level striping; double distributed parity | 4 | Two Drives |
Edit this page on GitHub