Calibre server not updating over NAS
I think I've run into an interesting issue and wanted to see if anyone else can confirm that it is an issue or if I am configuring something improperly.
I am using the folder watch option along with the Calibre server in hopes of having an automated way of adding new books to my collection. My normal setup is to run Calibre in it's own virtual machine with the library located on a NAS mounted over SMB (Windows file sharing). The NAS box is another virtual machine running Linux and Samba.
Adding books via the watch folder works fine. Calibre automatically picks up the change and pulls in the book into the library properly. The part that does not work is that the Calibre server does not display the new books unless I restart the server or Calibre itself.
What I have discovered is this. If I have both the watch directory and the library on a "local" drive, local in this sense being the same virtual machine, so no NAS in the picture, everything updates properly. When I house the watch folder on the NAS and the library on the local drive, again everything works properly. It's when I put the library on the NAS that there is an issue.
The issue with the library sitting on the NAS is that the time stamp on the metadata.db file does NOT get updated properly after a book is added to the library. The timestamp is incorrect from any machine that I mount that same file share. So for example, if I started Calibre at 13:00 the metadata.db file will have the timestamp of 13:00 no matter how many books I add or modify over the course of an entire day. The interesting thing here is that the timestamp on the NAS itself IS correct. So if I login to the Linux NAS box directly and look at the timestamp it reports correctly. However, from any SMB client (Windows for example) the timestamp still says 13:00.
I thought let's try to isolate the NAS and see if it's just an SMB issue. My thinking is that perhaps I've configured something incorrectly on the Samba server. So the test was to use a virtual host mount form my virtual machine. This basically presents a local directory to the guest OS as a network share. No real NAS is in play here and everything is running on a Windows 7 box. When I do the same tests over the virtual share, I get the same results.
Calibre is running on a Windows XP box (to save on resources) and everything else seems to be running properly.
I am suspecting, with no evidence whatsoever, that Calibre is doing something with a file lock such that the SMB protocol is not updating the timestamp properly, thus the Calibre server is not updating properly.
Has anyone else encountered this or have any workaround? If not, can anyone help confirm on their machines that this is a reproducible issue? Is there anything I can do to assist in any further debugging?
Running Calibre v0.8.69
OS: Windows XP
Samba version: 3.6.7
SMBv2 is disabled
Library stored on a mapped drive
Last edited by murkyl; 09-20-2012 at 10:18 PM.
Reason: Adding system info