2 years ago

#60624

test-img

pbft

Why does git commit fail with "corrupt loose object" on NFS file system?

I have an existing project on my local network that I'm bringing into the git world. It's normally served to my workstation as an NFS filesystem. If I attempt to stage a commit, I consistently get a "corrupt loose object" error. If I copy the directory tree to a local drive on my workstation, it works perfectly.

The project has about 500 files for a total of about 300mb. There's one large video file at 53mb. This is an example of the results attempting a commit using the NFS mounted filesystem:

#> git commit -a
error: inflate: data stream error (incorrect data check)
error: corrupt loose object '3a697eac912bf91eb03fa3ddf2a78db58059b73f'
fatal: unable to read 3a697eac912bf91eb03fa3ddf2a78db58059b73f

This is my environment:

  • Workstation OS: Linux Mint 19 'Tara' kernel version 4.15.0-166-generic
  • Workstation nfs client: nfs-common 1:1.3.4-2.1ubuntu5.5
  • git version 2.34.1
  • Server OS: Linux Mint 17.3 'Rosa' kernel version 4.4.0-148-generic
  • Server nfs: nfs-kernel-server 1:1.2.8-6ubuntu1.2

There don't appear to be any rogue '.nfsxxx' files present. What could be causing this?

More data: I initialized the repository on my local hard disk and pushed it to GitHub. That worked, except that GitHub truncated the video at 50mb, so git sees the video as having been modified.

I copied the whole repository back to the NFS directory (rm -r ; rsync -avh ) and tried to git add/commit from the NFS directory. Same problem.

I copied it again and deleted the video from NFS directory, then tried git add/commit again. Same problem.

Using local hard disk repository, I deleted the video and then did git add/commit/push - worked perfectly and updated the GitHub repository.

I copied it again to the NFS directory and tried a minor edit followed by git add/commit/push - worked perfectly.

SO - could it be that there's an issue with git and large files on NFS? The initial problem happens at commit time, so the GitHub 50mb limit should be irrelevant.

git

nfs

0 Answers

Your Answer

Accepted video resources