Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


synology_raid_verify

Synology - verify RAID

These steps below verifies the consistency of RAID, but not if the contents of data is correct!

  • Find the RAID (md) device you want to check:
    cat /proc/mdstat 
    Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
    md2 : active raid6 sda3[0] sdgd3[7] sdgc3[6] sdgb3[5] sdga3[4] sdd3[8] sdc3[2] sdb3[1]
          11692753536 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
          
    md1 : active raid1 sda2[0] sdb2[1] sdc2[2] sdd2[3]
          2097088 blocks [4/4] [UUUU]
          
    md0 : active raid1 sda1[0] sdb1[1] sdc1[2] sdd1[3]
          2490176 blocks [4/4] [UUUU]
          
    unused devices: <none>
  • Start scrub process:
    echo check > /sys/block/md2/md/sync_action
  • This will scrub your array and count any bit mismatches in:
    cat /sys/block/md2/md/mismatch_cnt
  • Then you can repair the mismatching blocks with:
    echo repair > /sys/block/md2/md/sync_action
  • Monitor progress:
    cat /proc/mdstat
    Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
    md2 : active raid6 sda3[0] sdgd3[7] sdgc3[6] sdgb3[5] sdga3[4] sdd3[8] sdc3[2] sdb3[1]
          11692753536 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]
          [>....................]  check =  0.0% (109008/1948792256) finish=893.6min speed=36336K/sec
          
    md1 : active raid1 sda2[0] sdb2[1] sdc2[2] sdd2[3]
          2097088 blocks [4/4] [UUUU]
          
    md0 : active raid1 sda1[0] sdb1[1] sdc1[2] sdd1[3]
          2490176 blocks [4/4] [UUUU]
          
    unused devices: <none>
synology_raid_verify.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1