When I copy the config/db-folder to LAN (mapped in fstab, R/W CIFS access) and open DT with darktable --configdir /mnt/proxmox-shares/darktable.db/
, the sqlite3 database is opened in R/O mode:
sqlite3 error: ./src/gui/presets.c:88, function dt_gui_presets_init(), query “DELETE FROM data.presets WHERE writeprotect = 1”: database is locked
sqlite3 error: ./src/common/database.c:5612, function dt_database_release_transaction(), query “COMMIT TRANSACTION”: database is locked
sqlite3 error: ./src/common/database.c:5579, function dt_database_start_transaction(), query “BEGIN TRANSACTION”: cannot start a transaction within a transaction
sqlite3 error: ./src/common/database.c:5612, function dt_database_release_transaction(), query “COMMIT TRANSACTION”: database is locked
I’ve tried to copy that folder again locally, just to be sure, and it opened R/W just fine. There are also no *lock* files in the db-folder and no other machine is accessing of course that folder.
When I open that library.db file from the LAN straight from the sqlite3
command, it opens R/W and not R/O. So it seems DT somehow checks if the db-folder lies on LAN and opens it R/O, but I didn’t check the sources yet.
Please, anyone has idea why the database is opened in read-only mode? I would like to have the database on my LAN and not locally.
UPD1: I’ve tried to execute some INSERT INTO
from the sqlite3
directly into the LAN shared library.db - and that’s R/O as well… hmm… seems like sqlite3 is causing this behavior.
UPD2: I’ve found it, so for anybody in the same situation: the problem is with sqlite3 using a db-file via CIFS, as CIFS is not compatible with the binary locking needed in sqlite3. So when you map your NAS-folder by something different than CIFS/SAMBA (e.g. sshfs in my case), the db is writable than ;-). Marry Christmas-days!
Thank you