Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2013-10-14 16:28:03 -04:00
commit 1d1276295b
2 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,69 @@
### Please describe the problem.
Copying to a gpg encrypted webdav remote (with davfs) seems to work, but fails.
The command "git annex copy --to 1und1 some/file" returns ok, but a fsck fails and running
the copy again copies the file again to the remote.
### What steps will reproduce the problem?
[[!format sh """
git annex copy --to 1und1 some/file # seems ok
git annex copy --to 1und1 some/file # copies again
git annex fsck --from 1und1 some/file # fails
"""]]
### What version of git-annex are you using? On what operating system?
4.20131002 on debian (mostly stable), armel.
### Please provide any additional information below.
I used strace to see what is going on. It seems the chunkcount file is not written. When I create that file by hand fsck is happy.
(git annex seems to have two different locations for that file (dcf/85a and 3W/Qm). The second (3W/Qm) doesn't exist.)
[[!format sh """
# 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
copy to webdav (git annex copy --to 1und1 some/file)
output of basically "strace git annex ... | grep media":
9871 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", <unfinished ...>
9871 stat64("/media/1und1/git-annex/3W/Qm/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", 0xb65145d0) = -1 ENOENT (No such file or directory)
9871 mkdir("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33", 0777 <unfinished ...>
9871 statfs("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", <unfinished ...>
9871 stat64("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
9871 open("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666 <unfinished ...>
9871 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", <unfinished ...>
9871 chmod("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", 040755 <unfinished ...>
9871 openat(AT_FDCWD, "/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 15
9871 unlink("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1" <unfinished ...>
9871 rmdir("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/" <unfinished ...>
9871 mkdir("/media/1und1/git-annex/dcf/85a", 0777) = -1 EEXIST (File exists)
9871 stat64("/media/1und1/git-annex/dcf/85a", {st_mode=S_IFDIR|0755, st_size=64, ...}) = 0
9871 stat64("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
9871 rename("/media/1und1/git-annex/tmp/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", "/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/" <unfinished ...>
9871 openat(AT_FDCWD, "/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 15
9871 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", {st_mode=S_IFREG|0644, st_size=11705, ...}) = 0
9871 chmod("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", 0100444) = 0
9871 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", {st_mode=S_IFDIR|0755, st_size=152, ...}) = 0
9871 chmod("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/", 040555 <unfinished ...>
fsck webdav, but fails (git annex fsck --from 1und1 some/file):
10208 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", <unfinished ...>
10208 stat64("/media/1und1/git-annex/3W/Qm/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", 0xb6428160) = -1 ENOENT (No such file or directory)
manual file creation:
chmod u+w ...
echo -n 1 > /media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount
chmod u-w ...
fsck webdav again, now all is fine ("fixing location log"):
10670 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", {st_mode=S_IFREG|0444, st_size=1, ...}) = 0
10670 open("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 14
10670 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", {st_mode=S_IFREG|0444, st_size=11705, ...}) = 0
10670 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", {st_mode=S_IFREG|0444, st_size=1, ...}) = 0
10670 open("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunkcount", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 14
10670 stat64("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", {st_mode=S_IFREG|0444, st_size=11705, ...}) = 0
10672 open("/media/1und1/git-annex/dcf/85a/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33/GPGHMACSHA1--10ff9e1cc8191235670c2fd95375bccf62004f33.chunk1", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = 20
# End of transcript or log.
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="RaspberryPie"
ip="204.8.156.142"
subject="comment 8"
date="2013-10-14T17:49:05Z"
content="""
Quick question: Is there any way to get rid of the error in the existing repository (e.g. remove the problematic tmp file entry) so I can get a complete status output? Bonus points if I don't have to annex every single file anew. `git annex fsck` doesn't work, as doesn't `git annex fix` (it's a direct repo).
"""]]