Skip to content

Managing GitLab Storage Shards (Gitaly)

Sharding was introduced into GitLab in version 8.10 with modifications in 8.13. The fundamentals of sharding can be found in the GitLab Documentation under Repository Storage Paths.

The summary of the documentation being as such:

  1. Storage targets must be defined in the gitlab.rb configuration file within the git_data_dirs parameter.
  2. Selection of targets for random new project assignment is done through the ‘Application Settings’ under the ‘Admin Area’.

We use chef to configure the storage shards that we have, these configuration settings are applied via the gitlab-base chef role internal link.

The how-to instructional documentation for re-balancing git project repositories between gitaly storage shard node file systems is here:

https://gitlab.com/gitlab-com/runbooks/-/blob/master/docs/gitaly/storage-rebalancing.md