Calibre, Calibre-Web with a network share

A lot of people do report issues with the Calibre database when the database is on a NAS or network drive. Last week I had issues with Calibre-Web and the validation of the database when Calibre and Calibre-web do maintenance on the database.

People get: “CantOpenError: CantOpenError: unable to open database file”

Within the comments the git repository of Calibre-web I got a hint.  and that solved my issue
a number of years I was running a 13K ebook database, but I was never satisfied. Adding books was almost impossible without syncing, copying books, move the database and messing up the database with duplicates. Terrible.

Last week the database was not able to fix itself anymore and I decided to start over with only those books I really like or wanted to keep. And I wanted to fix the database issues.

To fix it, you must be able to run a NAS or (virtual) Server with SAMBA version1 (NT1).  As I am running VMWARE a new Linux Server was built quickly. Please be noticed that I do not care about security in my home network on that machine and for that purpose.

Import configuration steps in /etc/samba/smb.conf

[global]
min protocol = NT1
max protocol = NT1
client min protocol = NT1
client max protocol = NT1
# this will run samba in Samba Version 1 mode.

[share]
force user = [a-username]
path = /var/www/html/books
writeable = yes
browseable = yes
guest ok = yes
guest account = [a-username]
create mask = 0777
directory mask = 0777
oplocks = false
level2 oplocks = false
# Especially the oplocks on false are needed. If not Calibre-Web will not get access to the database if Calibre is using it. If that happens your database can be corrupted again very quickly.

If you run Calibre under Windows 10 make sure you add SMB1 support through the ‘features’ option this is disabled by default.

I started with 400 books and now I added 520 books in many sessions without any open database issue.

Using the oplocks on false could be also a solution when using SMBv3 or SMBv4 but I did not try that.

Please also notice that the writer of Calibre does not suggest to use a network share and it is known that for some it is working fine and for others not. This blog items could lead to more solution(s). Even it is not supported ;)

Fixing BSOD within Windows 2008 R2 after installing wrong VIOSTOR driver under Cloudstack

I needed to expand my Windows 2008 R2 server with extra HDD data. I had an ISO available with VIOSTOR drivers (Virtio Storage) and autodetected the drivers. How could I be so stupid.

after reboot: BSOD and BSOD and stupid as I was I was unable to go back to ‘last good known configuration’.

first of all I had to pick the drivers for Windows 2008 from this location: ISO/viostor/2k8/(R2 if you have it)/amd64/viostor.*

To stop the BSOD from happening:

Find the viostor drivers (probably):

Windows/System32/drivers/viostor.sys
Windows/DriverStore/FileRepository/viostor.inf_amd64_neutral_b5a4b523b42ac3b3/viostor.sys
Windows/DriverStore/FileRepository/viostor.inf_amd64_neutral_e322cb56cfbcc209/viostor.sys
Windows/LastGood/system32/DRIVERS/viostor.sys

Rename Windows/System32/drivers/viostor.sys to System32/drivers/disabled.viostor.sys.disabled;

Similarly renamed both Windows/DriverStore/FileRepository/viostor.inf_amd64_neutral_b5a4b523b42ac3b3/viostor.sysand Windows/DriverStore/FileRepository/viostor.inf_amd64_neutral_e322cb56cfbcc209/viostor.systo disabled.viostor.sys.disabled

Then reboot.

Please be noticed that it can cost you a NEW license if you add this driver. Your hardware can be changed and it could be that Microsoft does not allow your key anymore.

CFULLHDMA: Trying to understand Samba

The Conceptronic CFULLHDMA has an automatical way of finding Samba Shares, to make life easy for customers. The device is using ‘smbtree’ for this purpose. smbtree is a text based network browser.

As I do a lot of testings I suddenly did not get any samba share to see on the CFULLHDMA anymore. Bummer, a bug? let’s find out …

Normally I have 6!! Samba shared devices in my network. Suddenly, after rebooting a PC (XP) and a NAS I lost all Samba shares to bee seen in my CFULLHDMA, reboot, turn off / turn on .. nothing helped.

Analyzing I found out following:

the smbtree was generating an error on the CFULLHDMA.

smbtree
session request to 192.168.1.30 failed (Called name not present)
Data overflow in cli_receive_trans

the 192.168.1.30 is my printserver, turning off that device only gave totally no output on running smbtree.

Using the same utility ‘smbtree’ on my Centos webserver (where aroundmyroom.com is running at) generated the same error. For me it meant that it was not a bug on my CFULLHDMA but a general ‘error’ within my network. Checking my network neighbourhood at my XP machine revealed only 1 samba share: a rebooted nas device I had to reset to factory defaults and modified on IP level again (fixed) and where I changed its Samba Share name as well. The rest of my shares were even not seen at my XP system, Linux Server or CFULLHDMA.

To solve the issue I did following:

I rebooted my DSL modem (router / dns / dhcp device) &