Gitlab-rake gitlab:lfs:check

We are planing to migrate repo with large files to LFS using git lfs migrate. We had few practice runs and each time we deleted lfs-objects on server-side.

I noticed that there is rake task to check lfs. When I ran it it says there are 10 failures.

$ sudo gitlab-rake gitlab:lfs:check
Checking integrity of LFS objects
- 25..75: Failures: 10
Done!

Where can I see what is the problem? I looked at the log files and nothing about this. How to fix this?

BR
Denis

3 Likes

We are also have similiar problem
We run sudo gitlab-rake gitlab:lfs:check VERBOSE=1
and got

...
- 1001..1200: Failures: 0
- 1201..1400: Failures: 0
- 1401..1600: Failures: 1
  - LFS object: b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491: Checksum mismatch
- 1601..1800: Failures: 0
- 1801..2000: Failures: 0
...

How should we fix this?

2 Likes

We solved this by replacing corrupted object b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491 on server with not corrupted object from one of clones.

We found that
cat PATH_TO_LFS_OBJECTS_DIR_ON_SERVER/b6/75/b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491 | sha256sum
isnt correct (not equals to b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491).
But the result of
cat b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491 | sha256sum in clone is correct (equals to b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491).
We replaced the contents of file b675b00828707cd53dc5c130efce8a9d352e5efd8b9b29f06808810b6ebb5491 on server with the contents of this file rom cloned repo.

1 Like