Please describe the problem.
I found one of my repos damaged after letting the webapp sync with it for a while. The filesystem inodes were exhausted and all the refs pointed to objects that do not exist.
What steps will reproduce the problem?
I expect this issue to be reproduced by syncing to a filesystem without enough free inodes to hold the incoming files.
What version of git-annex are you using? On what operating system?
This repo is using git-annex 6.20160229-g37a89cc
Please provide any additional information below.
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
$ git status
fatal: bad object HEAD
$ git pull
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
fatal: bad object HEAD
error: /home/olpc/annex-ext4 did not send all necessary objects
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
error: refs/heads/master does not point to a valid object!
error: refs/heads/synced/git-annex does not point to a valid object!
error: refs/heads/synced/master does not point to a valid object!
error: refs/remotes/beta/master does not point to a valid object!
error: refs/remotes/beta/synced/master does not point to a valid object!
error: refs/remotes/halloween/master does not point to a valid object!
error: refs/remotes/halloween/synced/master does not point to a valid object!
fatal: bad object HEAD
error: failed to run repack
# End of transcript or log.
Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
I'm running into a few issues but I intend to work through them.
Pretty much anything is going to break when you run out of inodes; all the errors shown here are due to the git repository getting inconsistent because of it. I don't see any part that's git-annex specific.
Is
git annex repair
able to repair it at all? I'd expect it would be able to, as long asgit fsck
reports that there are problems.Thanks. It turns out I'd deleted that repo in order to free the inodes up. Next time I will see if I can repair.
But it would be nice if git-annex tracked inodes the way it tracks free space, so that it could refrain from causing the inode exhaustion. This also would have alerted me to how few inodes I had remaining.