![]() ![]() The loop0 device in the output of mdstat is now marekd with (F) flag. ![]() Md0 : active raid6 loop3 loop2 loop1 loop0(F) But what happens if a disk fails? To simulate a failure, mark any disk as failed (you need to mark a disk as failed in real environment too before you cann substitute it): You can use the device /dev/md0 now to create your parttitions etc. Md0 : active raid6 loop3 loop2 loop1 loop0Ģ61120 blocks super 1.2 level 6, 512k chunk, algorithm 2 # mdadm -create /dev/md0 -level=raid6 -raid-device=4 /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 With the four loop devices you can create a RAID6 softraid now: Next use losetup to attach the files as loop devices: The four commands above will create four empty files with each 128 MB in size. recovery = 54.2% (71452/130560) finish=0.0min speed=35726K/secĪfter a while the recovery is complete and /dev/loop3 is a part of the array:įor a RAID6 you need at minimum 4 disks. If you check mdstat now you'll see the recovery process of the new disk: Mdadm: hot removed /dev/loop2 from /dev/md0īefore you can add a new disk, you need to create one more disk: The loop2 device in the output of mdstat is now marekd with (F) flag. Md0 : active raid5 loop2 loop1 loop0Ģ61120 blocks super 1.2 level 5, 512k chunk, algorithm 2 # mdadm -create /dev/md0 -level=raid5 -raid-device=3 /dev/loop0 /dev/loop1 /dev/loop2Ĭheck that the softraid device md0 is setup: With the three loop devices you can create a RAID5 array now: Next use losetup to attach the files as loop devices:Ĭheck that the loop devices are available: The four commands above will create three empty files with each 128 MB in size. This part covers the following topics:įor a RAID5 you need at least 3 disks. This is the second part of my mdadm tutorial. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |