Tag Archives: SSH

Speed up Synology SHR Raid repair.

Rebuilding SHR arrays can take a long long time.
But we can solve this by the might SSH / CLI.

SSH into your DiskStation. To view the status of your rebuild:

$ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md2 : active raid5 sdd5[6] sda5[5] sde5[7] sdc5[2] sdb5[1]
      7795118592 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/4] [UUU_U]
      [=>...................]  recovery =  5.2% (103271424/1948779648) finish=672.9min speed=45708K/sec

Initially, the rebuild speed is 45708 Kb/sec (~45 Mb/sec), with an estimated completion time of 670 minutes, or 11 hours so so.

We can go faster!

RAID rebuilds are speed limited. The default minimum and maximum speeds are, in Kb/sec:

$ cat /proc/sys/dev/raid/speed_limit_max # maximum speed
200000
$ cat /proc/sys/dev/raid/speed_limit_min
1000

Let’s increase that minimum speed a touch:

$ sudo su
# echo 50000 > /proc/sys/dev/raid/speed_limit_min

And see if we’re going any faster:

# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md2 : active raid5 sdd5[6] sda5[5] sde5[7] sdc5[2] sdb5[1]
      7795118592 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/4] [UUU_U]
      [=>...................]  recovery =  7.3% (142689152/1948779648) finish=543.4min speed=55388K/sec

Yeah, it’s a little faster – up to 55 Mb/sec with an estimated completion two hours sooner.

# echo 100000 > /proc/sys/dev/raid/speed_limit_min
# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md2 : active raid5 sdd5[6] sda5[5] sde5[7] sdc5[2] sdb5[1]
      7795118592 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/4] [UUU_U]
      [=>...................]  recovery =  8.4% (163878932/1948779648) finish=356.4min speed=83448K/sec

I played around, and with a speed_limit_min value of 100000, we hit a bottleneck and max out at about 85 Mb/sec, but thats pretty much twice as fast as we were going. Not bad. (Note to self: return to default value when the rebuild is finish.

Progress since august

So since scoring the PE2850 in Auggust i have been very busy at work.
This resulted in getting a new job which i start at the 2nd of November and ofcourse having met this realy sweet girl changed by life a bit.
But she is working towards her bacelor diploma in teaching english, i still have some time in the weekend to play around with the VPS and other tiny stuff.

After introducing my buddy in having a rapsberrypi with kodi on it, he decided to score one.. with me still being me, this resulted in getting my 2nd raspberry pi Model 2+ for playing around with the new jessie release of debian. This little PI is now running my famous home IP of x.x.x.42, which resulted in the name “PI42”. Will this be the allknowing answer ? i don’t know yet.

The 2nd pi running at home will be primary used for VPN & SSH purposes but is running nginx as webserver next to Apache running on the VPS.
The last thing to do is setup openvpn.. which will require a couple of long nights i guess…

Righto, the VPS i still have running moved from an older host to a brand new Dell T410 model wich ofcourse i share with other customers from Fast4you. But since its quite strange that my order 512mb ram machine only has 490 as seen by the OS, i might be upgraded to a higher package (more traffic, more ram and more diskspace)

Things now running on the VPS:

  • This little blog powered by wordpress
  • JDM-ITR.nl, another wordpress blog in relation to how i see the car world.
  • Owncloud, my private cloud environment, pretty usefull in synching stuff between both my laptops, phone and desktop and proving cloud space to a couple of friends.
  • RFW, further blog/webshop to be made for friends