linux software raid 5 quick guide

From thelinuxwiki
Revision as of 19:22, 30 March 2014 by Nighthawk (Talk | contribs)

Jump to: navigation, search

Here will create a raid 5 setup with three drives for redundant storage using mdadm (not raidtools). This example does not include putting your O.S. root partion on the raid device. It is only for a volume to be mounted by Linux which boots off of another device.

Number of drives: 3 Number of spare drives: 0 All drives same size All space used on all drives


Contents

kernel config

Check for support If your system has RAID support, you should have a file called /proc/mdstat. If you do not have that file, maybe your kernel does not have RAID support. For more info on configuring your linux kernel for software raid, go here


install mdadm

prepare disks

# fdisk -l /dev/sd[bcd]

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xa9c961d6
Device Boot Start End Blocks Id System
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xfff8a252
Device Boot Start End Blocks Id System
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xa2e90880
Device Boot Start End Blocks Id System

create three raid partions of equal size on 3 disks


Creating an array

Links

this guide is recommended by the linux kernel help... [Software RAID HOWTO]