NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Sandshark's avatar
Sandshark
Sensei - Experienced User
Jun 11, 2020

RAID6 to RAID5 without volume re-creation is possible

In keeping with my list of how-to's to get around some things the GUI does not let you do, here is how to switch from RAID6 to RAID5 without destroying and re-creating the volume.  This wasn't even an experiment.  I decided I didn't really need RAID6 on my backup NAS and wanted to add the space taken up by the second redundant drive.  Mine is a 12-bay that's full, but the command should work equally well with a smaller one, just specify the right number of drives.

 

Note that I have only done this on a NAS containing a single RAID group.  I don't recommend you try on one with more than one, as I don't know what BTRFS will do with it.  Note that if you decide to try anyway, you won't be able to switch back to XRAID when you are done because you have two RAID groups.

 

I always switch to FlexRAID when doing such things so XRAID doesn't try to "help" me.  After that, I just went to SSH and issued:

 

mdadm  --grow  /dev/md127  --level=5  --raid-devices=12  --force  --verbose

The --force may not be necessary.  The --verbose definately isn't, but I like to do it.  It did report at the end that it was successful and the volume was now RAID5, which it won't without that option.

 

When it was done, the BTRFS volume automatically expanded to fill the larger volume, the GUI picked up that it was RAID5 instead of RAID6, and I could change back to XRAID, all without even a re-boot.  But I did re-boot, and all is still well.

 

So if your NAS changed from RAID5 to RAID6 because you crossed the threshold that XRAID uses to do that automatically, but that was not your intent, it is easy to fix.  Of course, the right way is to switch to FlexRAID before adding the drive, add it manually keeping RAID5, then re-enable XRAID (if you so desire).

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More