Firstly You Have To Login With Localhost:-Root
Firstly We Have To Create Raid-1 And We Have To Join The Spare Devices With Raid-1
If We Join The Spare Devices With Raid-1 Then If Our 1 Hard disk Is Crash Or The Fault Come In The Hard Disk Then The Spare Devices Will Come To The Active Devices
Firstly We Have To Do The 4 Partition In The Hard Disk I Am Showing You In The Diagram
And Now Do This Type 4 Partition Like I Am Doing 100Mb Of 4 Partition In /dev/Sdb
Now Do The Coading Of Raid-1
# mdadm –create /dev/md0 –Level=1 –Raid-devices-2 /Dev/sdb1 /dev/sdb2 –spare-devices=2 /dev/sdb3 /dev/sdb4
# mdamdm –detail /dev/md0 {To Check The /dev/md0 Is Created Or Not}
Now If Our 1 Hard Disk Is Crashed Or Damage Then One Of The spare Devices Is Come To The Active Devices
Now I Am Going To Fault The 1 Hard Disk Like /dev/sdb1 Then 1 spare device Come To The Place Of Active device Without Getting Any Data Loss
# mdadm /dev/md0 –fail /dev/sdb1
This Is The Command Of Falling the 1 HardDisk
So As You Can See How We Can Add Spare Devices To The Raid-1