Forcing a re-sync of a RAID1 mirror?

General support questions
Post Reply
Whoever
Posts: 1135
Joined: 2013/09/06 03:12:10

Forcing a re-sync of a RAID1 mirror?

Post by Whoever » 2020/06/16 01:57:22

How do you force a re-sync/check of a RAID1 mirror?

User avatar
TrevorH
Forum Moderator
Posts: 29694
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2020/06/16 08:46:11

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
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Whoever
Posts: 1135
Joined: 2013/09/06 03:12:10

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

Post by Whoever » 2020/06/17 01:58:55

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>


User avatar
TrevorH
Forum Moderator
Posts: 29694
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Whoever
Posts: 1135
Joined: 2013/09/06 03:12:10

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

Post by Whoever » 2020/06/17 16:42:57

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.

User avatar
TrevorH
Forum Moderator
Posts: 29694
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2020/06/17 16:53:25

Better to find out about RAID 0 vs 1 before it fails...
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Whoever
Posts: 1135
Joined: 2013/09/06 03:12:10

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

Post by Whoever » 2020/06/17 20:13:15

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.

Post Reply

Return to “CentOS 7 - General Support”