diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-18 03:08:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-18 03:08:58 +0000 |
commit | 25d4a24f831382d37fabc1b6dd3fde26a6c34d4b (patch) | |
tree | 78c9d95e9be1423cef69be085e2e378850f69c51 /doc/administration | |
parent | ca2eb5b26a9fad01145d45f18d016c757d31bddd (diff) | |
download | gitlab-ce-25d4a24f831382d37fabc1b6dd3fde26a6c34d4b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration')
-rw-r--r-- | doc/administration/repository_storage_paths.md | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/doc/administration/repository_storage_paths.md b/doc/administration/repository_storage_paths.md index be1a3a56e4f..f4aed0f6a0f 100644 --- a/doc/administration/repository_storage_paths.md +++ b/doc/administration/repository_storage_paths.md @@ -120,17 +120,23 @@ For compatibility reasons `gitlab.yml` has a different structure than Omnibus Gi 1. [Restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect. +1. [Configure where new repositories are stored](#configure-where-new-repositories-are-stored). + **For Omnibus installations** -Edit `/etc/gitlab/gitlab.rb` by appending the rest of the paths to the default one: +1. Edit `/etc/gitlab/gitlab.rb` by appending the rest of the paths to the default one: + + ```ruby + git_data_dirs({ + "default" => { "path" => "/var/opt/gitlab/git-data" }, + "storage1" => { "path" => "/mnt/storage1/git-data" }, + "storage2" => { "path" => "/mnt/storage2/git-data" } + }) + ``` + +1. [Restart GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect. -```ruby -git_data_dirs({ - "default" => { "path" => "/var/opt/gitlab/git-data" }, - "storage1" => { "path" => "/mnt/storage1/git-data" }, - "storage2" => { "path" => "/mnt/storage2/git-data" } -}) -``` +1. [Configure where new repositories are stored](#configure-where-new-repositories-are-stored). NOTE: Omnibus stores the repositories in a `repositories` subdirectory of the `git-data` directory. @@ -153,6 +159,17 @@ The higher the weight of a given repository storage path relative to other repos paths, the more often it is chosen. That is, `(storage weight) / (sum of all weights) * 100 = chance %`. +By default, if repository weights have not been configured earlier: + +- `default` is weighted `100`. +- All other storages are weighted `0`. + +NOTE: +If all storage weights are `0` (for example, when `default` does not exist), GitLab attempts to +create new repositories on `default`, regardless of the configuration or if `default` exists. +See [the tracking issue](https://gitlab.com/gitlab-org/gitlab/-/issues/36175) for more information. +information. + ## Move repositories To move a repository to a different repository storage (for example, from `default` to `storage2`), use the |