Hi
Jocko wrote:about chunk yes you can change it without destroying the raid.
If you want to change the value, run this command
- Code: Select all
mdadm --grow --chunk=128 /dev/md0
But you should run it only when the check is complete and note this action takes more time than a check job (here around 4 days)
I did not notice you failed to change the chunk size on your raid
As it seems mdadm want a backup file to perform it on your raid,the new command is
- Code: Select all
mdadm --grow --chunk=128 /dev/md0 --backup-file=/rw_fs/md0-chunk-backup
Please to keep this location (backup not destroyed on nas rebooting and stored in a partition with enough free size)
Before running it check if your raid status is clean
root@Acrab:/ # mdadm --detail /dev/md0
/dev/md0:
Version : 1.0
Creation Time : Wed Dec 3 14:40:52 2014
Raid Level : raid5
Array Size : 11709457408 (11167.01 GiB 11990.48 GB)
Used Dev Size : 2927364352 (2791.75 GiB 2997.62 GB)
Raid Devices : 5
Total Devices : 5
Persistence : Superblock is persistent
Update Time : Sat Jan 30 10:15:17 2021
State : clean <-------------------- here
Active Devices : 5
Additional information,
- several days will be required to complete the action. So do not shut down your NAS while the chunk resizing action is in progress (to check it
- Code: Select all
cat /proc/mdstat
- mdadm may also create a bitmap cache. So do not remove it and when the action will complete you may run the command
- Code: Select all
mdadm --grow --bitmap=none /dev/md0
- I found this bitmap cache may also be created on a resync action when you have a degraded raid. I think it was the case previously with your raid
- about chunk resize, for your understanding:
Please note that changing the chunk size is a very slow process because this involves rewriting all data that is stored in the RAID array. As this is done in a way that ensures data safety even in case of a system crash, each piece of data actually has to be written twice. Therefore, you should expect this process to take quite a while (in the order of days).