2012-08-23

Synology: tweaking @eaDir

Thumbnails and indexes on Synology NAS are a pain. Not because they serve little purpose; the problem is that these folders are actually externally visible, especially when you don't want them. Every other multimedia manager would then list all these thumbnails again. Now this sucks a lot.

Good thing is, there is a way to tweak it. Here's how you do it.

In order to execute any of these steps, you need to open a SSH connection as root user to your synology NAS.

To completely disable indexing:

cd /usr/syno/etc.defaults/rc.d
# Disable restarting service on next boot-up.

chmod a-x S66fileindexd.sh
# Stop currently running index service.

. ./S66fileindexd.sh stop
# Remove entirely all index folders.

find /volume1 -type d -name '@eaDir' -print -exec rm -rf '{}' \;

I've been trying to look up alternative way to disable it. There is a possibility to query current status of shares to see which ones have indexing enabled.

synoshare is a tool that was created to report status of the shares. Usually, you can alter indexing settings of your custom shares using indexing application available through synology web interface. This is true for every folder, except for music, photo and video.

If  you invoke:

synoshare --enum ALL

you will see all your shared folders listed. Among them you will see the three above mentioned folders (unless you selected some other folders to host your multimedia). Now, when you invoke

synoshare --get photo
synoshare --get music
synoshare --get video

you will notice, that the status reported for these three is non-zero. A hint for programmers:
0x10 = locked
0x20 = indexing enabled
0x40 = indexing required
now the only question standing is - how to modify the share database located under /tmp/.db.synoshare.{BUILD}. Synology libraries allow to alter  these settings, but messing with them does not feel right - actually it requires more tweaking than just turning off one script, so i believe - until Synology offers possibility to turn off indexing of media folders  - there is no better solution, sorry.

2 comments:

  1. Nice post. You can also edit /usr/syno/etc/smb.conf and set mediaindex=no for the photo and video folders.

    ReplyDelete
  2. thanks for extra tip :). I was hoping i could turn on/off indexing feature on other folders, but i failed. I could not find the complete source code to Synology stations, and what I found was not clear enough to figure out how to use their commands or tweak the system manually.

    ReplyDelete