McLean IT Consulting

WORRY FREE IT SUPPORT

Call Us: 250-412-5050
  • About
  • Services
    • IT Infrastructure Design
    • Remote & Onsite IT Support
    • Disaster Recovery
    • IT System Monitoring
    • IT Audit
    • Documentation
    • Medical IT Solutions
    • Wireless Networks
    • Cloud Computing
    • Virtualization
  • Partners
    • Lenovo
    • Ubiquiti Networks
    • Dragon Medical Practice Edition (Nuance)
    • Synology
    • Drobo
    • Adobe
    • Bitdefender
    • NAKIVO
  • Contact
  • Blog
  • Remote Support

Synology – How To Check Thumbnail Conversion Progress

May 5, 2015 By Andrew McLean 22 Comments

synomkthumbd
By default, Synology NAS devices will index all media files (pictures, music, videos) and generate applicable thumbnails. When a new file is indexed, this kickstarts a process that asks the thumbnail generator to get to work generating various thumbnail sizes for a given file. A common complaint from Synology users is that they can’t tell if the thumbnail process is frozen. I myself was curious which exact file the conversion process was working on, so I found the means which I’ll explain here.

The background process that generates thumbnail images for Synology devices is the aptly named synomkthumbd, presumably for Synology Make Thumbnail Daemon. In Synology DiskStation Manager, this process is called Thumbnail Conversion.

Here I’ll detail how to connect to the Synology device via SSH to find out what files synomkthumbd is currently performing thumbnail conversion for.

Connecting Via SSH

This process assumes some familiarity with command-line tools like telnet. In Mac you merely need to open a terminal window, but in Windows you would have to third-party utility like PuTTY (because Microsoft’s Telnet solution does not support SSH protocol).

Update 08/2015: Windows 10 now includes SSH in PowerShell.

If, for whatever reason the Synology does not respond to the SSH request, make sure SSH is enabled by logging into the DiskStation Manager interface and navigating to Control Panel > Terminal & SNMP > Terminal.

You must be logged in as root or the final query will give you a “Permission Denied” error.
ssh root@[synology IP]

At this point it may say something about an RSA key fingerprint (particularly if this is the first time you’ve ever connected via SSH) and ask if you’re sure you want to continue connecting. Just say yes. By default, the root password should be the same as your admin account.

Find Thumbnail Conversion Process ID

Every computer process always has a unique process ID (PID) associated with it for reference. This number will usually be different each time this process is started, so we can’t assume what the number will be. First we query the system to find out the Process ID of synomkthumbd

pidof synomkthumbd

It will answer with the PID which will simply be a number.

List File Descriptors

Next we list the file descriptors that are being used by that process using the ls command

ls -l /proc/[pid]/fd

This should output a list of (what appears to be) workers that generate the thumbnails. On my box I see three folders called 0, 1, and 2, which I believe act to generate thumbnails for multiple files at a time. Note that PID number will change each time a new synomkthumbd creates a new process, so if you get a “no such file or directory” error in this step, go back to the previous step and see if the PID has changed.

If, for whatever reason, it appears that the thumbnail conversion process has frozen, it can be stopped and restarted without restarting the entire Synology NAS this way:

/usr/syno/etc/rc.d/S77synomkthumbd.sh stop
/usr/syno/etc/rc.d/S77synomkthumbd.sh start

The the same basic process is applicable to video thumbnail generation, except videos are generated by ffmpeg-thumb instead of synomkthumbd; there also appears to be folders 0 through 4 for that service.

Update: May 2015

It appears that the methods for starting and stopping the thumbnail conversion process that I described above are obsolete. (Thank you Peter). It previously worked as of DSM 5.1 but it was probably deprecated and since the 5.2 update they presumably got around to eliminating the old way.

Instead, Synology has added a central service management system, which you can call via SSH by running synoservicecfg.

If you feel the need to go down the rabbit hole, you can get a list of command arguments by running

synoservicecfg --help

Or you can simply get a list of services (which includes the synomkthumbd service) by using this command:

synoservicecfg --list

Armed with the name of the service you want to stop and start, the same synoservicecfg command can stop, start, or restart it.

synoservicecfg --stop synomkthumbd
synoservicecfg --start synomkthumbd
synoservicecfg --restart synomkthumbd

Filed Under: Tips

Synology – How To Check Index Progress

May 5, 2015 By Andrew McLean 43 Comments

DS1815
When you add new music, photos, or videos to a Synology share, by default, the device will scan the new files, render some new thumbnails and index the file in the appropriate library if applicable. This indexing process is necessary for the files to be shown through the various media services such as Photo Station and Music Station. A common complaint from Synology users is that this indexing or thumbnail conversion process can get stuck.

Unfortunately, at the time of this writing, Synology has not implemented any kind of progress bar or anything to indicate whether the process really is frozen. Depending on the type of media being indexed, it may not in fact be frozen and there are perhaps more files to index than you are aware of.

Here I demonstrate the process to monitor the index progress to see if it is truly frozen, or simply to check the index progress out of curiosity.

Connecting Via SSH

This process assumes some familiarity with command-line tools like telnet. In Mac you merely need to open a terminal window, but in Windows you would have to third-party utility like PuTTY (because Microsoft’s Telnet solution does not support SSH protocol).

Update 08/2015: Windows 10 now includes SSH.

If, for whatever reason the Synology does not respond to the SSH request, make sure SSH is enabled by logging into the DiskStation Manager interface and navigating to Control Panel > Terminal & SNMP > Terminal.

ssh [username]@[synology IP]

At this point it may say something about an RSA key fingerprint (particularly if this is the first time you’ve ever connected via SSH) and ask if you’re sure you want to continue connecting. Just say yes. By default, the username and password should be the same as your admin account.

Ask (Query) The Database

psql mediaserver postgres

This will open a PSQL command prompt where you can perform what’s called a SQL query, which is basically a fancy way of saying you’re asking the database a question. SQL stands for Structured Query Language and is the standard language for database interaction.

SELECT COUNT(*) AS video_count FROM video;
SELECT COUNT(*) AS music_count FROM music;
SELECT COUNT(*) AS photo_count FROM photo;
SELECT COUNT(*) AS dir_count FROM directory;
SELECT * FROM music WHERE id = (SELECT MAX (id) FROM music);
SELECT * FROM photo WHERE id = (SELECT MAX (id) FROM photo);
SELECT * FROM video WHERE id = (SELECT MAX (id) FROM video);
SELECT * FROM directory WHERE id = (SELECT MAX (id) FROM directory);

The above query is actually 8 separate queries. For the first four it will answer with a table indicating how many photos, videos, songs, and folders have been indexed, followed by a comprehensive list of the most recently indexed file under each category, along with related tagging information (such as file name, format, length, etc). Generally, (at least in my experience) photos will be more numerous so will take the longest. So we can check the progress for just the photos like this:

SELECT COUNT(*) AS photo_count FROM photo;

Or if you simply wanted to see the name and location of the photo it most recently indexed, you could use this query:

SELECT path FROM photo WHERE id = (SELECT MAX (id) FROM photo);

Note that each query starts with a “SELECT” statement and each query ends with a semicolon (;). Capitalizing the different SQL statements is not necessary, just a force of habit.

