forum/Bare repo on USB drive not providing filesgit-annexhttp://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/git-annexikiwiki2015-02-09T19:13:53Zcomment 1http://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/comment_1_0738174fb6984b777ec0a221502106ac/joey2014-12-01T23:35:22Z2014-12-01T22:03:52Z
<p>You should be able to use a direct mode repo on a USB drive.
Of course, if you delete files from there, the deletion will propigate
to other clones of that repo. It could be that there's some bug
with direct mode repos that causes file deletions to be incorrectly
committed; if so you could a) revert the bad commits and b) file a bug
report with details to reproduce the problem.</p>
<p>As to a bare repo on a USB drive, it will work too. It sounds to me like
you forgot to run <code>git annex sync</code> after copying the files to that repo.
And/or forgot to run <code>git annex sync</code> before asking git-annex to get
the files from the drive.</p>
<p>That is to say, the fulll process would be:</p>
<p>Plug drive into first computer, and run in that computer's repo:</p>
<pre><code>git annex copy --to usbdrive
git annex sync
</code></pre>
<p>And then move drive to other computer, and run in that computer's
repo:</p>
<pre><code>git annex sync
git annex copy --from usbdrive
</code></pre>
I finally solved ithttp://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/comment_2_65d007284287e709a8f6f07dd8630f15/Juan2014-12-02T01:32:34Z2014-12-02T01:32:34Z
<p>I fnally made it work. I tried git-annex sync wihtout luck. What tricked me was the size of the bare repo, it made me thought that it had the files. However after I've made a git annex get on the bare repo it got all the files and after that everthing worked as expected.
So, if I don't get you wrong, it is safer to use a bare repo on the USB drive?
Thanks for the help.
Best regards,
Juan</p>
comment 2http://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/comment_2_1e07d1a9ddb88c0e1d84d8d88b7b4cc4/joey2014-12-02T17:36:23Z2014-12-02T17:33:27Z
<p>Well, I'm glad you solved it.</p>
<p>I'd recommend a bare repo on a USB drive because it's the simplest thing,
but a non-bare repo will also work ok.</p>
I think I got it working, however, same setup works different on fat and exfathttp://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/comment_4_3bbce5d12ece481b669be10ef9a70f40/Juan2014-12-09T15:04:37Z2014-12-09T15:04:37Z
<p>After struggling a lot, I tried to do the same but with an fat32 drive. Seems that some of the problems I'm experiencing are due to some (linux) filesystem functions working different with fat and exfat.
Just to get this right, using repos on USB drive formatted as fat32 works perfectly under linux and mac. When I go to the exfat drive, linux fails, and osx keeps working.
Are you able to test it?
Steps to reproduce it:
1)make a test repo on linux: cd /tmp; mkdir test_repo; cd test repo; git init; git annex init "test repo on linux box"
2) go to exfat drive and clone it: git clone /tmp/rest_repo</p>
<blockquote><p>git clone /home/juan/juanc/tmp/prueba_git
Cloning into 'prueba_git'...
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented<br />
error: chmod on /media/juan/USB_LIVE/tmp/test1/prueba_git/.git/config.lock failed: Function not implemented
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.</p></blockquote>
<p>Please make sure you have the correct access rights
and the repository exists.</p>
comment 5http://git-annex.branchable.com/forum/Bare_repo_on_USB_drive_not_providing_files/comment_5_5e6202c319e75a9758bb8c2f32152e0f/joey2015-02-09T19:13:53Z2015-02-09T19:09:53Z
<p>I had never heard of <a href="http://en.wikipedia.org/wiki/ExFAT">exFAT</a> before.</p>
<p>I guess you were mounting it in linux using the FUSE implementation of
exFAT. It's not very surprising when FUSE filesystems leave off support
for some syscalls. In this case, chmod.</p>
<p>Since even git clone fails, git-annex obviously cannot work.</p>
<p>A bare repository might be the only option if you're stuck using exFAT for
some reason.</p>