Skip to content

Instantly share code, notes, and snippets.

@akiatoji
Forked from stevenharman/expanding_raid_5_array.sh
Last active February 8, 2018 00:17
Show Gist options
  • Save akiatoji/2fb9c1a49429a88aa61b2f174694221f to your computer and use it in GitHub Desktop.
Save akiatoji/2fb9c1a49429a88aa61b2f174694221f to your computer and use it in GitHub Desktop.
Improving RAID Initialization and Expansion time on Synology DS418play
# Initializing DS418play with 4 x 6TB disks
# ssh to NAS as yourseld
# Check the RAID block device and tunable values
cat /proc/mdstat # was md2. Getting about 30M/s
# Get original values:
echo "speed_limit_max: `cat /proc/sys/dev/raid/speed_limit_max`" #=> 200000
echo "speed_limit_min: `cat /proc/sys/dev/raid/speed_limit_min`" #=> 10000
echo "stripe_cache_size: `/sys/block/md2/md/stripe_cache_size`" #=> 1024
# update to use more RAM (Stripe Cache Size) and higher lower bound (speed_limit_min)
echo 200000 > /proc/sys/dev/raid/speed_limit_min
echo 16384 > /sys/block/md2/md/stripe_cache_size
cat /proc/mdstat # Now Getting 50-60M/s
# reset once you are done
echo 10000 > /proc/sys/dev/raid/speed_limit_min
echo 1024 > /sys/block/md2/md/stripe_cache_size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment