Linux: convert mdadm raid0 in raid5

Reading the wiki Linux Raid doesn't seem possible convert a raid0 in raid5 without formatting and without losing the data but instead we can do this quickly and with a single command, for example we will convert a raid0 with two disks in a raid5 with three disks:

mdadm --grow /dev/md0 --level=5 --raid-devices=3 --add /dev/sdc --backup-file=/tmp/grow_md0.bak

 

 

Tags: