Category: Synology

  • OS updates / upgrades can always be a PITA – modified my .profile again to cope with Synology’s latest DSM changes

    Within .profile I try to find out, where exactly (in which environment) “I” am operating. Once I know this, I can set up PATH depending on the environment. Of course on a Synology NAS based on a BusyBox with IPKG (GNU) extensions things look different to my Mac or to my OpenSUSE installations, but still: having .profile / .bash_profile and .bashrc in common is rather intriguing.

  • sometimes my Mac fails mounting my Synology DiskStation’s filesystems: “Connection Failed”

    • the OS X finder shows: “Connection Failed”
    • one of the filesystems (“home”) was mounted beforehand
    • it seems impossible to remove that dangling mount point
    • all three of my DiskStations seem equally concerned: DS213+, DS112+, DS115j
    • I need to reboot the Mac in order to be able to mount any of the filesystems of the concerned DiskStation again – I hate rebooting and losing desktop and application state

    Update 2016-01-10:
    With cmd-K (“Connect to Server…“) it works rather smoothely – but still not perfectly.

  • what a relief, that my Synology DS115J had no hardware damage

    It was the firmware “only”, that had somehow experienced something strange and hard to reconstruct.

    The data were still on there, just the firmware set-up got to get re-established, no big deal – but I was really worried, until I knew that for sure.

    Of course, if I had kept all my NASs in sync, I would not have had to worry. And that’s not really that hard to achieve. Most of the time I have at least cheap and fast Internet access “from dawn to dusk”, ie. in my accomodation. So if I keep to my personal priorities:

    • keep in touch with the kid, keep it entertained
    • back up my data often, keep the NASs in sync
    • Triathlon exercise

    That shouldn’t really ever happen. But you know, how things are going …

    • nice conversations keep you up
    • all the other high priorities (and last not least profane work, the bread&butter jobs) simply leave you exhausted
  • my Synology DS115J’s DSM had crashed, needed re-installing and re-setup

    That’s quite annoying, but as opposed to initial announcements during the process the users’s home directories weren’t lost.

  • setting up a new Synology NAS (“DiskStation”) to look and behave like an “old” one

    When I set up my new DiskStation DS115j, it started with DSM5 from the beginning. My old DiskStations “obviously” came from DSM4 and got migrated to DSM5, and therefore they had different default settings.

    Issue: It does not have the “Control Panel” icon on the desktop initially.
    Category: DSM4-DSM5 migration issue.
    Solution: Simply go to “Main Menu” (on the Desktop) and drag one of those icons to the Desktop.

    Issue: You have SSH access enabled, but you still cannot login via ssh.
    Category: “needs manual intervention”.
    Solution: log in to the BusyBox command prompt as “root” (not as “admin”), although it’s the same account, and you are using the same password for “root”, then vi /etc/passwd, and change the respective user’s initital application, i.e. his/her shell to /bin/ash.

    Issue: I can login via SSH, and the set-up looks identical to another DiskStation, but still I cannot login via publickey but only via password.
    Category: …
    Solution: none so far.

    Issue: they created my home directory with umode 777, that way I couldn’t log in w/o password through SSH. It took me rather long to recognise that, although “ssh -v” gave the right hint:

    debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /volume1/homes/johayek
  • the 11 e-books I got today from O’Reilly

    Downloaded through Dropbox to my Synology ^NAS:

    • oreilly–Agile_Data_Science.20131011104838.pdf
    • oreilly–Building_Web_Apps_with_WordPress.20140407142920.pdf
    • oreilly–Communicating_Data_with_Tableau.20140612124036.pdf
    • oreilly–Data_Science_at_the_Command_Line.20140626143621.pdf
    • oreilly–Free_as_in_Freedom.20130104090715.pdf
    • oreilly–Graph_Databases.20130612085254.pdf
    • oreilly–IPv6_Address_Planning.20140528100600.pdf
    • oreilly–IPv6_Essentials–3rd_Edition.20140605124939.pdf
    • oreilly–MySQL–Cookbook–2nd_Edition.20130114120323.pdf
    • oreilly–Python–Cookbook–3rd_Edition.20140306152041.pdf
    • oreilly–WordPress__The_Missing_Manual–2nd_Edition.20140617133938.pdf
  • my Synology NAS DS213+ suggested an update, and afterwards the web-gui is not accessable again

    I can still ssh into the NAS from remote, and I just rebooted:

    root@DiskStation $ shutdown -r now

    … but https://FQDN:5001/webman is just not accessable right now. That scares me “a little”. I shall try again, as soon as I shall be attached to my home LAN in a couple of days. At least I can still ssh into.

    Update 2014-07-01 12:15:54:

    • I just tried to access the URL through Chromium and it works
    • access through Firefox keeps resulting in a blank page
    • relieved, that it works at least somehow
    • the “disadvantage” of using Chromium: apparently the website suggests to not allow saved login credentials – Firefox makes use of the stored login credentials, and I like that
  • IPKG on my Synology NAS, /etc/rc.optware, /volume1/@optware, and the /opt symlink

    There are two different strategies to access /volume1/@optware through /opt:

    • a symlink (the approach I prefer)
    • “mount -o bind” (usually run through /etc/rc.optware)

    Once in a while (usually after a DSM update)

    • the symlink “/opt” got removed
    • and/or /etc/rc.optware already executed the “mount -o bind”.

    I am checking on my /opt symlink in my ~/.profile, so I notice the misery rather soon.

    I am going to describe,

    • why I do not like /etc/rc.optware and the “mount -o bind
    • and how to get rid of the “mount -o bind” (I hope my approach works!!!)

    After you got rid of the “mount -o bind“, the symlink needs getting re-established:

    On synology_apollolake_218+ with x86_64-synology-DSM6.2.4_25556_0 I am doing this:

    On … I am doing one of these:

    $ ln -s /volume1/@optware /opt
    …

    Why do I not like the “mount -o bind”?

    Once it is running, you can not identify, where the mountpoint really points to. The symlink is much clearer.

    Why do I not like /etc/rc.optware?

    Quite possibly /etc/rc.optware gets run and it already executed these lines:

    $ mount -o bind /volume1/@optware /opt # some equivalent to the symlink
    $ /opt/etc/rc.optware # which in turn runs a couple of init-scripts

    I don’t really like the init-scripts runs through /opt/etc/rc.optware :

    • /opt/etc/init.d/S??*

    So maybe you (like me) want to prevent /etc/rc.optware from getting run (and thus also the “mount -o bind“) by renaming it a little …

    How to make /opt/bin available on your PATH

    For properly accessing the executables provided at /opt/bin, you need to extend your PATH like this in your ~/.profile:

    PATH=/opt/bin:$PATH

    For further reading

    There is a separate and essential article on “IPKG for Synology”:

    Maybe you want to read this file:

    • /opt/etc/ipkg.conf
  • the GNU packages that I need most seriously on my Synology NAS

    CAVEAT: In 2017 I started using opkg (Entware-NG) instead of ipkg (optware). This document may not be updated entirely to reflect the new circumstances.

    theses are the GNU packages I seriously need on my Synology NAS (there is actually more than one …):

    $ sudo opkg list_installed
    bash - A bourne style shell.
    coreutils - Bunch of heavyweight *nix core utilities.
    diffutils - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files.
    exif - A small command-line utility to show and change EXIF information in JPEG files. // entware-ng does not have it
    file - Ubiquitous file identification utility.
    findutils - File finding utilities.
    gcc - The GNU Compiler Collection.
    ghostscript - … // includes ps2pdf
    gkrellmd - Gkrellm is a utility to display system stats (cpu, processes, memory,..) in a nice little window. // server component
    glib - The GLib library of C routines.
    grep - Global regular expression parser.
    gzip - GNU Zip data compression program. // provides: zless, zgrep, …
    iconv - Character set conversion utility
    less - Less file browser.
    make - examines files and runs commands necessary for compilation.
    nail - command-line email-client supporting POP3, IMAP, SMTP, …
    perl-text-csv_xs - Text comma-separated values manipulation routines.
    perlbase-cpan - CPAN perl module. // will install lots of other useful CPAN modules
    poppler-utils – … // includes pdftohtml; better than the xpdf package
    procps - PROCPS System Utilities.
    psmisc - A set of some small useful utilities that use the proc filesystem.
    rcs - The Revision Control System (RCS) manages multiple revisions of files.
    rsync - fast remote file copy program (like rcp).
    unzip – …
    vim - Yet another version of the vi editor.
    wget - A network utility to retrieve files from the Web.
    # I assume these ones get installed indirectly:
    pkgconfig - Package configuration tool.
    util-linux - A suite of essential utilities for any Linux system.
    # a few more get installed "indirectly" for sure…

    And BTW occasionally you want to do this:

    # update list of available packages:
    $ sudo opkg update
    # upgrade all installed packages to latest version:
    $ sudo opkg upgrade

    “Even” on your NAS you may want to keep source controlled text notes, that’s why even good old RCS may make sense.

    Maybe it’s worth installing the “Toolchain” according to this description:

    $ sudo ipkg list | fgrep optware-devel
    optware-devel - This is a meta package that bundles all the packages required for optware native development. When fully functional, it should …

  • Synology: how to reset a Synology DiskStation AKA NAS

    Having in mind, what I have already tried, I think, it won’t boot in any way described above, but I will give it a try anyway.

    Basically:

    • remove all disks
    • press the reset button for 4 seconds
    • pray, that it starts beeping