Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-29-2012, 10:25 PM   #1
enjiro
Junior Member
enjiro began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2012
Device: Sony PRS-700
Calibre Library on Mounted NAS Drive

Hi all,

I'm trying to create a new library on a NAS device which has been mounted on my local machine.

Some Stats:
NAS: Netgear ReadyNAS NV+
OS: Ubuntu 11.10
Mount Location: /media/mediaStorage/EBooks
Mount Type: CIFS

When I load Calibre it tells me that the database appears to be corrupted.

Error:
Code:
calibre, version 0.8.37
Corrupted database: The library database at /media/mediaServer/EBooks appears to be corrupted. Do you want calibre to try and rebuild it automatically? The rebuild may not be completely successful. If you say No, a new empty calibre library will be created.

Traceback (most recent call last):
  File "site-packages/calibre/gui2/main.py", line 190, in initialize_db
  File "site-packages/calibre/library/database2.py", line 196, in __init__
  File "site-packages/calibre/library/database2.py", line 151, in connect
  File "site-packages/calibre/library/database2.py", line 518, in initialize_database
  File "site-packages/calibre/library/sqlite.py", line 314, in run
DatabaseException: database is locked
	RemoteTraceback (most recent call last):
	  File "site-packages/calibre/library/sqlite.py", line 271, in run
	OperationalError: database is locked
I've taken a look at the permissions on the .db file which is created and my user has read/write permissions on the file.

I then press 'NO' to create a new database and get the following error:

Code:
calibre, version 0.8.37
ERROR: Bad database location: Bad database location u'/media/mediaServer/EBooks'. calibre will now quit.

Traceback (most recent call last):
  File "site-packages/calibre/gui2/main.py", line 177, in initialize_db_stage2
  File "site-packages/calibre/library/database2.py", line 196, in __init__
  File "site-packages/calibre/library/database2.py", line 148, in connect
OSError: [Errno 26] Text file busy: '/media/mediaServer/EBooks/metadata.db'
Is this all just crazy permissions problems? Any suggestions on how I might resolve it? I've set the permissions both via the file properties and by sshing into the NAS as root and setting permissions there as well.

thanks,
enjiro
enjiro is offline   Reply With Quote
Old 01-30-2012, 07:14 AM   #2
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
The problem is not one of permissions but of locking on Samba. Your NAS must be mounted using the nobrl option to CIFS. For example, my /etc/fstab line is:

//IOmega/books /Network/IOmega/books cifs user,noauto,nobrl,user=xxxx,uid=xxxx,gid=xxxx 0 0
darryl is offline   Reply With Quote
Advert
Old 01-30-2012, 11:05 PM   #3
enjiro
Junior Member
enjiro began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2012
Device: Sony PRS-700
That worked perfectly! Thanks for the help. That's a pretty obscure option to have to use.

For those of you that follow in these footsteps, nobrl means the following:

Quote:
Do not send byte range lock requests to the server. This is necessary for certain applications that break with cifs style mandatory byte range locks (and most cifs servers do not yet support requesting advisory byte range locks).
enjiro
enjiro is offline   Reply With Quote
Old 01-31-2012, 07:30 AM   #4
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
Quote:
Originally Posted by enjiro View Post
That worked perfectly! Thanks for the help. That's a pretty obscure option to have to use.

For those of you that follow in these footsteps, nobrl means the following:



