|  12-02-2020, 04:13 PM | #1 | 
| Zealot            Posts: 121 Karma: 2137668 Join Date: Mar 2015 Location: Groton, MA Device: Kindle app on Samsung Tab | 
				
				Any Way to Subdivide the Main Directory?
			 
			
			My library has quite a few books.  I am now hitting file system limits on the main [Calibre] directory that are causing various instabilities that my intuition (and support) tells me is going to end in disaster if I continue. Is there some easy way to subdivide the directory by adding another level such as [Calibre\A Authors] [Calibre\B Authors] etc. ? I would like to keep everything within a single view if that's possible. Otherwise I am going to have to figure out a way to divide it manually into separate libraries. | 
|   |   | 
|  12-02-2020, 04:22 PM | #2 | 
| Resident Curmudgeon            Posts: 80,742 Karma: 150249619 Join Date: Nov 2006 Location: Roslindale, Massachusetts Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 | 
			
			What OS are you using and how many eBooks do you have?
		 | 
|   |   | 
| Advert | |
|  | 
|  12-02-2020, 04:33 PM | #3 | 
| Custom User Title            Posts: 11,351 Karma: 79528341 Join Date: Oct 2018 Location: Canada Device: Kobo Libra H2O, formerly Aura HD | 
			
			Unless you have upwards of 65,000 authors in the main directory, I wouldn't worry about it. If you do: What the <expletive deleted> are you even doing??   The limit of maximum files in a directory is 65,534 on FAT32, and on modern filesystems such as NTFS it's in the millions. Last edited by BetterRed; 12-02-2020 at 04:51 PM. Reason: inappropriate language | 
|   |   | 
|  12-02-2020, 05:52 PM | #4 | 
| Zealot            Posts: 121 Karma: 2137668 Join Date: Mar 2015 Location: Groton, MA Device: Kindle app on Samsung Tab | 
			
			Well folks I was purposely trying to stay away from those questions to avoid controversy and focus on the question at hand.   That said there are currently 94829 authors.  The OS is linux running on a Synology.  Yes the files are sitting on a very very high quality NAS--Synology quality is MUCH better than Microsquish and yes I have been lectured about the evils of NAS and I won't change my mind---my files are MUCH safer on my NAS thank you. So...back to the question. Is there a way to subdivide the main directory other than starting a new library? | 
