Synology NAS - How to speed up expanding drive

Tips and tricks

Posted by Paul Costan at 10:35 am

If you are like me bought a NAS drive and want to build up storage over time due to the high expense of hard drives. The best way is to start off with 2 Hard disks as Raid 1. Then if you have enough money later on to buy the 3rd Expanding your 3rd drive a Raid 5. Depending how big your hard drives this process of expanding with Synology NAS can be a long process which can take days before you can see changes. I understand why, because anyone on your network will not be interrupted if the server is down, So it will be business as usual. But what if you need the extra space urgently hence the purchase of the third drive? Well, you come to the right place. Here is how to speed up expanding NAS.

Open terminal on you mac Putty for windows,

Type in the following to see progress:

cat /proc/mdstat

You should see something like this:

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : active raid5 sdc6[2] sdb6[0] sda6[1]
7657726592 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
[============>........] reshape = 61.6% (4722524224/7657726592) finish=402.6min speed=121486K/sec

md2 : active raid5 sdc5[3] sda5[2] sdb5[1]
151459776 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]

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

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

Here is what you need to look for:

reshape = 61.6% (4722524224/7657726592) finish=402.6min speed=121486K/sec

If you go here and type in the mins to finish you can work out how long roughly to complete expanding process.

The first this you need to do is switch over to ‘root’ user. To do this type in:

Sudo -i

Next set speed NAS speed

cat /proc/sys/dev/raid/speed_limit_min

cat /proc/sys/dev/raid/speed_limit_max

cat /sys/block/md3/md/stripe_cache_size

Copy and paste the following make increases:

echo 250000 > /proc/sys/dev/raid/speed_limit_min

echo 250000 > /proc/sys/dev/raid/speed_limit_max

echo 32768 > /sys/block/md3/md/stripe_cache_size

finally checkout the speed now and on your Resource monitor gui:

cat /proc/mdstat

Posted by Paul Costan at 11:47 pm

First of all you need to enable NFS on your Mac, to do this type this command
sudo nfsd enable
$ cd /etc/
Then you have to edit if not create file called ‘exports’
$ sudo nano exports
path to your directory you want to mount follow by “-alldirs -mapall=501”
"/Volumes/LaCie" -alldirs -mapall=501
List show user ID (Commonly you want 501)
$ id
Every time you make a change to this file you need to restart NFS services.
$ sudo nfsd restart
Confirm your NFS paths
$ showmount -e

Finally Login to your Synology server, go to ‘File station’ > ‘Tools’ > ‘Mount remote Folder’ > ‘NFS Shared Folder’
In the Folder files put in your Mac’s IP follow by the path


– First login into your synology NAS server.
– Go to Package Centre.
– Click on ‘Settings’ button and select the ‘Beta’ tab.
– Tick the checkbox ‘Yes, I want to see beta versions!’.
– Next, go to ‘Utilities’ and find ‘Virtual Machine Manager’.
– Click on ‘Virtual Machine Manager’ and hit the ‘Install’ button.
– Once installed, Launch the app.

Install guest-agent
open terminal in Ubuntu and run the following command:
sudo apt-get install qemu-guest-agent

Posted by Paul Costan at 11:41 am

If you have installed jmeter with homebrew can run these commands in terminal

brew install jmeter


brew install jmeter --with-plugins
with plugins

If you are running jmeter 3.2, you can found your jmeter CA Certificate here.


The simplest way to installing this certificate is by opening the directory and double clicking on the file. By default it will be added to your list for certificate but not trusted. If you right click you will have the option to trust where you will need to type in your machine password.


In ‘phpMyAdmin’ under sql tab copy and paste below script and hit go!.

UPDATE wp_options SET option_value = replace(option_value, 'http://old-url', 'http://new-url') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://old-url', 'http://new-url');

UPDATE wp_posts SET post_content = replace(post_content, 'http://old-url', 'http://new-url');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old-url', 'http://new-url');

Posted by Paul Costan at 8:15 am

The other day I need to migrate files over to my new NAS, to do this I had to SSH in to the box and run a SCP command to copy over files. But at the sametime I wanted to keep their timestamp. To do this you need to run the following command

First ssh into your box and go the fold where you want to copy files to then run this command:

$ scp -r [username]@[ip-address]:[path-of-files] .

if you would like to keep timestamp run this command. notice I added ‘p’ after the ‘-r’.

$ scp -rp [username]@[ip-address]:[path-of-files] .

‘-r’ is recursive ‘p’ is for preserve (file details).


First ssh in to pi and cd in to Downloads directory.

$ cd ~/Downloads

Next you need to download the nodejs tar. Checkout the version you desire make sure you download the the version with the last string ending ‘linux-armv6l.tar.gz’. Raspberry Pi Zero support only ARMv6.

$ wget

Once downloaded cd in to usr/local

cd /usr/local

Extract tar here

sudo tar xzvf ~/Downloads/node-v6.10.3-linux-armv6l.tar.gz --strip=1