enjiro
I agree. It is a very obscure option to have to use. Fortunately it works. Pleased I could help.
darryl is offline   Reply With Quote
Old 04-26-2012, 11:52 PM   #5
kcallis
Junior Member
kcallis began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2004
Device: Palm Tungsten E
Quote:
Originally Posted by darryl View Post
I agree. It is a very obscure option to have to use. Fortunately it works. Pleased I could help.
Are you just storing the data on the NV+? I would love to get calibre-server working off of the NV+, but I am afraid that I am going to have to keep the desktop version of calibre running on an old laptop or desk machine for that to work, correct?
kcallis is offline   Reply With Quote
Advert
Old 04-27-2012, 04:45 AM   #6
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
Quote:
Originally Posted by kcallis View Post
Are you just storing the data on the NV+? I would love to get calibre-server working off of the NV+, but I am afraid that I am going to have to keep the desktop version of calibre running on an old laptop or desk machine for that to work, correct?
Essentially correct. So far as I am aware there is no calibre binary offered for this architecture.
darryl is offline   Reply With Quote
Old 04-27-2012, 07:34 AM   #7
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by kcallis View Post
Are you just storing the data on the NV+? I would love to get calibre-server working off of the NV+, but I am afraid that I am going to have to keep the desktop version of calibre running on an old laptop or desk machine for that to work, correct?
It was just for such an architecture that I originally got involved in developing Calibre2Opds as an alternative to Calibre-server that did not require a PC or Mac. I was happy to have my PC switched on when updating the Calibre library, but I wanted to be able to access the library when away from the PC and the PC was switched off.
itimpi is offline   Reply With Quote
Old 04-27-2012, 08:51 AM   #8
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
Quote:
Originally Posted by itimpi View Post
It was just for such an architecture that I originally got involved in developing Calibre2Opds as an alternative to Calibre-server that did not require a PC or Mac. I was happy to have my PC switched on when updating the Calibre library, but I wanted to be able to access the library when away from the PC and the PC was switched off.
Thanks for this. I was not aware of the project, which looks excellent. Seems to be just what kcallis is looking for.
darryl is offline   Reply With Quote
Old 05-15-2012, 04:53 AM   #9
kcallis
Junior Member
kcallis began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2004
Device: Palm Tungsten E
Quote:
Originally Posted by darryl View Post
Thanks for this. I was not aware of the project, which looks excellent. Seems to be just what kcallis is looking for.
So did you even follow up on getting that particular solution working on the nv+?
kcallis is offline   Reply With Quote
Old 05-15-2012, 07:53 AM   #10
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
Quote:
Originally Posted by kcallis View Post
So did you even follow up on getting that particular solution working on the nv+?
No. I don't need this myself and don't have this hardware to play with at the moment anyway. You should be able to find info on the calibre2opds web page referred to in itimpi's post.
darryl is offline   Reply With Quote
Old 09-19-2015, 09:46 PM   #11
tweebee
Enthusiast
tweebee doesn't littertweebee doesn't litter
 
tweebee's Avatar
 
Posts: 46
Karma: 182
Join Date: Aug 2011
Location: Boynton Beach, Florida
Device: Kindle Oasis 2, Kindle Paperwhite 3
Quote:
Originally Posted by darryl View Post
The problem is not one of permissions but of locking on Samba. Your NAS must be mounted using the nobrl option to CIFS. For example, my /etc/fstab line is:

//IOmega/books /Network/IOmega/books cifs user,noauto,nobrl,user=xxxx,uid=xxxx,gid=xxxx 0 0
Thank you so much for this solution! I've been trying to get mine to work for the past couple of days and thought it might have something to do with permission since I'm fairly new to Ubuntu, but it was working fine on my Windows install so I was at a lost. Your options worked great! Thanks again.
tweebee is offline   Reply With Quote
Old 03-30-2018, 05:13 AM   #12
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
I'm glad it was of help. I caution you to be careful and keep good backups. Calibre is not designed to have the library running on a separate machine, and Kovid, the main developer, cautions against this. I've had mine running on an NAS for years and have never had any problems, but others try it and get corrupted libraries very quickly. A sure recipe for disaster is to have more than one machine accessing the library at the same time. There can also be problems in accessing the library on the share from different operating systems, at least when those systems are Windows and Linux.
darryl is offline   Reply With Quote
Old 04-02-2018, 06:31 AM   #13
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
I use NFS.

Works fine. Ubuntu and an old Synology NAS.

I wouldn't dare use CIFS/Samba for fear of corruption due to problems with different case sensitivity.
Adoby is offline   Reply With Quote
Old 04-02-2018, 07:13 AM   #14
darryl
Wizard
darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.darryl ought to be getting tired of karma fortunes by now.
 
darryl's Avatar
 
Posts: 3,108
Karma: 60231510
Join Date: Nov 2011
Location: Australia
Device: Kobo Aura H2O, Kindle Oasis, Huwei Ascend Mate 7
I too use NFS, and it works very well. However, I still take pains to ensure no simultaneous access. And because of the problems with case sensitivity, add books only through Linux. I also keep a good backup, just in case.
darryl is offline   Reply With Quote
Reply

Tags
library, mount, nas


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Library backup to Flash Drive Nicko Related Tools 13 01-26-2012 11:07 AM
Calibre Library on portable drive Thalia Helikon Devices 2 01-10-2012 11:03 PM
Library on NAS server? bous Calibre 5 11-26-2009 06:03 AM
Can the EBW1150 be mounted as a usb drive? nrapallo Fictionwise eBookwise 7 12-12-2008 05:53 AM
Abandoned attempt to use calibre with SSH mounted drive astrodad Calibre 9 10-06-2008 10:46 AM


All times are GMT -4. The time now is 11:01 AM.


MobileRead.com is a privately owned, operated and funded community.