Category: Synology

  • Control ACPI-Enabled network devices from a Synology

    Acpi On Lan
    Acpi On Lan

    ACPI-On-Lan” is a package I have created for my Synology DS 713+ (also tested on my DS 3612sx).

    It installs a website that list all your network devices. Depending on the OS, you can possibly send a sleep, shutdown or hibernate command to the device. ACPI-On-Lan tries also to reach each device (using a ping) and checks if there is a default web page accessible on the device (Ex. a configuration or administration page). Finally, it can send Wake-On-Lan magic packets to wake-up devices currently switched off.

    Click to Read More

    Disclaimer

    This package is a prototype made for learning purpose. I did test many development techniques and libraries I never touched before: ajax/jquery, boostrap, .Net click-once deployment, creation of Synology spk packages, WebAPI/Microsoft .Net Owin, Newtonsoft.Json, running shell commands from php, etc… So don’t expect the most amazing bits out of there. It’s just this well known Big Ball of Mud  😳

    This is not a beta version (even not an alpha), which would be well designed. My prototype is a Quick and Dirty App made of various pieces of code dropped together. It must be complete rewritten properly or at least deeply re-factored. Briefly said, I don’t want my name to be associated with this ugly mess (even if most scientists seem to produce such a code :D).

    Nevertheless, and although still really incomplete (as most prototypes), it works on my own NAS and I have already been asked to share it. So, here it is:

    Some details

    A few details on ACPI-On-Lan’s basics first:

    • it reuses the login cgi module of the Synology to authenticate the user
    • it parses the ARP table of the Synology to find the devices available on the LAN.
    • it pings the devices using the “inetutil” library (from ipkg)
    • it does not use any database
    • it stores all the details about the network devices in a file with json format. If you plan to uninstall the package, you must backup those files manually first.
    • for hibernate, sleep, standby, restart Windows PC, it talk to a Windows Service hosting WebAPI services.
    • this Windows Service was intended to be deployed via click-once. Because I didn’t want to resign the click-once setup for each new deployment url, the Windows Service is installed now via MSI. However, the Windows Service is still self-installing (simply run the exe once and it will do the complete setup)
    • all commands (ping, WOL, …) are executed server side (by the NAS). So the Web UI can be used from the WAN without requiring direct access to each devices on the LAN.

    Notice also that:

    • the web UI doesn’t render well on mobiles.
    • there is not support yet to shutdown MAC, LINUX or ANDROID devices. I am planning to look how to use RPC commands (later this year 😉 )
    • Windows mobiles are not yet supported.
    • there are still some bugs when refreshing the status of some devices and a wrong state can sometimes be displayed. Also an action to “shutdown” the NAS is displayed although not yet implemented.
    • it’s not possible to define a specific port for the website possibly hosted on a device (Ex.: a custom local port of a port forwarded from the modem/router in order to access the device from the WAN)
    • I have to yet filled the spk’s “texts” files to translate the package.

    Prerequisite:

    You will have to install the package ‘inetutil’ on your NAS. This is required to be able to ping the devices while not running as super user (i.e.: ‘root’).

    The package ‘inetutil’ can be easily installed via the graphic interface “IpkgGUI” once IPKG is installed. And there are many tutorial on the web to install IPKG. If you are not afraid, you can try my own installation script*, described here (“IpkgGUI” is a graphical interface to manage IPKG packages. It is available as a Community Package for Synology on https://www.cphub.net)

    (*) Notice that you can install the package “ACPI-On-Lan” first and than connect on your NAS via telnet. The script to install IPKG is deployed with “ACPI-On-Lan”. Once connected, run: sh /var/packages/AcpiOnLan/target/application/service/installipkg.sh

    If you want to be able to send Sleep/Restart/Hibernate/shutdown command to Windows PC, you will need the Microsoft .Net Framework 4.5. This service is not required if you only want to send WOL commands to Windows machines.

    Setup:

    1) Download the package attached at the bottom of this page and install it manually via the “Package Manager” of Synology. 5 clicks and ~that’s it~.

    Manual Installation of ACPI On Lan
    Manual Installation of ACPI On Lan

    2) It can theoretically be installed on any volume (if you have several).

    Install On Any Volume
    Install On Any Volume

    3) And you can “run it after installation”

    RunAfterInstallation

    The setup of the package will mainly:

    • deploy the sources under /var/packages/AcpiOnLan/
      • the web application will be in /var/packages/AcpiOnLan/target/application
      • all the data of AcpiOnLan will be stored next to the web application in a file named Computers.json
    • create a php alias AcpiOnLan to “redirect” the http calls into the folder here above
    • force open_basedir = null for the new web site “AcpiOnLan”
    • add an icon into the DSM Start Menu
    Acpi On Lan Icon
    Acpi On Lan Icon

    4) Once ACPI-On-Lan opened in a browser, you will have access to a menu “install srvc”. Click on it to download the MSI which installs the Windows Service (Do this on Windows only!).

    Install AcpiOnLan Windows Service
    Install AcpiOnLan Windows Service

    5) The download of AcpiOnLanInstaller.msi will most probably be blocked by your browser/antivirus as it’s not a common download. If you want it, you have to accept the download (“Keep” within Chrome)

    AcpiOnLanInstaller Blocked
    AcpiOnLanInstaller Blocked

    6) Once you run the msi, recent version of Windows will also prevent its execution

    AcpiOnLanInstaller Stopped by Windows
    AcpiOnLanInstaller Stopped by Windows

    7) You will have to approve the installation by clicking on “More Info” here above and then “Run Anyway”

    AcpiOnLanInstaller Forced
    AcpiOnLanInstaller Forced

    8) Once the msi is running, it will copy the required files and do a first run of the service. When the service is run interactively (it’s the case when run by rom the msi), it install/uninstall itself instead of starting WebAPI Services. But it means that the antivirus will again react. Due to installation timeout this could disturb the setup…

    AcpiOnLanInstaller AntiVirus
    AcpiOnLanInstaller AntiVirus

    9) The Windows Service will be installed and will register itself the port the url where it will run its WebAPI services (It uses ‘netsh’ for that purpose)

    Installation
    Installation

    Et voilà, the Windows Service should now be running.

    IMPORTANT NOTICE 1: as the Windows Service was designed to be deployed via Click-Once, it was not assumed to be launched “As Administrator” directly (An exe “run” via Click-Once can by the way not require elevated rights). So, if run without such rights, the exe of the Windows Service will stop itself automatically and restarts “As Administrator” (You could be prompted to provide adhoc credentials).

    Previledge Required
    Previledge Required

    IMPORTANT NOTICE 2: when the Windows Service is installed via the msi, NEVER run the exe yourself from a command prompt of from the Windows Explorer. Again because the service has not been designed to be installed via a msi (with ‘installutil’ tool or with an installer class) a “self-installation/uninstallation” process has been foreseen if and only if the exe is run “interactively”. So, if you run the exe after the installation of the msi, it will do a self-uninstallation of the service.You have to run it once more to reinstall it.

    IMPORTANT NOTICE 3: The worst wase occurs if you run the exe once ad then uninstall the msi via the Control Panel > Add & Remove Programs. Indeed the msi will simply run the exe which will actually do a self-reinstallation of the service. So you will still have the service defined in the “Local Services” but neither the exe nor the entry in “Add & Remove Programs” anymore. To fix this, Quickly reinstall the msi, which will do a self-uninstallation of the service. Than run the exe interactively (from Windows Explorer) to redo a self-installation of the service. And you will end with the service defined in the “Local Services”, the exe available and the entry in “Add & Remove Programs” (which can now be used to safely uninstall the service). Sorry for that. I will improve the process to prevent the msi to put such a mess asap.

    Quick guide:

    1) When you access Acpi-On-Lan, you have to log in with a DSM account

    AcpiOnLan Login
    AcpiOnLan Login

    2) When you run Acpi-On-Lan for the very first time, it will search for your LAN (possibly one per Ethernet port on your NAS)

    AcpiOnLan Looking For Network
    AcpiOnLan Looking For Network

    3) Next, it will scan the LAN(s) (look into the ARP table)

    AcpiOnLan Scanning Network
    AcpiOnLan Scanning Network

    4) Finally, it will display a list of network devices found. For each device, you will have to “Set the OS” and “Set an Icon” (Except if you are happy with the default icons).

    AcpiOnLan Set OS and Icon
    AcpiOnLan Set OS and Icon

    5) If there is an hyperlink symbol next to a device, it means that there is a we page available. You can click on it. Also to refresh the status of a device, you can use the menu “Check”.

    6) Depending on the OS:

    • if the device if on, you will have actions to Hibernate, Sleep, Standby, Shutdown or Restart the device.
    • Once you have clicked on an action, an Abort action is made available for a few second.
    • If the device is off, you will only have a Wol action.

    The recycle bin can be used to hide a device and you can edit the name of the device.

    AcpiOnLan Actions
    AcpiOnLan Actions

    7) Finally, you have various menu

    AcpiOnLan Menu
    AcpiOnLan Menu
    • Reload: will reload the list of devices (and add newly detected ones if any)
    • Flush: will empty the ARP table and reload the list of devices (you will have to ‘reload’ again until all the devices appear. Possibly ping manually your devices from a telnet session to populate the ARP table… I will possibly add such a feature in the UI soon or later)
    • Check: check the status of all the devices displayed in the list not checked since 5 minutes. Notice: up to 3 devices are checked simultaneously by the UI (limitation for mobile devices slow to execute jquery)
    • Forced Check: check the status of all the devices displayed in the list even if checked within the latest 5 minutes.
    • Reset All: delete all the devices from the list (including your customization like icons/OS/hostnames). The network will net be rescanned. Notice that your previous data will actually be backuped in a subfolder “backups” and named Computers.x.json. You can manually restore them.
    • Show All: will show all devices previously hidden by clicking on its recycle bin. Clicking again on its recycle bin will un-hide the device.
    • Hide: Hide all devices marked to be hidden (to be used after the menu Show All)
    • Log Out: guess 😉

    NOTICE: your devices will be listed only if they have been switched-on at least one and in touch with the NAS during that time (I.e.: if they have been added into the ARP table).  Some devices although switched-on are never in touch with the NAS. EX.: power lines Ethernet adapters, … I will plan a procedure to ping all the IP in the LAN so all such devices are touched (if switched-on). In the mean time, you will have to ping them yourself from a telnet session. Ex.: ping -c 1 192.168.0.1

    Loading

  • Script to automate IPKG installation on Synology

    Installing ipkg is not difficult, but I hate to do it manually each time I (re)install a Synology… So, here attached is a script to install it automatically.

    [EDIT] ipkg is not maintained anymore. Many packages do not run anymore with the most recent DSM. So, use opkg instead.

    Click to Read More

    First Installation:

    1. Copy on your NAS the script attached at the bottom of this post (Ex.: into \\<YourSyno>\web\admin as used for the illustration here after).
    2. Connect as root on your NAS (Ex.: via telnet using the command ‘telnet <YourSyno>’, the login ‘root’ and the password of your ‘admin’ account – see more details here).
    3. Execute the script (Ex.: use the command ‘sh /volume1/web/admin/installipkg.sh’)
    4. Check which processor your have on your NAS and select the right option accordingly. The script will show you the cpu found using ‘cpuinfo’. But you can double-check here (NB.: I have a DS713+ which is currently not listed. I didn’t test ipkg for the other versions).
    Automatic Installation of Ipkg
    Automatic Installation of Ipkg

    You can now use ipkg directly in a shell or via the (really) great UI named “IpkgGUI”. This one is available as a Community Package from cphub.net. Add “https://www.cphub.net” as a Package Source in the Package Center’s settings pane and install IpkgGUI.

    Ipkg GUI
    Ipkg GUI

    Re-installation/upgrade:

    If ipkg is already installed, the script will remove it automatically and reboot the NAS before proceeding further with the installation (A reboot takes a bit more than one minute to shutdown and a bit more than two minutes to restart on my DS 713+). After the reboot, thanks to a script inserted into /etc/rc.local, the setup will continue automatically.

    Automatic Installation of Ipkg With Reboot
    Automatic Installation of Ipkg With Reboot

    Installation status:

    (After the reboot, reconnect to the NAS). You can now check the status of the setup in its log, using the command: cat /root/ipkg.log. The output should looks like this:

    [code]
    
    [Mon Dec 15 17:34:44 CET 2014] Installing IPKG...
    Optware Bootstrap for syno-i686.
    Extracting archive... please wait
    bootstrap/
    bootstrap/bootstrap.sh
    bootstrap/ipkg-opt.ipk
    bootstrap/ipkg.sh
    bootstrap/optware-bootstrap.ipk
    bootstrap/wget.ipk
    Creating temporary ipkg repository...
    Installing optware-bootstrap package...
    Unpacking optware-bootstrap.ipk...Done.
    Configuring optware-bootstrap.ipk...Done.
    Installing ipkg...
    Unpacking ipkg-opt.ipk...Done.
    Configuring ipkg-opt.ipk...Done.
    Removing temporary ipkg repository...
    Installing wget...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Installing wget (1.12-2) to root...
    Configuring wget
    Successfully terminated.
    Creating /opt/etc/ipkg/cross-feed.conf...
    Setup complete.
    
    [/code]

    Notice: after the setup of ipkg, this one is upgraded and updated once automatically.

    PS.: If you don’t choose the right version of the boostrap, the installation of ipkg will fail. While trying to run it, you could see errors like “line 1: syntax error: unexpected word (expecting “)”)“. Try to install the right package. The script should delete the previous installation and install the new one as explained above.

    Loading

  • Shell Script for Synology not working

    You become crazy because after hours of trials and errors, your brand new (and probably first) shell script still complains about “syntax error: unexpected “fi” (expecting “then”)”, “syntax error: unexpected “fi” (expecting “then”)” or “syntax error: unexpected word (expecting “in”)”, … The problem is probably with the EOL.

    Click to Read More

    The problem could indeed be that you are editing your script with a Windows Text Editor… In such a case, you have to convert the Windows EOL (End Of Line character) into the Linux equivalent.

    Edit your script with Notepad++ and use the menu “Edit”  > “EOL Conversion” > “Unix/OSX Format”. Then save your script and try again…

    You may also have to use the ANSI encoding with the menu “Encoding” > “Convert to ANSI”

    Loading

    ,
  • Add Custom URL Shortcuts into Synology’s DSM Start Menu or on DSM’s Desktop

    I did post a feature request on Synology forum to get support for custom shortcuts on the DSM’s desktop. But as I found a trick to do it myself, I have implemented a small .Net application to automate the configuration part. I named it “Mods – My Own DSM Shortcuts”.

    Click to Read More

    The trick is to create a Dummy Package which will, as any package, add a shortcut for itself into the Synology’s Start menu… This is a Dummy Package as it does nothing else (no installation of an actual application)..

    You can find the source code of my App as well as binaries for windows here https://mods.codeplex.com/. Read the documentation for additional information, including how to create such a Dummy Package manually (E.g.: you don’t have Windows)…

    On the screenshot here after, you can see both the Dummy Package “My Own DSM Shortcuts” installed via the “Package Center” and the Custom Shortcut that was created to open Net2Ftp – a php website I installed manually on my NAS (I.e.: copied into the webstation).

    My Own DSM Shortcuts
    My Own DSM Shortcuts

    Loading

  • Parental Control for Plex on Synology

    Many years ago, Parental Control was already a native feature of my previously favorite Media Library Manager: Media Browser – reason why, since I am using Plex (mainly because Plex Media Server runs on my Synology), the lack of efficient support for such Control has been really frustrating. A solution has fortunately been developed by iSh0w, early in 2014, as a plugin named “L0ck”. This plugin is now really pretty mature!

    NB.: two days after this post, Plex released native Parental Control as part of their new Plex Home feature… But this is not yet available for Samsung so L0ck still makes sense for me.

    [EDIT 12/2015] Later in 2015, a new version of Plex for Samsung has been released, which support user accounts (and hence, Parental Control).

    Click to Read More

    The only solution currently suggested by Plex to prevent Kids watching inadequate content is to create dedicated Plex Accounts for the kids and only share with those accounts the adequate content. This is totally inconvenient, especially when sharing the same player device such as a TV or a Tablet. Indeed, parents may not forget to “disconnect” the device from their account. Next, kids need to be able to connect with a login/password, which is far from easy for the youngest ones. Definitively, Plex is missing a a true Parental Control!

    L0ck plugin for Plex, although(*) not yet the very best solution, should be loved by the thousands of users who voted for such a feature!

    (*) You have to re-Lock the libraries before quitting your Plex Client. Libraries are not automatically re-locked after x hours or when Plex Client is restarted… Also, when unlocked, libraries are visible for all the Plex Clients, possibly for other devices that would start Plex! Next, the plugin is unl0cking/l0cking all the Controlled libraries at once (If there is a trick to protect distinct subsets of libraries with distinct passwords, I didn’t find it yet). Finally, restarting the Plex Client is usually required… But still, this is better than nothing or much better than Plex’s suggested approach.

    Here is how to install this plugin for Plex on Synology:

    1. Disable the “authentication on local networks” on your Plex Media Server (if enabled)
      1. Go to your Plex Server Administration page http://<YourSynology>:32400/web/index.html#!/settings/server
      2. Click on the entry “Connect”
      3. Click on the button “Show Advanced
      4. Disable “Require authentication on local networks”
    2. Go to the “L0ck” page to download the Plugin customized to lock/unlock some of your Libraries with a password
      1. Type the local IP (LAN) of your Synology
      2. Click “Search For Section(s)!
      3. Select the section(s) you would like control access to.
      4. Enter next Password. Ex.: 4 digits
      5. And click on “Generate Plugin!
      6. Finally click on “Download plugin!” on download a zip with your customized plugin (This is not working with all browsers! Use Chrome).
    3. Deploy the plugin into Plex’s plugin folder after customization for Synology
      1. Unzip the archive downloaded at step 2..F into a temp folder
      2. Open within notepad++ the file <YourTemp>\L0ck.bundle\Contents\Resources\l0ck_support\l0ck.sh
      3. Search and Replace “/var/lib/plexmediaserver” with “/volume1/Plex” and Save the file.
      4. Open next the file <YourTemp>\L0ck.bundle\Contents\Resources\l0ck_support\unl0ck.sh
      5. Search and Replace “/var/lib/plexmediaserver” with “/volume1/Plex” and Save the file.
      6. NB.: No need to change the __init__.py as mentioned on L0ck’s webpage.
      7. Finally Move the folder L0ck.bundle into the hidden Shared folder \\<YourSynology>\Plex\Library\Application Support\Plex Media Server\Plug-ins\
    4. Grant access for plex onto the plugin
      1. Open a Telnet console onto your Synology
        1. Run “telnet” from Windows
        2. Type: open <YourSynology>
      2. Login as ‘root’ with your admin password
      3.  Execute the following commands
        1. cd /volume1/Plex/Library/Application\ Support/Plex\ Media\ Server/Plug-ins
        2. chown -R plex:users L0ck.bundle
        3. cd L0ck.bundle/Contents/Resources/l0ck_support
        4. chmod a+x l0ck.sh
        5. chmod a+x unl0ck.sh
        6. chmod a+x sqlite3
    5. Re-enable the “authentication on local networks” on your Plex Media Server (if it was enabled)
    6. Restart now your Plex Clients and go to the “Channels” where you should see the L0ck” Icon:
    L0ck Plugin
    L0ck Plugin

    Et voilà 😉

    NB 1: By default, the libraries to be “controlled” are all unlocked. So, enter the plugin and L0ck them.

    NB 2: The display is not the same within Plex Home Theater and Plex Web Client. E.g.: in the Plex Home Theater (for Windows), you see both the icon “L0ck” and “Unl0ck”. In the Plex Web Client, instead, you see only the “L0ck” icon. In the Plex Home Theater, when you click on “L0ck”, nothing seems to happen while in the Plex Web Client, you see an “Locked” icon replacing the “Lock” icon. But you will quickly find your path…

    NB 3: Once your have clicked on “L0ck”, you have to restart your Plex Home Theater or refresh your browser if using Plex Web Client. On the opposite, with Plex for Samsung, I don’t have to quit and restart Plex after Unl0cking/L0cking my libraries, even if e.g. unl0cking via the Web Client…

    NB 4: To Unlock the libraries with the Plex Web Client (where the “unl0ck” icon is missing), go to the “Channels” page and enter the “L0ck” channel. Then type your password in the Search box and simply hit “enter”.

    NB 5: Once a movie started from an unl0cked Controlled library, the libraries can be rel0cked immediately. This is not stopping the movie as you could see when playing a movie within Plex Home Theater and re-locking the libraries via a Web Plex Client. So, based on that finding, I have customized the L0ck plugin to add a new button: “Short Unlock“. This one unl0cks the libraries for 2 minute and then re-locks them automatically. If you are interested in such a feature, you can simply add the following line in unlo0ck.sh, before the last line (with “exit;”):

    [shell](sleep 120 ; sh ./l0ck.sh) &amp;amp;amp;amp;[/shell]

    I have submitted this idea to the creator of the plugin (See here). So far, adding a new button does not offer the best user experience with the Plex Web Client due to some technical limitation…

    For additional Info: read the FAQ.

    On Synology, L0ck plugin’s log file is named “com.plexapp.plugins.l0ckunl0ck.log” and located in \\<YourSynology>\Plex\Library\Application Support\Plex Media Server\Logs\PMS Plugin Logs. It has better be opened with notepad++.

    Here is the thread about the release version of the plugin. And here is the thread about the development of the plugin…

    Loading

  • Expand a Synology RAID 0 Volume with bigger disks using VMWare…

    I had 2 x 2TB disks in a RAID 0 Volume on my DS713+ and wanted to replace them with 2 x 3TB… My first idea was quite simple: move the 2TB disks from the DS713+ into my PC, next to the 3TB disks, clone those 2TB onto the 3TB disks and resize the data partition… Unfortunately, googling for users’ feedback on such an operation, I finally felt that it could possibly be no such a real piece of cake… So, I used my second idea: “Backup” the DS713+ into a Virtual Synology, replace the 2TB with the 3TB in the DS713+ and “Restore”.

    Click to Read More

    I decided to not try the “partition resizing” approach because it seems that expanding next the Volume to use the free space on the partition could be difficult (if possible at all). I will for sure try that idea later with dummy data. But for now, I wanted a peace-of-mind-solution. So, I did:

    1. Create a Virtual Synology (a DS3612xs with DSM 5.0-4528) with enough space,
    2. Enable the Network Backup Service on that DS3612xs
    3. Clean-up as much as possible on the DS713+ (DSM 5.0-4528 update 1)
      1. Disabled the camera in Surveillance Station and  deleting all the recordings
      2. Stopping Plex, Video Station, Audio Station and Photo Station
      3. Deleting all the movies from \\<DiskStation>\video (As those are anyway backuped on my main server)
      4. Deleting all the musics from \\<DiskStation>\music (As those are anyway backuped on my main server)
      5. Keeping however the photos to not loose albums’ settings and thumbnails (as those would require days to be recreated!)
    4. Backup as much as possibly from the DS713+
      1. Using the native “Backup & Replication” feature, but also
      2. “Exporting” the Configuration of the “Surveillance Station” and Copying the extra licences (not the default one)
      3. “Exporting” all the complete zones’ settings from the “DNS Server”
      4. Taking note of the information not backuped:
        1. “QuickConnect”
        2. “External Access”
        3. “Network”
        4. “Security”
        5. “Notification”
        6. “Application Portal alias”
      5. Taking note of:
        1. All the Packages installed:
        2. The custom “Package sources” configured in the settings of the Package Center
      6. Backuping Wordpress
        1. Stopping first WordPress
        2. Taking a Backup of the database wordpressblog via a full “Export” with phpMyAdmin
      7. In addition, to be 100% safe,I also took a full copy of
        1. the Plex’s configuration & settings: \\<DiskStation>\Plex\Library\Application Support\Plex Media Server
        2. the WordPress installtion: \\<DiskStation>\web\wordpress
        3. All my “customized” stuff
    5. Replace the 2 x 2TB with the 2 x 3TB in the DS713+
    6. Reinstall DSM 5.0 on the DS713+ with the same name and admin’s password as previously
    7. I reinstalled WordPress, Plex, DNS Server and PhotoStation, but I did not configure them and stopped them! (Actually, I don’t know yet if installing them before the restore was required… — to be checked).
    8. Enable the Telnet Service in “Terminal & SNMP”
    9. Restore manually the information for
      1. “QuickConnect”
      2. “External Access”
      3. “Network”
      4. “Security”
      5. “Notification”
    10. Restore the Backup made on the DS3612xs. It included:
      1. All the Shared Folders selected to be backuped
        1. Shared Folders recreated when installing a Packages are renamed!
      2. The “File Services” settings
      3. The “Users”
      4. The “Groups”
      5. (I don’t use the Directory Services)
      6. The “Regional Options”
      7. The “Task Scheduler”
      8. The “Application Portal” alias
    11. Reinstall the other Packages.
    12. Import manually the DNS zones exported previously (via “Create” > “Import zone”).
    13. Fix issues with “Surveillance Station” if any.
      1. I had to delete the camera restored with the Backup in “Surveillance Station” (weird as I successfully restored such backups in the past…)
      2. Add manually my extra licences
      3. Import manually the Configuration settings I exported previously.
    14. Restore manually the database of WordPress via phpMyAdmin and start next WordPress. It should not prompt you anymore to configure it.
    15. Check that the expected content has been restore in the various Shared Folders: photo, Plex (music and video if not cleaned-up), etc…
    16. Delete all Plex’s plugins (hidden folder \\<DiskStation>\Plex\Library\Application Support\Plex Media Server\Plug-ins). They will be reinstalled automatically when you will start Plex. I have indeed noticed that various features do not run fine anymore in the Administration site otherwise. Ex.: choose language when editing libraries or fixing incorrect match, choosing providers, etc…
    17. Start all Packages currently stopped.

    Here after, the steps to create a Virtual Synology:

    Click to Read More

    1. Take the latest Boot Image iso available to start a “DSM” in a VMWare (Nanoboot-5.0.3.2 DSM 5.0-4528 x64) here.
    2. Take next the latest DSM pat Image (DSM 5.0-4528) here.
    3. Get the Synology Assistant from here and install it.
    4. Use VMWare Workstation 10 to create a new VM (You may create a Shared one to be able to run it remotely if you want):
      1. Create a “Custom (Advanced)” virtual machine
      2. Linux, version “Other Linux 2.6.x kernel 64-bit”
      3. With 1 processor, 2 cores
      4. 1024MB Memory
      5. Using a Bridged network
      6. LSI Logic Controller
      7. SCSI Disk Type
      8. And a large new virtual disk fully allocated (for performance reason)
    5. Instead of starting the new machine immediately, edit the settings: the CD/DVD must be changed to use the Iso Boot Image donwloaded at step 1.
    6. Next, edit the “.vmx” file created by VMWare next to the VM: Add this line just after the first one: bios.bootOrder = “cdrom”
    7. Now start the VM. It shows a menu with various entries named “Nanoboot-5.0-4528 xxx”. Pick the one to “Install/Upgrade”.
    8. Run next the Synology Assistant. It will find a “DiskStation” not yet installed. Select that one and right-click to “Install” it.
    9. When prompted for the Installation File, pick the pat file downloaded at step 2.
    10. Proceed until the installation is completed (Give a name to you new Synology. No need however to setup a QuickConnect ID).
    11. Enable the Backup https://www.synology.com/en-us/support/downloadService via the Start Menu > Backup & Replication > Backup Service > Enable Backup Network Service.

    You are now ready to backup your actual Synology.

    And icing on the cake, here is how to access the DSM and data still available in the old RAID 0 Volume (I.e.: on the two old 2TB):

    Click to Read More

    I did create a second Virtual Synology with the RAID 0 volume still available on the two old 2TB! Doing so, I will still be able to access all my data and settings if by any chance some have not been correctly restored.

    1. Take the latest Boot Image iso available to start a “DSM” in a VMWare (Nanoboot-5.0.3.2 DSM 5.0-4528 x64) here.
    2. Get the Synology Assistant from here and install it.
    3. Use VMWare Workstation 10 to create a new VM (You may NOT create a Shared as those do not support physical disks. Also you better have to run VMWare as Administrator otherwise adding physical disks could be disabled):
      1. Create a “Custom (Advanced)” virtual machine
      2. Linux, version “Other Linux 2.6.x kernel 64-bit”
      3. With 1 processor, 2 cores
      4. 1024MB Memory
      5. Using a Bridged network
      6. LSI Logic Controller
      7. SCSI Disk Type
      8. And add the two old physical disks. Notice: the order is important. If they are not in the correct order, the DSM won’t start and report a disk access failure. No panic: simply swap the disks and retry 😉
    4. Instead of starting the new machine immediately, edit the settings: the CD/DVD must be changed to use the Iso Boot Image donwloaded at step 1.
    5. Next, edit the “.vmx” file created by VMWare next to the VM: Add this line just after the first one: bios.bootOrder = “cdrom”
    6. Now start the VM. It shows a menu with various entries named “Nanoboot-5.0-4528 xxx”. Pick the one to “Install/Upgrade”.
    7. Run next the Synology Assistant. It will find your old Synology “Migratable”. Select that one and right-click to “Migrate”. The RAID 0 Volume is detected automatically and the DSM should load. If it fails around 50%, swap the physical disks and restart the VM. They are probably not in inserted in the correct order (I did swap them physically in my PC – as using bays- but I could have removed them from the VM configuration and re-added them in the right order).
    8. NB: installing with the option to download the latest DSM version failed. I had to download and use the pat file DSM 5.0-4528 available here.
    9. Give this new Synology a unique name and disable any service that would conflict with one already running somewhere else.

    Loading

  • Send a DSM Notification to one of your Synology users

    This is a simple note to remind me how easy it is to send a notification message to another user on my NAS, from a telnet prompt, using the command: synodsmnotify user/group “Title” “Message”

    Click to Read More

    Ex.: synodsmnotify valery “Hello” “Don’t forget to post a note about such findings on your blog”

    Where “valery” is a valid user, defined on my Synology… Notice that if the user does not exist, you will get an error like this:

    synodsmnotify.cpp:27 SYNOUserPreferenceDirGet(valery) fail, [0x1D00 user_db_get.c:53]

    synodsmnotify.cpp:172 Fail to send notify to valery

    Loading

  • Update DSM 5.0 with the latest fixes

    I have just applied the latest service pack for DSM 5.0. Soon after, I started to experience connection issues to my own blog from my Intranet. This was due to some (???) issues with the DNS Service running on my Synology.

    Click to Read More

    Issue confirmed: executing a “ping beatificabytes.be” in a CMD prompt was returning the internet IP of my ADSL Modem, instead of the IP of my NAS.

    As a reminder: I did configure my Router and my Synology’s DNS Service to be able to access my blog on my intranet with it’s actual FQDN (See here). And after the upgrade from DSM 4.0 to DSM 5.0, I had to enable the “Resolution Service” in the “DNS Server”.

    Now, to solve the connection issue experienced after updating DSM 5.0:

    1. On the Synology, in the “DNS Server” configuration pane, I had first to:
      1. Disable the “Resolution Service” and clicked Apply
      2. Re-enable the “Resolution Service” and clicked Apply
    2. Next, on my PC, in a CMD prompt, I did executed:
      1. ipconfig /flushdns
      2. ipconfig /renew *
      3. ping beatificabytes.be

    Et voilà !

    Loading

  • Upgrade from DSM 4.3 to DSM 5.0

    Wow, what a fancy look & feel !!! That’s my first impression  😀

    But what I really care about, is that all the services I was using on DSM 4.3 are still running fine… And it seems to be the case once a few issues fixed…

    Click to Read More

    After the upgrade, various packages had to be updated. Unfortunately, the updates did not all passed successfully. I got errors like “failed to download” (notice: I did an update of all my packages before upgrading from DSM 4.3 to 5.0 as recommended by users on Synology’s forum)

    I discovered soon that I was actually unable to download and install any other packages. And looking into Control Panel > Update & Restore, I saw the Status “Connection failed. Please check your Internet connection“.

    I  was unable to play Internet radio within the Audio Station and trying to “Update Now” the DDNS service (Control Panel > External Access > Update Now), I was receiving a message like “Network error occurred. Please check your DNS and network settings.

    As Download Station was still able to download, the internet connection was not the issue. So, based on the hypothesis that it should be a DNS issue, I did force a DNS address manually in Control Panel > Network > General > Manually configure DNS Server. I did set the IP of my Adsm Modem as it’s configured to forward DNS request to my provider. But I could have tried with Google’s DNS: 8.8.8.8 or 8.8.8.4

    And it solved all the issues above ?!

    As a reminder, my DHCP server is configured on my Buffalo Router to provide the IP of my NAS as a DNS Server (I run the “DNS Server” package of Synology) and the IP of my ADSL model as a fallback. It used to work fine before the upgrade and as I didn’t change anything else in my infra, I thought that some behavior could have change in some Syno’s services. I did try various changes and found one that was solving the issues without manual configuration of a DNS IP on my Syno:

    I had to “Enable resolution services” in my Synology’s “Control Panel > DNS Server > Resolution” settings. Simple, no ?

    But I discovered then another issue: my Plex Server was not accessible anymore (when opened from DSM’s start menu). It was trying to start on the IP address of an unused Ethernet port – There are two Ethernet ports on the DS713+ and only the second one of mine was plugged on my Switch. The IP used by Plex Server was therefore a default one: 169.254.x.x. So, I did connect the first Ethernet ports on my Switch and did a reboot. I was next able to access the Web UI on the IP assigned now to my NAS’s first Ethernet port.

    But it was not solving everything. Indeed, plex.tv was still not able to reach my NAS since my ADSL Modem was forwarding the default port of Plex (32400) onto the IP of the second Ethernet port and not on the first one (I.e.: on the IP Plex Server was actually listening on). As my NAS is only connected to one LAN, I decided to enable the Link Aggregation to merge the two ports into a “virtual single one”. Doing so, I would have only one IP assigned to my NAS and both Ethernet port used together to increase a bit the bandwidth: Control Panel > Network > Network Interface > Create > Create Bond > IEEE 802 Dynamic Link Aggregation. I did complete the Wizard (using DHCP the get an IP) and went to reconfigure my DHCP server (on my Buffalo Router): I.e.: I did update the static leases and assigned the static IP wanted for my NAS on the MAC address currently used by the Dynamic Link Aggregation (It’s available in the Control Panel > Info Center > Network > Bond 1).

    Once the DHCP server and the Synology reconfigured, I did reboot both (to avoid caching effect). Unfortunately, when accessing my server via plex.tv, it was still not displayed as “online” 🙁 Also, in the “Plex Media Server”‘s settings “myPlex”, I was unable to connect with my login/password and worst, I was unable to change any settings in my Plex Server: Saving changes was always failing… I found a note about a known issue on the Synology website:

    DSM 5.0: Known Issue – Plex Media Server
    Users need to manually set read permission for the “plex” user at the User page in Control Panel to allow Plex Media Server to read the shared media folder content.

    But trying this fix didn’t solve my issues.

    I thought then that there could be a more recent version of the Plex Server on plex.tv than on Synology… And indeed. The version I had was 9.8 and there was a 9.9 on Plex.tv. I did download the spk for my processor (DS713+ = Intel) and did install it manually. And Bingo, my Plex Media Server was now able to connect to myPlex and it appeared as “Online” in plex.tv !!!

    So, to conclude, the following services are now running fine:

      • Download Station (it resumes the download of your the torrent without any issue)
      • Surveillance Station (the time line is not broken)
      • DNS Server (once the “Resolution Service” enabled as mentioned above)
      • Video Station (has been updated)
      • Photo Station (has been updated)
      • Webalizer (has been updated)
      • Plex  (After a manual update as mentioned above and some reconfiguration of the IP/Ethernet port used)
      • WordPress (has been updated)
      • phpMyAdmin

    Changes I noticed:

    • As usually, after the upgrade of WordPress (If you do so), you will have to reset the permalinks’ format (via Dashboard > Settings > Permalinks > Common Settings > re-select your structure and “Save Changes”). Otherwise, links to your posts (E.g.: found via google or kept as favorites by readers) won’t work anymore..
    • The DDNS service is now named “External Access”. Nothing has changed and nothing needs to be reconfigured.
    • MySQL has been replaced by MariaDB (a fork of the original project). Start it once to finalize the update (you will have to provide your password). phpMyAdmin still runs fine and connects automatically to MariaDB with your current root login and password.
    • You will now get a monthly report by email with the status of the disks. Ex.:

    Dear user,

    The following is your monthly report regarding the health of disks on <serverName>. You can also check the health of individual disks at Storage Manager > HDD/SSD > Health Info.

    Disk 1:

    Disk Reconnection Count 0

    Bad Sector Count 0

    Disk Re-identification Count 0

    Disk 2:

    Disk Reconnection Count 0

    Bad Sector Count 0

    Disk Re-identification Count 0

    Loading

  • Plex Server on Synology DS713+: Cannot load M3U8: 404 not found

    When trying to watch a movie streamed by the Plex Server of my DS713+, I used to get an error “Cannot load M3U8: 404 not found” (only on mobile devices or within a browser). This was due to a wrong “temp” directory configured (out-of-the-box) for transcoding purpose.

    Click to Read More

    Watching movies was working fine with the Plex Theater on my PC.

    I had the error message “Cannot load M3U8: 404 not found” only when trying to play movies within Chrome (on a PC or on a tablet).

    I read on the web that this error could be due to the NAS struggling with transcoding the movie (which is done or not depending on the client’s spec). Plex clearly states that one needs a dual-core NAS to be able to do transcoding. But I have a DS713+. So it should have been fine

    I also read that Plex Theater (on Windows) does not need any transcoding. As it was working fine, I definitively though there should be something wrong with the configuration  of the transcoding…

    I did look at the logs of Plex Server (in \\<MyNas>\plex\Library\Application Support\Plex Media Server\Logs) and found that error:

    [code]ERROR – Exception handled: boost::filesystem::temp_directory_path: Not a directory: “/volume1/Plex/tmp_transcoding”[/code]

    Checking directly on the NAS via telnet, I found that the right path should have been /volume1/Plex/Library/tmp_transcoding (Notice: “Plex” starts here with a upper case although the related shared folder accessible via SMB starts with lower case!!!)

    So, I did force that correct value via the Plex server web interface > Settings > Transcoder > Show Advanced Settings > Transcoder temporary directory.

    And BINGO !!!

    Loading