4

I have a new md RAID10 that I created (on a Synology DS416slim, which is besides the point), which was in the process of initial sync:

root@ds416slim:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      1943881088 blocks super 1.2 64K chunks 2 near-copies [4/4] [UUUU]
      [===>.................]  resync = 19.8% (386172736/1943881088) finish=2613.6min speed=9932K/sec

md1 : active raid1 sdc2[1] sdb2[2] sda2[0] sdd2[3]
      2097088 blocks [4/4] [UUUU]

md0 : active raid1 sdc1[1] sdb1[2] sda1[0] sdd1[3]
      2490176 blocks [4/4] [UUUU]

unused devices: <none>

Noting it's really horrible sync speed (it should've been closer to 100M than 10M), I decided to pause the sync using echo idle > /sys/block/md2/md/sync_action

After the tests (where hdparm showed that /dev/sdd had horrible performance), I tried to resume it with echo resync > /sys/block/md2/md/sync_action. However the sync didn't resume and stayed in idle state:

root@ds416slim:~# echo resync > /sys/block/md2/md/sync_action
root@ds416slim:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      1943881088 blocks super 1.2 64K chunks 2 near-copies [4/4] [UUUU]

md1 : active raid1 sdc2[1] sdb2[2] sda2[0] sdd2[3]
      2097088 blocks [4/4] [UUUU]

md0 : active raid1 sdc1[1] sdb1[2] sda1[0] sdd1[3]
      2490176 blocks [4/4] [UUUU]

unused devices: <none>
root@ds416slim:~# cat  /sys/block/md2/md/sync_action
idle

I checked on possible options on how to resume the sync as the options given in the sysfs section of the MD documentation on kernel.org gives a list that doesn't have a resume option. Reading the listed options all seem to imply resync as the correct action, but it didn't resume the initial sync as seen above.

My questions are:

  • Will this affect the raid and how?
  • How do I resume the initial sync?
  • Is it safe to ignore the whole thing and start using the raid?

1 Answer 1

3

You need to use the repair action - ie: echo repair > /sys/block/md2/md/sync_action

In theory you can use the array during the repair, but I would let this first-time repair/resync to finish before putting valuable data on the disks.

From md man page:

md/sync_action

This can be used to monitor and control the resync/recovery process of MD. In particular, writing "check" here will cause the array to read all data block and check that they are consistent (e.g. parity is correct, or all mirror replicas are the same). Any discrepancies found are NOT corrected. A count of problems found will be stored in md/mismatch_count. Alternately, "repair" can be written which will cause the same check to be performed, but any errors will be corrected. Finally, "idle" can be written to stop the check/repair process.

In other words, resync is ignored because it is not an accepted action - while check, repair and idle are.

2
  • May I request a more verbose answer before I accept this?
    – Samveen
    Mar 18, 2019 at 14:19
  • @Samveen sure, I edited my answer
    – shodanshok
    Mar 18, 2019 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.