1

Here is my error:

fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument

Etckeeper worked until today. The only recent change to the system has been the upstream git repository. The .git directory is now on an sshfs mount. I now understand that's related to the problem. The problem started when the .git directory was switched from an NFS mount to an sshfs mount.

Full output of the command giving the error:

[root@pc2 etc]# pacman -R cowsay
checking dependencies...
Packages (1) cowsay-3.03-9
Total Removed Size:  0.03 MiB
:: Running pre-transaction hooks...
(1/3) Performing snapper pre snapshots for the following configurations...
==> root: 182
(2/3) Etckeeper Pre-install
(3/3) Update git tracked list of installed packages
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument
error: command failed to execute correctly
:: Processing package changes...
(1/1) removing cowsay                                                                                         [#################################################################] 100%
:: Running post-transaction hooks...
(1/4) Etckeeper Post-install
(2/4) Update git tracked list of installed packages
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument
error: command failed to execute correctly
(3/4) Arming ConditionNeedsUpdate...
(4/4) Performing snapper post snapshots for the following configurations...
==> root: 183

Please suggest a next step.

2
  • 1
  • 1
    @EmmanuelRosa - "add -o writeback_cache=no with sshfs versions >= 3.1" looks like the solution. I'll test it later this week. If you want to provide an answer, I'll accept it after I test. Thanks!
    – MountainX
    Aug 28 '17 at 21:38
1

When you use sshfs to mount the directory, also specify -o writeback_cache=no:

sshfs -o writeback_cache=no [user@]host:/dir/ /localdir

See https://github.com/libfuse/sshfs/issues/82 for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.