Self-hosted Gitlab servers - wrong disk path on repositories after hashed storage migration

Hi everyone,

Hopefully, someone can give me some hints about how to debug this issue. Our GitLab has recently migrated from 12 to 13.0.14, and during this process, I have transferred all the repositories from legacy names to the hashed names.

sudo gitlab-rake gitlab:storage:migrate_to_hashed

They seem working okay as the command didn’t show any error and I do see the old folders are empty. On the next few days, I got an email about repository check error, and further check that, I have seen some repositories are empty on the web page.

However, if I check these repositories on the project_repositories, they have the disk_path, and there was the correct repository in the path. Whilst, if I use

sudo gitlab-rails runner "puts Project.find(71598).disk_path"

to check and the disk_path is not hashed and it is still the old pathname.

If someone can tell me what I can do to fix this I would be very happy.

Jie