Changes

Software RAID on Linux

2,131 bytes added, 18:07, 20 February 2017
The following lines were added (+) and removed (-):
== RAID 1 Example ==Software RAID is performed via the Linux kernel.  No RAID controller is required on the computer.  If the computer has a Linux compatible RAID controller then hardware RAID can be used.  Hardware RAID is not discussed here. == Software RAID 1 Example ==Each drive is the same size. Each drive needs to have identical partitions created. Using fdisk create a small partition of less than 1GB and use the remaining space for the second partition. Due this for each drive. The starting block will likely be at 2048, which is fine. Ensure that you use the same starting block and ending block on both.When specifying the ending block in fdisk new partition creation, you can specify the starting block as 2048 and then for the ending block specify a size in megabytes. Use the format beginning with the + sign. For 840MB enter "+840" when it asks for the ending block. Step Summary:#Create primary partition at the beginning of each of the two hard drives and of a small size such as 1GB or less.#Create another primary partition using the remaining disk space on each of the drives.#Use fdisk to convert partitions to a type needed for building the RAID array #The first partition will be used to mount /boot#The second partition will be used for SWAP space and / root.#Install Linux on the RAID partitionsWhen specifying the ending block in fdisk new partition creation, you can specify the starting block as 2048 and then for the ending block specify a size in megabytes. Use the format beginning with the + sign. For 840MB enter "+840" when it asks for the ending block.If you have 2 drives, /dev/sda and /dev/sdb fdisk /dev/sdaCreate Partitions with fdisk*    d - delete any existing partitions*    n - create a new partition fdisk /dev/sdbCreate Partitions with fdisk*    d - delete any existing partitions*    n - create a new partitionOnce again using fdisk go back into each drive and change the "type" of the partitions toNow use fdisk to convert partitions to a type needed for building the RAID array fdisk /dev/sda*    t - change the partition type to "fd". You can get a list of available types== RAID 5 Example ==== Software RAID 5 Example ==
Bureaucrat, administrator
16,192
edits