Update February 22, 2016: As Sietse noted in the comment section, changes between DSM 5.2 and DSM 6 mean that by default, you can no longer login to the root account directly via SSH. Instead you must login as an admin user and escalate to root using the SUDO command. (e.g. sudo psql mediaserver postgres.

Update March 2, 2018: I hadn’t revisited this subject in some time now but I recently had a power outage that seems to have triggered some kind of full reindex of Photo Station.
I had uploaded a bunch of photos and music and nothing had shown up for a couple of hours, which indicated to me that the index was busy doing something else.

For reference, /var/spool/syno_indexing_queue is where all file changes are queued up for the indexer to process. Once the indexer triggers, it moves this file to sync_indexing_queue.tmp, so that’s the file to check when you want to see what it’s currently working on.

When I ran:

cat syno_indexing_queue.tmp

It showed:

#offset:128;                                                                                                                   
PhotoStation:1:R:photo

Something told DSM to run a full reindex of Photo Station. I’m not sure if it was a coincidence or if it really was the power outage — I’ve never got a straight answer about what exactly triggers a full index, though I’ve seen it more than once. The power outage seems less likely though, since it was shut down smoothly by my UPS controller.

In any case, it got my attention again.

The SQL queries I wrote about before are all well and good, but sometimes I just want a continuous poll of where it’s at, without having to manually run the command over and over. I could do some kind of cron job and output to an HTML file with an auto refresh but it comes up rarely enough that I just wanted a quick & dirty shell script to do it.

Long story short, here’s what I came up with:

while sleep 30; do ls -l /proc/$(pidof synomkthumbd)/fd | grep volume ; done

Basically what the above one-liner does is every 30 seconds it’ll poll the synomkthumbd process and find out what it’s working on and print the results to the console. A new line will output every 30 seconds until you exit the command. the grep volume section at the end just cleans up the output so that it only shows you the relevant information (assumes volume is in the response line as in volume1, volume2 etc).

The command may take a bit to show results because there are times when it’ll be between files so it won’t have any output. Just wait a minute or two and you should start to see results. Or alternatively you could shorten the polling period from 30 to something shorter.

Is your index frozen? Learn how to restart it.

Filed Under: Tips

Synology — How To Fix a Frozen Index Process

May 5, 2015 By Andrew McLean 35 Comments

DS1815
When you add new music, photos or videos to a Synology share, by default, the device will scan the new files, render some new thumbnails and index the file in the appropriate library if applicable. This indexing process is necessary for the files to be shown through the various media services such as Photo Station and Music Station. A common complaint from Synology users is that this indexing or thumbnail conversion process can get stuck.

Unfortunately, at the time of this writing, Synology has not implemented any kind of progress bar or anything to indicate whether the process really is frozen.

Here I’ll explain the simple process of restarting the frozen index and thumbnail conversion process. The downside of this is that it will start the indexing from the beginning, but any thumbnails generated up to the point of it being frozen will remain.

Connecting Via SSH

This process assumes some familiarity with command-line tools like telnet. In Mac you merely need to open a terminal window, but in Windows you would have to third-party utility like PuTTY (because Microsoft’s Telnet solution does not support SSH protocol).

If, for whatever reason the Synology does not respond to the SSH request, make sure SSH is enabled by logging into the DiskStation Manager interface and navigating to Control Panel > Terminal & SNMP > Terminal.

In DSM 6 for security reasons you must login as an admin user (not necessarily “admin”) and then run the commands as root by preceding commands with “sudo”

ssh admin@[synology IP]

At this point it may say something about an RSA key fingerprint (particularly if this is the first time you’ve ever connected via SSH) and ask if you’re sure you want to continue connecting. Just say yes. The first admin user you created when setting up the DiskStation and root will have the same password.

The Command

#change directory to the index spooler directory
cd /var/spool
#restart index service
sudo synoservicectl --restart synoindexd
exit

Update 09/16: Previously this article included a command to delete the two temporary files syno_indexing_queue and syno_indexing_queue.tmp, but this is should not be necessary unless the files themselves are corrupt somehow. The problem with deleting the queue files is that they feed the indexer the information it needs to know what to index, and if we delete those the index may be incomplete, with no way of knowing what it was going to index. If you do end up deleting them for whatever reason, the only sure way of getting a complete index would be to force a full re-index.

I’m not sure yet what triggers the synoindexd service, but on occasion it seems that for days it does nothing. It’s not until I reboot it that it seems to kickstart the indexing process again.

When you edit/add/delete files, they are automatically logged in the syno_indexing_queue file. When the indexing service is triggered, it renames it syno_indexing_queue.tmp while it processes it (which can take a while if it hasn’t been triggered in a long time). In the meantime while it’s processing the .tmp file, any subsequent changes will go to a new syno_indexing_queue file.

The bottom line is if you see this .tmp file, theoretically the indexer is already processing it. If you see a syno_indexing_queue file but no syno_indexing_queue.tmp, then the indexer hasn’t been triggered and can be triggered manually with the command above.

Is your Synology index really frozen or just taking a long time? Learn how to check.

Filed Under: Tips

Homelab Introduction: Part 1 — Synology

April 1, 2015 By Andrew McLean 3 Comments

Since I can’t reveal a lot of the projects I’m working on due to nondisclosure agreements, security, and privacy concerns, I thought I’d post some information about my homelab.

A “homelab” is a testing environment where I can simulate the infrastructure of different clients in order to create new systems or improve upon old ones — without risking the client’s information in a *production* environment. In other words, it’s a safe place to break things where the breaking of the things doesn’t disrupt business operations.

Instead of describing it, it will probably be helpful to see some photos.

Homelab
McLean IT’s server rack, or “Pretty In Pink”

Everything here was selected carefully for the available features and performance. I opted for CAT6 cable instead of CAT5e so that it would be relatively “future proof” without going overboard with fiber. I colour coded the patch cables to simplify visual inspection. Black for core network (Router Gateway/Firewall, Wireless AP), green for my Virtualization server, the four purple cables for the four NIC interfaces on the Synology DS1815+ in order to take advantage of the Link Aggregation (LACP) bonding for a 4-Gbps connection (made possible by the Netgear GS724Tv4), and the other patch cables I chose pink to please my daughter who loves pink.

Synology DiskStation DS1815+

I’ve been a Synology reseller for a while now, but until now didn’t have the budget to invest in a unit of my own. For the last several years I’ve relied heavily on a tried & true SuperMicro rack mount server (not shown) that I believe originally ran Windows Home Server before being upgraded to every Windows Server iteration since. Microsoft Windows was the path of least resistance since most software was available for it and I mostly had Windows workstations anyway. The more recent operating systems also had the benefit of coming with Hyper-V as a virtualization platform. Though it doesn’t have some of the features I’d grown to love from VMware (like the ability to forward physical USB devices directly to a guest OS), it did the job. However since there were only four drive bays, and because Windows software RAID doesn’t expand gracefully when swapping in a larger disk, it was quickly showing its age with a meagre 1.2 TB storage spread across four 500GB drives. This was not sufficient capacity for my family’s digital photo collection, let alone our music collection, videos, or any other projects I might intend.

Long story short, I took the plunge and invested in a Synology DS1815+, a relatively new model with an 8-disk capacity, quad-core processor, 6GB of RAM (upgraded from 2GB) auto-expanding RAID file system and the option of two additional 5-disk expansion devices for a potential total of 18 disks. At this point the largest drives available are 6TB which means a theoretical maximum of 108TB of data.

I knew the features Synology offered but somehow it wasn’t until I began to use it at home and started looking for opportunities to use it more that I really started seeing the potential.

First Up, Photos.

Photo Station demo
Photos load fast and transitions are fluid.

Photos were the top priority for us. My wife takes a lot of pictures. Currently we are storing a little over 380,000 photos, taken over the course of the last 15 years plus some older ones that were scanned in from analog photographs. That said, if I were ever to lose the photos in a drive crash or other disaster, she might murder me. Until we had the Synology, out of paranoia she would store primary copies on her desktop, backup to the old server, and then copy again to a couple of NAS devices I had lying around. The problem was that no single location had enough capacity to store the entire photo library, so it had to be split among devices. It was becoming increasingly difficult to know what was stored where, or even where the most up-to-date repository was. This simply could not stand for a trained IT professional, but as they say “A builder’s home is never finished.”.

Anyway long story short, I loaded the whole photo library to the Synology and it spent a few days generating thumbnails in the background in order to more rapidly show images through the Photo Station interface. In the end it looks and performs great! I can even access all the photos and videos remotely from my phone, tablet or laptop. The iPhone utility also enables me to auto-upload photos, which is great for someone like me who never takes the time to copy the photos off of their phone. Photo Station can also act as a full-fledged website, complete with photo sharing, tagging, and commenting. And not everything needs to be shared. Folder availability will depend on user permissions and all folders and albums can be locked with a password.

Then Music

Like most people, my wife and I have amassed a collection of music — not quite as extensive as the photo collection, but significant enough that it would be beneficial to store it somewhere we could access easily. Synology has a solution for that. More than one, in fact. One is Media Server, which is a DLNA/UPnP server that streams both audio and video to compatible devices. Then there’s the iTunes server, which is pretty much exactly what it sounds like — it makes the entire music library available and accessible from inside iTunes on your desktop. Then, of course, there is the Audio Station.

Synology Audio Station
My family and I have eclectic tastes.

Again the music is accessible from anywhere (with the proper configuration). I sometimes stream music to my phone while I work, since somehow I’ve grown tired of the hundreds of songs on my iPhone. Audio Station can also stream music directly to AirPlay devices which is perfect since there are a handful of AppleTVs scattered throughout my home. Plugins are available to automatically search and display lyrics to the library.

Central Video Hub

Synology also has a streaming video solution — Media Server as mentioned above, and also the simply named Video Station. I spent a couple of weeks importing video from a large data set of old home DV tapes, over 120 Hours worth, and put them into the Synology Video folder. The system automatically scanned all the videos and generated thumbnails for easy identification. Lately I’ve been trying to introduce my kids to some classic Disney movies that I used to love at their age, but I don’t want them to continue to abuse discs the way kids do, so I imported a bunch and we’ve been enjoying streaming directly. You can see from the photo below that the system automatically recognizes films, then searches and displays the cover art and other information. Video Station also supports certain USB TV tuner cards which can effectively turn the unit into a DVR.

Video Station on DSM 5.1
Classic Disney is the best.

All of this software and more runs on DiskStation Manager or DSM. Other packages include a built-in AntiVirus, Download Station (which searches and downloads from a variety of Torrent and eMule sources), and hundreds more.

General File Storage

Of course on top of entertainment, the Synology can be used as a regular file server. Boring old documents and such. One of my favourite features is an app called Storage Analyzer, which you can schedule to run as often as you like. Not only does it give you a visual representation of the storage on the unit, but also what types of media, what users stored them and more.

Synology Storage Analyzer (DSM)
See at a glance how storage is allotted.

Sometimes when I’m copying data from an old drive I risk storing the same file twice in separate locations. Or in the case of our photos and videos, something gets mis-filed in the wrong month. The same Storage Analyzer automatically checks for duplicate files. From the window I can compare the files and delete the mis-filed one if necessary and saves me from wasting precious storage space.

Synology duplicate file detection
Easily identify duplicate files

What About Backups?

Synology has a great backup system already which utilizes Amazon’s Glacier service — with possibly the most intuitive interface I’ve encountered . If you can manage to navigate your way through Amazon’s sometimes labyrinthine AWS console, and sign up for Glacier, you can store backups there for around 1¢ per GB. So for 500GB you’d be charged $5 per month.

However, since my photos alone account for around 1.2TB of data, I had to get creative. Google, as always, never fails to disappoint, and I ran into Scott Hanselman’s blog which outlined for me how to deploy CrashPlan to the Synology for unlimited storage at around $6 USD a month.

NAS>DAS

I love the fact that the Synology DS1815+ is mostly autonomous, but that I can get my hands dirty when necessary. The fact that it has it’s own “brain” means that it doesn’t depend on any other device to work. Not so with Direct Attached Storage — if I wanted to run a full AV scan, I would have to wait until it finishes, and could not let my computer sleep, reboot or update for fear of having to start the scan over again. In the past I’ve enjoyed using Drobo DAS and NAS devices, but I was often frustrated by the lack of administrative control I had over it. Drobo has designed their hardware and software to be dead simple, and for that they’re incredibly great. But I’ve grown to need a higher level of control. Another problem I encountered with the Drobo units was a Volume size limit of 16TB — no such limitation exists on Synology.

So that’s the Synology DS1815+ at the core of my home office/homelab. Stay tuned for part 2 where I highlight the network equipment, and part 3 for the various client systems.

Filed Under: Homelab

What is a NAS?

March 18, 2015 By Andrew McLean Leave a Comment

When you have a lot of stuff to back up, nothing tops a good NAS. What is a NAS? It means “Network Attached Storage”. It means instead of plugging in an external hard drive via USB, you only need to be connected to a network. Ostensibly, the same network that connects you to the internet. Which also means that you don’t have to remember to plug anything in to perform backups.

A NAS can have a single hard drive or even dozens in some commercial cases. It all depends on what features and performance you need.

So what kinds of things can a NAS do?

Backups and Archiving

Obviously a NAS is great for backups. We’ve all heard the horror stories. Years of business records lost. Photos of children’s first steps gone forever. A NAS backup is the first line of defence against these outcomes.

Some backup services like Apple’s Time Machine are extremely easy to use, but they have many limitations. For example, Time Machine will automatically back up the whole computer, and take a snapshot every hour afterwards until the backup device is completely filled, then it will delete the oldest backups to make room for the newer. But what if you share that drive with other people? Or what if you want to use it for other things. Things other than backups? Well, some of the more advanced NAS devices have a solution for that, called Quotas, that enable you to limit the amount of space that a user can store in a given location. You can set a limit for each user so that their individual backups don’t overrun the system.

Sometimes it’s not a backup you need, but rather a place to move things for later retrieval. For example when maintaining your email inbox, you might archive the oldest emails and need to put them somewhere safe in case you need them. This has the added benefit of removing the clutter from your every-day computers.

File Server

If you have a larger network and need a central place to store files, a NAS is great for that too. Especially for SOHO business networks that don’t require the full feature set of a server, or who wish to avoid the expensive licensing costs.
The benefit of having a central file server is to eliminate the need for the old “sneakernet“. It allows you to share information quickly, collaborate with teams and create more efficient workflows. The file server is the backbone of most modern offices.

Storage Area Network

Some NAS devices can act as a Storage Area Network or SAN. This makes it behave as a functional hard drive for several separate servers, accessible over fast networks. This is especially true when leveraging virtualization in higher-end networks. It means that the servers themselves can be swapped out easily when they fail, and the virtualized server (stored on the SAN) can simply be powered on from any other connected virtualization server. But chances are, if you know what virtualization is, you are already familiar with both NAS and SAN devices.

Media Server

While some NAS devices are designed to be extremely simple to use and manage, others allow a greater freedom of choices. For example many modern NAS boxes can act as a Media Server. This can scream video, audio or even photos to set top boxes like the AppleTV, the Roku, or a custom Kodi HTPC.
Whole-house audio used to be an expensive proposition. Using a NAS can be the silver bullet that makes this possible.

Web Server

If you are a web developer, having a local server to develop on (other than your local computer) can be immensely helpful in creating a controlled environment to test from. A Synology NAS can easily fill this role, complete with PHP/MYSQL, Java, Ruby, Tomcat, Python, and Perl.

VoIP

Believe it or not, a NAS can also act as a VoIP PBX (Private Branch eXchange). Ever wonder how businesses have multiple phones but a single phone number? A PBX is how. Historically PBX devices have been prohibitively expensive to purchase and maintain. But technology has come a long way and it is possible to deploy your own, complete with voicemail, call display, and “Music On Hold” options among many others. See Free and Open Source projects like Asterisk or FreePBX for more info.

So really, a NAS can be anything from a simple data storage solution to a full-featured server — one that fits right in at home, in the home office, or even in the enterprise.

Check out our Synology page for more details on their award-winning NAS devices.

Filed Under: Technology

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 12
  • Next Page »

Contact Us

McLean IT Consulting Inc.
Serving Greater Victoria

P: 250-412-5050
E: info@mcleanit.ca
C: 250-514-2639

Featured Article

What is DHCP?

On any network, as with the Internet, every device needs an address in order to send or receive communication. DHCP is a system that makes this … Continue Reading

Blog Categories

Our Mission

We seek to enrich and improve small and medium businesses by delivering best-in-class technology solutions, and offering a premier customer service experience. Contact Us Now!

Quick Menu

  • About
  • Testimonials
  • Contact
  • Blog
  • Sitemap

Let’s Get Social

  • Email
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Copyright © 2025