Am Dienstag, den 19.08.2014, 12:18 -0400 schrieb Joey Hess: > Nils Asmussen wrote: > > the setup is as follows: I have two computers. Using the git-annex webapp, > > I set up a usb dongle to sneakernet files between them. > > Whenever I connect the usb dongle to one of the computers, the files are > > transferred as expected. > > > > But: When I then try to unmount the usb device, I get an error message. The > > device cannot be unmounted because it still has opened files. > > I expect to be able to unmount the device without problems after the > > transfer has completed. > > > The files are held open by > > $ ps 14141 > > PID TTY STAT TIME COMMAND > > 14141 ? SN 0:00 git --git-dir=/media/nils/USB/annex cat-file > > --batch > > It seems to me that you have configured the git-annex assistant to run > in the repository in your USB device. Since it's a daemon, it will > necessarily keep files open on the device and so prevent it from being > unmounted. That's why this is not a recommended configuration. > > Intead, the way it's supposed to work is that you run the git-annex > assistant in only the repository located on your computer. It will then > notice when the USB device is connected and take care of syncing with > it. > > To fix your configuration, you can edit ~/.config/git-annex/autostart and > remove the line for /media/nils/USB/annex. >
Thank you for your fast reply. The configuration cannot be fixed the way proposed, because there is no entry like /media/nils/... in the file ~/.config/git-annex/autostart. Note that the processes blocking the USB device are all git processes. The repository on the computer is also "blocked" by git-annex processes. The problem seems to be that git --git-dir=/media/nils/USB/annex cat-file --batch should be closed after completing all transfers, but is not closed. This process is started by the git-annex assistant running in /home/nils/sync. Coming back to my workaround, I observed that it takes about a minute after clicking on restart till the git cat-file process closes. (Without restarting, it doesn't close even after waiting half an hour.) I have set up the syncing as follows. On the first computer I created a repository. Then I clicked "Add another repository" -> "removable drive" to create the repository on the USB device and chose "combine repositories". On the second computer I also created a repository and then repeated the steps for adding the USB device. I guess this is the way git-annex is supposed to work, right? Below is some part of the log file after entering $ echo test > delete_me.txt There is a line mentioning chat: git cat-file on /media/nils/USB/annex. This is probably the starting point of git cat-file, but there is no line mentioning the program to be closed again. [2014-08-20 15:37:08 CEST] Watcher: add direct delete_me.txt [2014-08-20 15:37:08 CEST] Watcher: add direct delete_me.txt [2014-08-20 15:37:08 CEST] read: lsof ["-F0can","+d","/home/nils/sync/.git/annex/misctmp/"] [2014-08-20 15:37:08 CEST] Committer: Adding delete_me.txt ... [2014-08-20 15:37:08 CEST] TransferWatcher: transfer starting: Upload UUID "b4e52d17-7295-4e3e-9550-9b05b9edb131" delete_me.txt Nothing [2014-08-20 15:37:08 CEST] TransferWatcher: transfer starting: Upload UUID "b4e52d17-7295-4e3e-9550-9b05b9edb131" delete_me.txt Nothing [2014-08-20 15:37:09 CEST] read: rsync ["--progress","--inplace","--perms","/home/nils/sync/delete_me.txt","/media/nils/USB/annex/annex/tmp/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2.txt"] delete_me.txt 5 100% 0.00kB/s 0:00:00 5 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1) [2014-08-20 15:37:09 CEST] TransferWatcher: transfer starting: Upload UUID "b4e52d17-7295-4e3e-9550-9b05b9edb131" delete_me.txt Just 5 [2014-08-20 15:37:09 CEST] chat: git ["--git-dir=/media/nils/USB/annex","cat-file","--batch"] To /media/nils/USB/annex 8715f28..1f23774 git-annex -> synced/git-annex 8d53719..7189b57 annex/direct/master -> synced/master ... [2014-08-20 15:37:09 CEST] TransferWatcher: transfer finishing: Transfer {transferDirection = Upload, transferUUID = UUID "b4e52d17-7295-4e3e-9550-9b05b9edb131", transferKey = Key {keyName = "f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2.txt", keyBackendName = "SHA256E", keySize = Just 5, keyMtime = Nothing}} [2014-08-20 15:37:09 CEST] Transferrer: Uploaded delete_me.txt [2014-08-20 15:37:11 CEST] Pusher: Syncing with KeyPrivate ... -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org