Introduction
Warning - The packages referenced in this document are very old and should no longer be used as it is extremely unlikely they are up-to-date in terms of security vulnerabilities.
This document is retained for reference purposes only. It contains general information related to the Synology DiskStation products. Where the document discusses modifications to the product's installed software, you should understand that this may void the product's warranty and waive any rights for technical support. See Synology's General Disclaimer on Modifying the Synology Server
The notes here are based on more complete documents referenced below. They are intended for use as an aide-memoir rather than full instructions.
Installing Unofficial Applications
Installing ipkg
ipkg is a lightweight package management solution designed for embedded devices like the DiskStation.
Identify the processor used by your DiskStation using this list
Download the appropriate bootstrap script listed here for the identified processor. e.g. for the DS212J with a Marvell Kirkwoodk mv6281 processor:
wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh
Make the script executable:
# chmod +x syno-mvkw-bootstrap_1.2-7_arm.xsh
Check through notes in the detailed guide for any modification that may be required for the script to work on some systems.
Execute the script:
# sh syno-mvkw-bootstrap_1.2-7_arm.xsh
If you have any problems with the script, there are solutions listed in the detailed guide.
Cleanup by removing the script
# rm syno-mvkw-bootstrap_1.2-7_arm.xsh
Reboot the NAS
There are likely to be two versions of wget installed, one in
/usr/syno/bin/
and the other in/opt/bin/
. We need to use the latter. Check your path, and if necessary, alter it so that/opt/bin
is earlier than/usr/syno/bin
: e.g.# echo $PATH # export PATH=/opt/bin:/opt/sbin:$PATH
Note: After starting another shell, you will need to perform this export command again, before using ipkg. You could make a permanent change to the startup scripts, but that is beyond the scope of these notes.
Update the package list to the latest versions with:
# ipkg update
Upgrade the installed packages to the latest versions with: You can test what will be upgraded first using the
-test
option:# ipkg -test upgrade # ipkg upgrade
List or search for packages:
# ipkg list | grep screen
Run ipkg on its own for help on using the tool.
Install Screen
Screen is a very useful program when using remote terminals.
# ipkg install screen
Install Mg
Mg is a lightweight version of Emacs. Vi should be installed already.
# ipkg install mg
Installing BackupPC
See BackupPC
Cron jobs
After modifying /etc/crontab
restart the cron service with:
# synoservice --restart crond
http://jmd.cc/2011/08/05/how-to-run-a-cronjob-on-a-synology-nas/
Since DSM 5 the following command restarts crond:
# /usr/syno/sbin/synoservicectl --restart crond
-- Frank Dean - 4 Sep 2014
Git
http://www.wonko.de/2010/04/set-up-git-on-synology-nas.html
Miscellaneous Packages
You may like to install the following commonly used packages:
# ipkg install bash man perl-file-rename
Openssh
Installing the openssh
package includes an SSH server which by default will
use the same port as the Synology supplied SSH server, causing one of them to
fail to start.
After installing openssh, ensure you disable it by setting the SSHD_ENABLE
parameter in /opt/etc/default/openssh
to no
, so that the SSH server does
not start. Alternatively, run it on another port, e.g. 2222
by modifying
the Port
parameter in /opt/etc/openssh/sshd_config
.
If you wish to use SFTP with the ipkg openssh package, install the
openssh-sftp-server
package.
-- Frank Dean - 20 Aug 2017
References
Photo Station
See http://code.google.com/p/synothumbs/ for a shell script and a Python script that can be used to rapidly create thumbnails on your desktop PC before transferring them to the DiskStation via, for example, a USB drive.
See also:
* <http://www.web3.lu/managing-thumbnails-synology-photostation/>
* <http://nickveenhof.be/blog/speed-thumbnail-generation-synology-ds212j>
NTP Failing to Sync
Whilst running DSM 5.1-5022 Update 5 the system clock repeatedly drifted from NTP time.
When I examined the list of servers the NTP daemon was using, I noticed that only one was usable. The others had been excluded by the various NTP algorithms.
From what I can figure out from the NTP documentation, at least 'minclock' servers (default 3) are required by the [clock cluster algorithm][cluster] - presumably, if less, then no adjustment ends up being made to the system clock.
[cluster]: http://www.eecis.udel.edu/~mills/ntp/html/cluster.html "Clock Cluster Algorithm"
As root, from the command line, the ntpq command can be used to list the peers:
# ntpq -pn
The first column of the output shows a single tally code character (x,.,-,+,#,* or o). One should show an asterisk '*' indicating it is the system peer. We therefore need at least two others to show a plus sign '+' indicating they have been included by the combine algorithm.
I've restarted the ntpd service to force a new selection of NTP servers from the pool using:
# /usr/syno/sbin/synoservicectl --restart ntpd
and confirmed that I have a total of three servers with either asterisk or plus tally codes shown against them.
-- Frank Dean - 7 Jul 2015
Subsequently, I discovered the overridden defaults for the NTP service were causing NTP to fail to synchronise. The key cause of clock steps occurring was related to hard disk hibernation. Frequently when the disks hibernated, a clock step of around 1 to 3 seconds occurred. Disabling hibernation stopped the system clock steps from occurring.
I changed the configuration files as follows:
~ # cat /etc/ntp.conf
includefile /usr/share/ntp/pool.ntp.org.conf
includefile /usr/share/ntp/ntp-restrict-serveron.conf
includefile /usr/share/ntp/ntp-common.conf
includefile /etc/ntp.conf.user
~ # cat /usr/share/ntp/pool.ntp.org.conf
server 0.uk.pool.ntp.org iburst
server 1.uk.pool.ntp.org iburst
server 2.uk.pool.ntp.org iburst
server 3.uk.pool.ntp.org iburst
~ # cat /usr/share/ntp/ntp-restrict-serveron.conf
restrict default limited kod nomodify notrap nopeer noquery
restrict -6 default limited kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict source limited kod
~ # cat /usr/share/ntp/ntp-common.conf
disable monitor
driftfile /run/ntp/ntp.drift
~ # cat /etc/ntp.conf.user
#logfile /var/log/ntp.log
#logconfig =syncevents +peerevents +sysevents +allclock
#statsdir /var/log/ntpstats/
#statistics loopstats peerstats protostats sysstats
#filegen loopstats file loopstats type day enable
#filegen peerstats file peerstats type day enable
#filegen protostats file protostats type day enable
#filegen sysstats file sysstats type day enable
-- Frank Dean - 3 Nov 2015
Disk Failure
After removing a failed disk from a RAID 1 array, replace it with the new, un-partioned drive.
Go into
Storage Manager > Disk Group
using the browserClick the
Manage
buttonSelect the option to repair the degraded volume
The system partitions the new drive and adds the new partions to the array.
Instructions are in the online help under DSM > Storage Manager > Volumes &
Disk Groups > Repair a Volume or Disk Group
.
Depending on the size of the disk, it can take a long time for the array to be rebuilt.
If you have access to the command line on the device, you can monitor the rebuild process with:
$ cat /proc/mdstat
-- Frank Dean - 3 Feb 2013
Related Topics: LinuxDevelopment, BackupPC