git/list[1] front-page[2] threads[3] people[4] search[5] about
 

broken repo after power cut

From
Richard Weinberger <richard@nod.at>
Date
Jun 20, 2015, 19:40 UTC
Message-ID
<5585C1B6.50407@nod.at>
Hi!

Yesterday our git server faced a power cut and a git repository broke. The server is running a ext4 filesystem on top of Linux 3.16 (stable from openSUSE) and git 2.1.4. We had a backup, so no data was lost but I really would like to figure out what happened.

This is the output of git fsck: Checking object directories: 100% (256/256), done. error: object file objects/ce/f7627fc160ad7294b1f728db0c1ddb65a38b1d is empty error: object file objects/ce/f7627fc160ad7294b1f728db0c1ddb65a38b1d is empty fatal: loose object cef7627fc160ad7294b1f728db0c1ddb65a38b1d (stored in objects/ce/f7627fc160ad7294b1f728db0c1ddb65a38b1d) is corrupt

To me it seems like git was creating a new object and got interrupted before fsync/fdatasync'ing it. As the object was referenced before syncing the data to disk the repo broke. Could this have happened? Also, is git designed to survive power cuts? Then referencing an object before synching it do disk would make no sense.

Thanks, //richard

Next: Johannes Schindelin
Message 1 of 8 in “broken repo after power cut”
  1. Richard WeinbergerJun 20, 2015
  2. Johannes SchindelinJun 21, 2015
  3. Richard WeinbergerJun 21, 2015
  4. Christoph HellwigJun 21, 2015
  5. Richard WeinbergerJun 21, 2015
  6. Theodore Ts'oJun 22, 2015
  7. Richard WeinbergerJun 22, 2015
  8. Theodore Ts'oJun 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.