First a little backstory of what I'm doing, scroll down to the bottom of this post to see my question.
My raid5 array has gotten a bit big, it's containing total 10 drives right now (I started out with 3 drives). So I am going to convert it to raid6 before it gets any bigger.
I am doing a test-run on a virtual machine with virtual drives to see that everything works flawlessly.
I created a raid5 array and then added a drive to it
Code:
mdadm --add /dev/md0 /dev/sdf1
Then I went ahead and tried to convert the array from raid5 to raid6 with this:
Code:
mdadm --grow /dev/md0 --raid-devices=5 --level=6
Then I got this error message:
Code:
mdadm level of /dev/md0 changed to raid6
mdadm: /dev/md0: Cannot grow - need backup-file
mdadm: aborting level change
So I went ahead and looked it up in the manpage.
Quote:
When relocating the first few stripes on a RAID5 or RAID6, it is not possible to keep the data on disk completely consistent and crash-proof. To provide the required safety, mdadm disables writes to the array while this "critical section" is reshaped, and takes a backup of the data that is in that section. For grows, this backup may be stored in any spare devices that the array has, however it can also be stored in a separate file specified with the --backup-file option, and is required to be specified for shrinks, RAID level changes and layout changes. If this option is used, and the system does crash during the critical period, the same file must be passed to --assemble to restore the backup and reassemble the array. When shrinking rather than growing the array, the reshape is done from the end towards the beginning, so the "critical section" is at the end of the reshape.
|
I went ahead and added another spare but got faced with the same error message about the missing backup file.
Went ahead and added a backup file flag
Code:
mdadm --grow /dev/md0 --raid-devices=5 --level=6 --backup-file=~/backupfile
And that worked fine, I've now got a fully working raid6 setup on my virtual machine.
My question is, how big is this backup file going to be? My real raid array consists of 2tb drives, will the backup file be as big as one drive in the array, or will it just be few megabytes or gigabytes?
I'm asking because I'm wondering if I need to buy an extra hdd for the backup file or if the backup file can just be on my OS hdd that has around 100gb free.