And finally remove default npm, node and nodejs.

sudo apt-get remove --purge npm node nodejs

Now check the version

$node -v && npm -v

Posted by Paul Costan at 6:57 pm

Only recently I needed to access my iMac GUI whilst I was away aboard. I’ve always ssh to my iMac being a geek. But for this particular occasion I needed to demo things on my iMac.
Anyways I did a little research and here are my findings and conclusion.

Like I said I’ve always ssh in to my box via VPN, takes awhile to setup if you know what you’re doing, but very useful if you want connect to your home network whilst your in another country.

VNC Viewer

If you have VPN the best app to use is VNC viewer and this is free.

On your Mac you first need to download VNC Connect client. See step by step instructions here.

Next download VNC Viewer on you iPad/iPhone. If you sign up and add your mac details and your way!

Usability is ok, I find it a bit slow compare to the other Remote Desktops apps. I feel it’s very graphic heavy and may eat in to your data plan.


Teamviewer is free for personal use only… But you if you have several machine you like to connect to, you are advice to purchase a licence, which I think is fair.

Teamviewer is very simple to install. Again it is best to sign up and user your login to your both desktop and mobile apps:
Desktop – Teamviewer client
iPad/iPhone – Teamviewer app

By far, I think the usability on the iPad/iPhone is very simple compare to all the rest for Remote Desktops apps. The app is optimise to your reduces your mobile bandwidth.

Google Chrome Remote desktop

Google is new to the game. I know Google had done similar in the past using their web browser, but this did not fly too well as it was very sluggish. Chrome Remote Desktop is the new and improve version. Works very well. You do not need VPN enable. You can access again on your iPad/iPhone.

The navigation works very similar to VNC viewer. The app is also optimised to your reduces your mobile bandwidth.

Apple Screenshare

Apple Screenshare is pretty recent with the new macOS Sierra. Screenshare is already intergated to the system. all you need to do is make use you are signed in to iMessage and thats it.

Search Screenshare by holding down Command and spacebar and type in ‘Screenshare’. put in the ip address if you have VPN and your in.

The other way is by sharing your screen or taking control of your friend/family desktop is by going to iMessage select the your user message and click on the ‘i’ icon and you will see the overlapping windows icon. Click on this and you will be presented the two options. Control or view.

Is is simple Remote desktop app which is web based.

Posted by Paul Costan at 1:09 pm

I had issue running Drush after upgrading MAMP 3.0.5 on PHP5.5.10

To fix this you need to edit .bash_profile. Run these commands in terminal

sudo nano ~/.bash_profile

Add the following line

export PATH="/Applications/MAMP/Library/bin:/

Exit and save… next run

source ~/.bash_profile

Restart machine…

Job DONE! to test drush is working correctly

drush status

Posted by Paul Costan at 9:38 am

Copy and past below the following terminal commands to see all hidden files on your mac.

defaults write AppleShowAllFiles YES

Posted by Paul Costan at 3:19 pm

1. Sublime Text 3
The must popular IDE to write up your HTML and CSS.

2. iTerm / terminal
All front-end mush have some knowledge of using terminal for example using Compass to compile your SASS to CSS. Or using Git and Drush commands to commit or revert features.

3. Adobe Photoshop
As a front-end developer you need Photoshop to help create your fabulous and create designs.

4. Adobe Fireworks
Fireworks is a great way to export your prefect graphical elements such as icons in to PNGs or JPG. Firework can optimise this graphic to reduce download time.

5. Adobe Illustrator
Illustrator is a prefect tool to create your vector to SVG… commonly used now for retina displays and mobile devices.

6. VMWare Fusion for Mac / VMWare Player for PC
To test IE browsers you will need virtual machines. Starting from WindowsXP (ie6/7), WindowsVista (ie8/9) Windows7 (ie9/10) and Windows8 (ie11). Optionally you can install Ubuntu, centos, android and so forth.

7. Browsers – Google Chrome / Firefox / Safari
All your broswers should now have debugging tools to debug javascript, html and CSS. Firebug is a great extensions to debug code. Webdeveloper tools extension is a good one to.

8. MAMP for Mac / xamp for PC
These apps are a great tool to recreate your web environment on your local machines; which is a web service including Apache / MySQL (LAMP)

9. Github / SourceTree / Subversion / Tower
All developers needs Repository to store all their code files. Pulling and Pushing your files to github cloud Repository is the best way to share and collaborations.

10. Balsamiq / Auxure wireframes
Awesome tools to build up quick wireframes for UX

Posted by Paul Costan at 11:21 am

Here are my top tips for frontend developers who works with Sublime

1. Sorting CSS
By highlighting your CSS you can hiting F5 to organise your css in alphabetical order.


2. Command Palette
Installing syntax i.e HTML,HTML5, CSS, CSS3, LESS and SASS snippets which helps you code up fasters

3. Tab Spacing
Convert indentation tab spacing to two spacing.