Packing problems: fixed
Matt Hamilton <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
Dear All, Just thought I'd share the fix for some packing problems we've been having recently in case anyone experiences the same. We updated a busy zope cluster from 2.6.3 to 2.7.0 several months ago. After that time and packs of the DirectoryStorage left us with lots of POSKey errors. Luckily we could just rename all the -deleted files back and we were OK. After many attempts to work out what was wrong, I realised it was a file ownership issue. Under Zope 2.6 our ZEO server ran as user 'zope', but under 2.7 it now runs as 'root' (not sure why yet, I guess its to do with the different startup procedures from 2.6 and 2.7). So, all files written by DirectoryStorage *before* the migration were owned by 'zope' and the ones *after* were owned by root. For some reason when packing, DirectoryStorage could not mark the files owned by 'zope' (even though the process was running as root). And hence it ended up removing files in stage 4 that were needed. The confusing thing was, other than the pack, everything worked fine. As the server was run as root it could write new files in the ZODB directories fine, and could read the old ones. Now I have chown'd everything back to root and run the pack, all is working fine (and our ZODB is 60% smaller now I have removed several months of unwanted history!). Now I just need to work out why it is running as root, get it running as Zope again, and chown the files back. I guess the main question is: Why did DirectoryStorage not fail during the pack if it could not mark/read the files? FWIW, this is running on FreeBSD 4.10 -Matt -- Matt Hamilton [email protected] Netsight Internet Solutions, Ltd. Business Vision on the Internet http://www.netsight.co.uk +44 (0)117 9090901 Web Design | Zope/Plone Development & Consulting | Co-location | Hosting ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click