From 3f85391706ca81d81b6ac7b37cc2b16de0686eb1 Mon Sep 17 00:00:00 2001 From: "https://sunny256.wordpress.com/" Date: Sat, 2 May 2015 01:45:59 +0000 Subject: Add bug report --- ..._after___34__git_annex_addurl_--file__34__.mdwn | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn diff --git a/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn b/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn new file mode 100644 index 000000000..8df20eb93 --- /dev/null +++ b/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn @@ -0,0 +1,90 @@ +### Please describe the problem. + +When using "`git annex addurl --file`" with an ftp url, the committed +file is deleted after dropping the contents with --force (because +git-annex can't determine if the ftp server contains a valid copy) and +executing "`git annex get`". It's the "`git annex get`" command that +deletes the file. + +This does not happen when using an http url. + +### What steps will reproduce the problem? + +`git clone https://gist.github.com/sunny256/24f6c29645efd0aab4d9` + +and execute the bash script `runme`. There's more info in a long comment +there, plus various flags you can enable/disable to test under different +conditions. + +### What version of git-annex are you using? On what operating system? + +Using the newest git-annex from in +directory git-annex/linux/current/, 5.20150420-gb0ebb23. + +Have tested with versions way back to v5.20131221, they all behave the +same. + +Using Debian GNU/Linux 7.8 (wheezy) on x86_64 with brand new git 2.4.0. + +### Please provide any additional information below. + +[[!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 + +$ ./runme +Initialized empty Git repository in /home/sunny/src/git/ga-bug/tmpdirawedsfkn/.git/ +init ok +(recording state in git...) +[master (root-commit) 6d5d623] Empty startcommit +addurl README (downloading ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README ...) +--2015-05-02 03:28:59-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README + => '.git/annex/tmp/URL--ftp&c%%ftp.funet.fi%pub%Linux%mirrors%debian%README' +Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2 +Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected. +Logging in as anonymous ... Logged in! +==> SYST ... done. ==> PWD ... done. +==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done. +==> SIZE README ... 1495 +==> PASV ... done. ==> RETR README ... done. +Length: 1495 (1.5K) (unauthoritative) + +100%[================================================>] 1,495 --.-K/s in 0.01s + +2015-05-02 03:29:00 (125 KB/s) - '.git/annex/tmp/URL--ftp&c%%ftp.funet.fi%pub%Linux%mirrors%debian%README' saved [1495] + +ok +(recording state in git...) +[master 264d597] Add README + 1 file changed, 1 insertion(+) + create mode 120000 README +drop README ok +(recording state in git...) +get README (from web...) +--2015-05-02 03:29:00-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README + => '.git/annex/tmp/SHA256-s1495--8822780b87a880ca9956ac108812557044618859cecb07df488df57e8134e34f' +Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2 +Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected. +Logging in as anonymous ... Logged in! +==> SYST ... done. ==> PWD ... done. +==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done. +==> SIZE README ... 1495 +==> PASV ... done. ==> RETR README ... done. +Length: 1495 (1.5K) (unauthoritative) + +100%[================================================>] 1,495 --.-K/s in 0s + +2015-05-02 03:29:02 (73.1 MB/s) - '.git/annex/tmp/SHA256-s1495--8822780b87a880ca9956ac108812557044618859cecb07df488df57e8134e34f' saved [1495] + +ok +(recording state in git...) + +total 0 + +README is gone, should not happen + +Reached the end +$ + +# End of transcript or log. +"""]] -- cgit v1.2.3 From 6e56033868b9af75a98400cb8bb5a77d8346f471 Mon Sep 17 00:00:00 2001 From: "Øyvind A. Holm" Date: Sat, 2 May 2015 04:30:17 +0200 Subject: Update the bug report with new and better output from 89b043d --- ...t__34___after___34__git_annex_addurl_--file__34__.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn b/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn index 8df20eb93..0c9755385 100644 --- a/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn +++ b/doc/bugs/git-annex_deletes_file_when_using___34__git_annex_get__34___after___34__git_annex_addurl_--file__34__.mdwn @@ -33,10 +33,18 @@ Using Debian GNU/Linux 7.8 (wheezy) on x86_64 with brand new git 2.4.0. # If the problem is with the git-annex assistant, paste in .git/annex/daemon.log $ ./runme + +================== git init ================== Initialized empty Git repository in /home/sunny/src/git/ga-bug/tmpdirawedsfkn/.git/ + +================== git annex init ================== init ok (recording state in git...) + +================== git commit, empty start commit ================== [master (root-commit) 6d5d623] Empty startcommit + +================== git annex addurl ================== addurl README (downloading ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README ...) --2015-05-02 03:28:59-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README => '.git/annex/tmp/URL--ftp&c%%ftp.funet.fi%pub%Linux%mirrors%debian%README' @@ -55,11 +63,17 @@ Length: 1495 (1.5K) (unauthoritative) ok (recording state in git...) + +================== git commit, add README ================== [master 264d597] Add README 1 file changed, 1 insertion(+) create mode 120000 README + +================== git annex drop --force ================== drop README ok (recording state in git...) + +================== git annex get ================== get README (from web...) --2015-05-02 03:29:00-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README => '.git/annex/tmp/SHA256-s1495--8822780b87a880ca9956ac108812557044618859cecb07df488df57e8134e34f' @@ -79,6 +93,7 @@ Length: 1495 (1.5K) (unauthoritative) ok (recording state in git...) +================== ls -l ================== total 0 README is gone, should not happen -- cgit v1.2.3 From d78b016acda7939ca2842daa1be5faeaa038544e Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnVnsqEy82M-MuS2gLri-az83wSQ6lXSrc" Date: Sat, 2 May 2015 07:49:53 +0000 Subject: --- ...annex_sync__96___uses_too_much_space__63__.mdwn | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn diff --git a/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn new file mode 100644 index 000000000..77d6857d8 --- /dev/null +++ b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn @@ -0,0 +1,41 @@ +When I create a new blank annex and try to sync it, I immediately run out of +space. + +This is the original: + + $ git annex info + repository mode: indirect + trusted repositories: 0 + semitrusted repositories: 4 + 00000000-0000-0000-0000-000000000001 -- web + ... + untrusted repositories: 0 + transfers in progress: none + available local disk space: 50.51 gigabytes (+1 megabyte reserved) + local annex keys: 2581 + local annex size: 135.87 gigabytes + annexed files in working tree: 4672 + size of annexed files in working tree: 231.16 gigabytes + bloom filter size: 16 mebibytes (0.5% full) + backend usage: + SHA256E: 7253 + +Then I try to sync on the newly created annex: + + $ git annex sync + commit ok + pull laptop + warning: no common commits + remote: Counting objects: 28801, done. + remote: Compressing objects: 100% (20301/20301), done. + fatal: write error: No space left on device22 MiB | 13.30 MiB/s + fatal: index-pack failed + failed + git-annex: sync: 1 failed + +Now `.git` in the new annex is using 487M (this is the total size of mounted disk): + + $ du -sh .git/ + 487M .git/ + +How big should the target annex be? Is it a multiple of the remote? -- cgit v1.2.3 From 2d5a9e9944e053f49199600e89578117f6124df0 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnVnsqEy82M-MuS2gLri-az83wSQ6lXSrc" Date: Sat, 2 May 2015 08:03:05 +0000 Subject: --- doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn index 77d6857d8..303cbb8be 100644 --- a/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn +++ b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__.mdwn @@ -39,3 +39,5 @@ Now `.git` in the new annex is using 487M (this is the total size of mounted dis 487M .git/ How big should the target annex be? Is it a multiple of the remote? + +As far as I understand, `sync` should get only the metadata, not the file contents. How can this be bigger than the entire source annex? -- cgit v1.2.3 From 61eeae290fae65785325de1eedda0ce61226d474 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawnVnsqEy82M-MuS2gLri-az83wSQ6lXSrc" Date: Sat, 2 May 2015 08:28:58 +0000 Subject: Added a comment --- .../comment_1_29cd5e9acd78d8ac6b58fe535fee9650._comment | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__/comment_1_29cd5e9acd78d8ac6b58fe535fee9650._comment diff --git a/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__/comment_1_29cd5e9acd78d8ac6b58fe535fee9650._comment b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__/comment_1_29cd5e9acd78d8ac6b58fe535fee9650._comment new file mode 100644 index 000000000..bdf9861f1 --- /dev/null +++ b/doc/forum/__96__git_annex_sync__96___uses_too_much_space__63__/comment_1_29cd5e9acd78d8ac6b58fe535fee9650._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawnVnsqEy82M-MuS2gLri-az83wSQ6lXSrc" + nickname="Jean" + subject="comment 1" + date="2015-05-02T08:28:56Z" + content=""" +I tried reformatting the device with smaller blocksize and inode size, but this didn't help. +"""]] -- cgit v1.2.3