Storage migration to Hashed problems

Hey guys, everyone ok?

So, I´m trying to upgrade my gitlab from 13.12.5-ce.0 to the latest 14.0.x, but I´m stuck at the storage migration step.

I´ve been trying to migrate using the commands bellow, but I still getting some errors on the sidekick logs.
Commands:

  • gitlab-rake gitlab:storage:migrate_to_hashed

Some of the Errors:

- {"severity":"ERROR","time":"2021-06-29T15:12:22.711Z","correlation_id":"10656cd3093b5b7fe17d9ab2d5e6d29e","exception.class":"Gitlab::Git::CommandError","exception.message":"9:destination already exists.",}
- {"severity":"WARN","time":"2021-06-29T15:12:22.742Z","message":"Can't find a repository on either source or target paths for  ...}
- {"severity":"ERROR","time":"2021-06-29T15:12:22.452Z","message":"Repository cannot be moved from '@hashed/6a/ac/6aac0cf87a32e631536122c3f2f9a2df215f56f28792a43a8658b0593f2e5255' to '

Here are some troubleshooting that I was trying:

  • Listed the hashed projects: gitlab-rake gitlab:storage:hashed_projects
    The return was 30 projects.
    Then:
  • I have tried to rollback all my repos using gitlab-rake gitlab:storage:rollback_to_legacy.
    After I got an “ok” message,
    Then:
  • I tried to use the itlab-rake gitlab:storage:migrate_to_hashed
    Now, the message is: “queuing migration of 258 projects in batches of 200… Done!”

But when I try to look at the queues at the Background Jobs, There´s none running and I got the errors listed in the beginning.

Also, I´ve tried the commands in the link: Back up and restore GitLab | GitLab

But none of them worked. Any tips?

Thanks in advance.

I am having a similar issue moving from 13.x to 14.x with the “repository cannot be moved” messages. Unfortunately I don’t have any further insights but I’d like to follow along.

1 Like

Same for me. All projects exept of the project with the id 1 were moved successfully.
But for project 1 sidekiq says:

Repository cannot be moved from ‘…’ to ‘@hashed/…’

1 Like

@brian.odonnell @chendes-tst @alexrusa , did any of you find a way to solve this issue?

I thought I had found the solution in this link: https://www.reddit.com/r/gitlab/comments/okqqmw/failed_to_upgrade_gitlabce_to_14x/

But it didn’t work for me. The sidekiq log shows the same message you posted here. Are you running Gitlab as a docker container by any chance?

I also just got this issue and I don’t know what to do about it. I can’t migrate to 14.x and I’m stuck. Has anyone solved this since then?

Hi, I just came across a similar issue and I solved it with this snippet.
I hope it will help!