这是我的错误:
fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Invalid argument
Etckeeper 一直工作到今天。最近对系统的唯一更改是上游 git 存储库。该.git
目录现在位于 sshfs 挂载上。我现在明白这与问题有关。当 .git 目录从 NFS 挂载切换到 sshfs 挂载时,问题就开始了。
给出错误的命令的完整输出:
[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
请建议下一步。
答案1
当您使用sshfs
挂载目录时,还要指定-o writeback_cache=no
:
sshfs -o writeback_cache=no [user@]host:/dir/ /localdir