|   |   | 
|  12-02-2020, 05:55 PM | #5 | 
| Grand Sorcerer            Posts: 13,693 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | |
|   |   | 
| Advert | |
|  | 
|  12-02-2020, 07:20 PM | #6 | |
| cosiñeiro            Posts: 1,406 Karma: 2451781 Join Date: Apr 2014 Device: BQ Cervantes 4 | Quote: 
 Ext4 has no limits on files per directory and has a limit of files of 4,294,967,295, but the number of inodes available is usually far less than that. Asumming your NAS is only holding a calibre library with 94829 authors, and each author has 50 books you're spending 4,836,279 inodes just on directories (For the record I have a 3TB partition almost full of stuff with only 1,394,869 inodes used) Now you need to add 3 inodes more for each book (for cover.jpg, metadata.opf and the book format of your book) which add a grand total of 14,224,350 inodes more. And that is only with one format per book. Probably you're far from reaching 100% of inode usage, but typing Code: df -iT  If you have plenty of free inodes, then is a matter of usability issues (ls can take time to complete, expanding wildcards won't be possible) but you'll never hit filesystem limitations because there're no filesystem limits other than inodes. Have fun. | |
|   |   | 
|  12-02-2020, 09:45 PM | #7 | 
| Wizard            Posts: 1,090 Karma: 447222 Join Date: Jan 2009 Location: Valley Forge, PA, USA Device: Kindle Paperwhite | 
			
			Question to the more experienced members -- Could the OP 1. Copy the entire main folder (..\CALIBRE') to ..\CALIBRE_A-F\ using the O/S 2. Delete all folders in ..\CALIBRE_A-F\ with authors G through Z using the O/S 3. Switch/Create Library and point it at ..\CALIBRE_A-F\ using Calibre 4. Library Maintenance/Check Library and then delete the 'missing' books since that library's metadata.db (copy of original) has the entry but the book is not in the ..\CALIBRE_A-F\ folder 5. Repeat for next chunk of authors Upside is that if it goes all wahoonie-shaped, the original is still there Downside is have to make the correct 'sub-library' the active one Last edited by phossler; 12-02-2020 at 09:47 PM. | 
|   |   | 
|  12-02-2020, 09:58 PM | #8 | |
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | Quote: 
 If that fails you want to what you asked for above, you can create a new custom column for authors, use the search and replace dialog to copy all your authors to that custom column, and use the standard authors column for partitioning. e.g for all books that first author letter is a, you put an a in the standard authors list, you can do this manually or use regular expression search and replace. | |
|   |   | 
|  12-03-2020, 04:27 AM | #9 | |
| The Grand Mouse 高貴的老鼠            Posts: 74,433 Karma: 318076944 Join Date: Jul 2007 Location: Norfolk, England Device: Kindle Oasis | Quote: 
 Of course, each directory will then have a LOT more entries in it. Might that cause a separate problem? | |
|   |   | 
|  12-03-2020, 05:45 AM | #10 | 
| Zealot            Posts: 121 Karma: 2137668 Join Date: Mar 2015 Location: Groton, MA Device: Kindle app on Samsung Tab | 
				
				Thanks
			 
			
			Thanks for the suggestions.  Mostly likely to start with the inodes after the current backup completes. The good news is that Synology has amazing support and they were on the system yesterday for a while and they are coming back after the backup completes and I reboot. | 
|   |   | 
|  12-03-2020, 07:42 AM | #11 | 
| Wizard            Posts: 2,086 Karma: 14079267 Join Date: Oct 2007 Location: Almere, The Netherlands Device: Kobo Sage | 
			
			Even so, I doubt it'll be a problem. My Synology, with a 6TB EXT4 partition with besides two large Calibre libraries lots of other stuff on it (about 4.5TB worth) uses 1.7M of 182M inodes.
		 | 
|   |   | 
|  12-03-2020, 06:22 PM | #12 | 
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | 
			
			One can have control over this by changing the partitioning scheme. e.g. aa, ab, ac, ... etc. The search and replace tool can help in automating the process. Still, it is better that the @johnelle is seeking other solutions first, as this might not be the ideal solution as you lose a lot of functionality like downloading author metadata.
		 | 
|   |   | 
|  12-03-2020, 09:31 PM | #13 | |
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
  From where can calibre download it and where does it put it? I ask because I'm in the process of building an 'Authors' library that links to/from my Books, Journals and Media libraries via the new calibre:\\\ URL feature. BR | |
|   |   | 
|  12-04-2020, 05:37 AM | #14 | |
| Wizard            Posts: 1,216 Karma: 1995558 Join Date: Aug 2015 Device: Kindle | Quote: 
  . I meant the data that goes into the author field when downloading book metadata. If someone re-purposes the author column he will have to uncheck the author field in the download book metadata dialog. | |
|   |   | 
|  12-04-2020, 02:55 PM | #15 | |
| null operator (he/him)            Posts: 22,010 Karma: 30277294 Join Date: Mar 2012 Location: Sydney Australia Device: none | Quote: 
  BR | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Remote add to content server using server directory instead of local directory | Velk | Server | 3 | 01-03-2019 06:05 AM | 
| (Suggestion) Move ebook-viewer.exe to the main directory next to calibre-portable.exe | avid01 | Library Management | 6 | 07-03-2014 03:55 AM | 
| What is the difference between the main metadata.db and sub-directory metadata.db? | iridius | Library Management | 5 | 02-23-2011 11:44 AM | 
| LOST.DIR in NC main directory. | roger_15 | Nook Color & Nook Tablet | 7 | 01-11-2011 02:35 PM | 
| I Can't add a directory | takelu | Calibre | 2 | 02-05-2010 07:21 PM |