The QPhoto index issue

April 16, 2017 technews

When you set up a QNAP NAS for the first time there are some tips and tricks that no-one tells you and that can get worse your experience and that you can’t recover after the first set-up if you make some a mistake.
One of these issues is the size of the first volume, because the QPhoto application use this volume to store its photo thumbnails and if the free space drops below a pre-defined quota of 5% it stops the indexing of the new photos. This could be a good idea when the volume size was about 500Gb or 1Tb, but when your primary volume is the volume where you store Film, Music and Photos and its size is about 10Tb, the indexing process stops when you have about 500Gb of free space, when the thumbnail generator probably needs 1Gb or less.

The bigger issue is you can’t change the volume used by the QPhoto (Photo Station) application and if you have filled the primary volume with 5~6Tb of data is not so easy to move that files in a different volume, free and resize the primary one to reserve the volume to QPhoto.
The QNAP support forum does not provide any solution and all users says that the only way is to free space or extend the volume. After some experiments killing and restarting the process with:

kill $(ps faxu | grep mymediadbserver | grep -v grep | head -n 1 | awk '{print $1}') ; /usr/local/medialibrary/bin/mymediadbserver -n -t -d -i -1

I found an interesting log message:

[2017-04-16 10:57:29] Error: signal 15 (Terminated):
/usr/local/medialibrary/bin/mymediadbserver(mySignalHandler+0x25)[0x80505d5]
[0xf7762400]
/lib/libc.so.6(__libc_start_main+0xe0)[0xf5674f90]
/usr/local/medialibrary/bin/mymediadbserver(__gxx_personality_v0+0x3cd)[0x80503f1]
My Media Database Server is launching ....
[2017-04-16 10:57:29] mymediadbserver is launching...
[~] # none: prio 4
idle
s_maxWatches = 117964
Loading g_config...
enableSleepOnDiskFull = 1
OPTIONS:FileUmask0 = 0
OPTIONS:FileUmask1 = 0
OPTIONS:FileUmask2 = 0
OPTIONS:FileUmask3 = 0
Waiting Command (6) ..

The enableSleepOnDiskFull is a option that seems to refer to my issue so, with:

strings /usr/local/medialibrary/bin/mymediadbserver | grep conf

I found the configuration file in /etc/config/medialibrary.conf and add theenableSleepOnDiskFull = 0 with vi:

[TRANSCODESVR]
ENABLE = 1
INOTIFY = 1
[OPTIONS]
ENABLE = 1
INOTIFY = 0
VERSION = 20151204
IMPORTFLAG = 1
AddAllShareFolder = 1
samplesInstalled = 1
DAILYBUILD = 0
MAXNICE = 0
enableSleepOnDiskFull = 0
[DMS]
ENABLE = 1
QPKG_INSTEAD = 1
[DMC]
QPKG_INSTEAD = 1

restart the indexing process from the web interface and Voilà, the problem is solved!

Questo post è disponibile anche in: Italiano