Sunday, July 04, 2021

ubuntu RAID 5 or 6 with missing drive(s)

some RAID configurations allow missing drives, for example, 5 or 6 or up.


say, raid 5 with 1 drive missing:


    $ cat /proc/mdstat


if mdadm drive is detected but inactive, stop it.


    $ sudo mdadm --stop /dev/md5


indicate using only 2 drives for read only.


    $ sudo mdadm --assemble --readonly /dev/md5 /dev/sdc1 /dev/sdd1


first time likely got error, force it


    $ sudo mdadm --run /dev/md5

    $ ls /dev/md5 


now exist


    $ sudo mount /dev/md5 /mnt


drive now readable.



when done


    $ sudo umount /mnt

    sudo mdadm --stop /dev/md5





Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home