Configuring RAID5 w/ Spare?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 have a machine that supports 4 S-ATA drives. I have all identical
drives in each slot. I am asking for someone to please tell me how I
can create a RAID5 array on Linux and then also have the 4th drive
(/dev/sdd) as a hot spare for any of the three drives in the array /
volume?

I did the following:

/device = type @ parition size

/dev/sda1 = fd @ 100 MB (bootable for /boot)
/dev/sda2 = fd @ 1 GB (Going to be used for Swap)
/dev/sda3 = fd @ 300 GB (Going to be used for /)

Now I make the same thing for /dev/sdb & /dev/sdc. I DON'T PARTITION
OR FORMAT /dev/sdd.

Now I am creating my RAID and this is where I am confused. How do I
correctly issue the 'mdadm' command to create the volumes for my
filesystem and also utilize /dev/sdd as a hot spare?

(/boot)

mdadm --create /dev/md0 --level=1 --raid-devices=3 /dev/sda1 /dev/sdb1
/dev/sdc1 --spare-devices=1 /dev/sdd
(Swap)

mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda2 /dev/sdb2
/dev/sdc2 --spare-devices=1 /dev/sdd
(/)

mdadm --create /dev/md2 --level=5 --raid-devices=3 /dev/sda3 /dev/sdb3
/dev/sdc3 --spare-devices=1 /dev/sdd
Is that correct above or would I 1st have to partition the /dev/sdd drive?
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux