Page 1 of 1

Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/16 01:57:22
by Whoever
How do you force a re-sync/check of a RAID1 mirror?

Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/16 08:46:11
by TrevorH
There is a script run from /etc/cron.d/raid-check that is run every Sunday that does this. It ends up executing /usr/sbin/raid-check and if you read that, you can see how it triggers a check. You can also read /etc/sysconfig/raid-check

Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/17 01:58:55
by Whoever
I looked into what the script does, but the file doesn't exist:

Code: Select all

# echo "check" > /sys/block/md0/md/sync_action
-bash: /sys/block/md0/md/sync_action: Permission denied
# ls /sys/block/md0/md/
array_size   bitmap      component_size      dev-sdb  layout  max_read_errors   new_dev     rd0  reshape_direction  resync_start
array_state  chunk_size  consistency_policy  dev-sdc  level   metadata_version  raid_disks  rd1  reshape_position   safe_mode_delay
# more /proc/mdstat 
Personalities : [raid0] 
md0 : active raid0 sdc[1] sdb[0]
      1953260544 blocks super 1.2 512k chunks
      
unused devices: <none>


Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/17 08:16:44
by TrevorH
You can't check it because it's RAID 0 and there is no redundancy to check. It's not RAID 1.

Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/17 16:42:57
by Whoever
TrevorH wrote:
2020/06/17 08:16:44
You can't check it because it's RAID 0 and there is no redundancy to check. It's not RAID 1.
Thanks for pointing that out. I feel like a moron for thinking that it is RAID1.

Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/17 16:53:25
by TrevorH
Better to find out about RAID 0 vs 1 before it fails...

Re: Forcing a re-sync of a RAID1 mirror?

Posted: 2020/06/17 20:13:15
by Whoever
TrevorH wrote:
2020/06/17 16:53:25
Better to find out about RAID 0 vs 1 before it fails...
The data is transient. It would not matter if it failed ... that's why it's RAID0: for performance.