summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-17 18:18:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-17 18:18:28 -0400
commit4f6ca37b27885e570694dc4b02fd5c56334abd04 (patch)
treebbad973d7cd67c541694850aef161ff03091b530
parentd66fac1ec82ea350e5d668df0cc5d02a345ca75e (diff)
parentb3bbc1cbb61d18d049ba334dc4fd85d0ca922afa (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-rw-r--r--doc/bugs/interrupting_migration_causes_problems.mdwn50
-rw-r--r--doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn47
2 files changed, 97 insertions, 0 deletions
diff --git a/doc/bugs/interrupting_migration_causes_problems.mdwn b/doc/bugs/interrupting_migration_causes_problems.mdwn
new file mode 100644
index 000000000..3298a1fa6
--- /dev/null
+++ b/doc/bugs/interrupting_migration_causes_problems.mdwn
@@ -0,0 +1,50 @@
+Killing a migration from WORM to SHA256 with ^C breaks things; future attempts to do the migration fail:
+
+ #!/bin/bash
+
+ BASE=/tmp/migrate-bug
+
+ set -x
+
+ chmod -R +w $BASE
+ rm -rf $BASE
+ mkdir -p $BASE
+ cd $BASE
+
+ # create annex
+ git init .
+ git annex init
+
+ # make a big (sparse) file and add it
+ dd if=/dev/zero of=bigfile bs=1 count=0 seek=1G
+ git annex add --backend WORM bigfile
+ git commit -m 'added bigfile'
+
+ # look at status
+ git annex status
+
+ # now migrate it, but kill migration during checksum
+ # Simulate ^C by making a new process group and sending SIGINT
+ setsid git annex migrate --backend SHA256 bigfile &
+ PID=$!
+ sleep 1
+ kill -INT -$PID
+ wait
+
+ # look at status
+ git annex status
+
+ # this migration fails
+ git annex migrate --backend SHA256 bigfile
+
+ # but fsck says everything's OK
+ git annex fsck
+
+The error:
+
+ migrate bigfile
+ git-annex: /tmp/migrate-bug/.git/annex/objects/K9/V1/WORM-s1073741824-m1321566308--bigfile/WORM-s1073741824-m1321566308--bigfile: createLink: already exists (File exists)
+ failed
+ git-annex: migrate: 1 failed
+
+
diff --git a/doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn b/doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn
new file mode 100644
index 000000000..322c354a2
--- /dev/null
+++ b/doc/bugs/old_data_isn__39__t_unused_after_migration.mdwn
@@ -0,0 +1,47 @@
+Old data isn't listed as unused after migrating backends:
+
+ #!/bin/bash
+
+ BASE=/tmp/migrate-bug-2
+ set -x
+ chmod -R +w $BASE
+ rm -rf $BASE
+ mkdir -p $BASE
+ cd $BASE
+
+ # create annex
+ git init .
+ git annex init
+
+ # make a big (sparse) file and add it
+ dd if=/dev/zero of=bigfile bs=1 count=0 seek=1G
+ git annex add --backend WORM bigfile
+ git commit -m 'added bigfile'
+
+ # migrate it
+ git annex migrate --backend SHA256 bigfile
+
+ # status shows 2 keys taking up 2G
+ git annex status
+
+ # but nothing is unused
+ git annex unused
+
+Output:
+
+ ++ git annex status
+ supported backends: SHA256 SHA1 SHA512 SHA224 SHA384 SHA256E SHA1E SHA512E SHA224E SHA384E WORM URL
+ supported remote types: git S3 bup directory rsync web hook
+ known repositories:
+ ede95a82-1166-11e1-a475-475d55eb0f8f -- here
+ local annex keys: 2
+ local annex size: 2 gigabytes
+ visible annex keys: 1
+ visible annex size: 1 gigabyte
+ backend usage:
+ WORM: 1
+ SHA256: 1
+ ++ git annex unused
+ unused . (checking for unused data...) (checking master...) ok
+
+The two files are hardlinked, so it's not taking up extra space, but it would be nice to be able to remove the old keys.