How to run fsck on Synology DS1511+ (DSM 5.0)

After doing some research on Google, I finally figured out how to run fsck on my Synology DS1511+ using a combination of guides I found.

First I needed to install ipkg so that I could later use lsof to tell me what processes were using the volumes that needed to be unmounted before running a file system check; I did this by following the guide at The DS1511+ uses an Intel Atom so I downloaded the syno-i686-bootstrap_1.2-7_i686.xsh bootstrap. The guide says to comment out some lines in /root/.profile for DSM 4.0 only but I found that this was also necessary for DSM 5.0; without it the DS1511+ complained that ipkg could not be found.

Afterwards I installed lsof by running:

Now I was ready to use the guide at I had to deviate from this guide a bit at the step where it tells you to stop the pgsql service by entering:

This script did not exist on my DS1511+ so I had to google another way to stop it. Some guides I had found said to run:

However that command gave me an error:

I figured out that the file was owned by user postgres so I ran:

This command worked and I was able to use the rest of the guide to run a file system check on my Synology.