Re: pack fails: Bad magic number in transaction id
Toby Dickenson <[email protected]> Mon, 16 Oct 2006 17:09:55 +0100
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
On Monday 16 October 2006 15:27, Poor Yorick wrote: > Hi, > > When I try to pack my directoryStorage, I get the error "Bad magic number > in transaction id". Apparently, all the files in my t0 directory > should begin with 'G@\x07v', Yes. > yet mine begin with various things, as listed below (hex output from xxd). Interesting. I wonder how this happened? First, I should mention that you are the first to report this problem.... Is it likely or possible that this could be caused by hardware or user error? Can you post a selection of those files, and their original file/directory names? > Can anyone offer any suggestions on how to successfully pack the database? Step one: make a backup. If this corruption only affects the t* directories then you should be able to recover. Undo information may be lost, however the current state of your objects should be intact. If the o* directories are corrupt too then there is a more serious problem. The key to the recovery is the file x/packed, which contains a transaction id. DirectoryStorage assumes that the t* files of earlier transactions may not exist, and will therefore not raise an exception if the t* files are missing. (the content of this file is held in self._last_pack. You may find it interesting to check out how this gets used in Full.py) The recovery process would therefore involve: a. Finding all the corrupt files and deleting them. b. Replace x/packed with the id of a transaction later than those of the files you deleted. I guess copying the file x/serial into x/packed should be OK. Good luck, ____________________ Important Notice: This email and any attachments are confidential and may contain trade secrets or be legally privileged. If you have received this email in error you must not use, rely upon, disclose, copy or distribute the contents. Please reply to the sender so that proper delivery can be arranged and delete the email from your computer. Gemini Data Loggers monitor incoming and outgoing email to ensure satisfactory customer service, maintain company security and prevent abuse of their email system. However, any views expressed in this email are not necessarily those of Gemini and Gemini cannot be held responsible for the content. Gemini makes best efforts to ensure emails are virus free; however you are advised to carry out your own checks. Gemini does not accept responsibility for any damage resulting from email viruses. ____________________ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642