Difference between revisions of "linux software raid 5 quick guide"

From thelinuxwiki
Jump to: navigation, search
Line 1: Line 1:
Here will create a raid 5 setup with three drives for redundant storage.  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.   
+
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
  
== configure kernel ==
 
  
  
 +
== 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 [http://www.thelinuxwiki.com/index.php/linux_kernel_configuration_for_software_raid here]
  
  
 +
== install mdadm ==
 +
 +
 +
== prepare disks ==
 +
 +
# '''fdisk -l /dev/sd[bcd]'''
 +
<br>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
 +
  <br>Device Boot      Start        End      Blocks  Id  System
 +
<br>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
 +
  <br>Device Boot      Start        End      Blocks  Id  System
 +
<br>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
 +
  <br>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...
 +
[[http://www.tldp.org/HOWTO/html_single/Software-RAID-HOWTO/ Software RAID HOWTO]]
  
 
[[category:raid]]
 
[[category:raid]]
 
[[category:gentoo]]
 
[[category:gentoo]]

Revision as of 19:22, 30 March 2014

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]