From f64a639bcfa1fc2bc89ca7db268f594306edfd7c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 16 Mar 2021 18:18:33 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-10-stable-ee --- doc/administration/repository_storage_paths.md | 38 ++++++++++++++------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'doc/administration/repository_storage_paths.md') diff --git a/doc/administration/repository_storage_paths.md b/doc/administration/repository_storage_paths.md index 5884a8b3283..e342ef8c04b 100644 --- a/doc/administration/repository_storage_paths.md +++ b/doc/administration/repository_storage_paths.md @@ -13,7 +13,9 @@ GitLab stores [repositories](../user/project/repository/index.md) on repository storage is either: - A `gitaly_address`, which points to a [Gitaly node](gitaly/index.md). -- A `path`, which points directly a directory where the repository is stored. +- A `path`, which points directly a directory where the repositories are stored. This method is + deprecated and [scheduled to be removed](https://gitlab.com/gitlab-org/gitaly/-/issues/1690) in + GitLab 14.0. GitLab allows you to define multiple repository storages to distribute the storage load between several mount points. For example: @@ -23,7 +25,7 @@ several mount points. For example: ```ruby git_data_dirs({ 'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075' }, - 'storage1' => { 'gitaly_address' => 'tcp://gitaly2.internal:8075' }, + 'storage2' => { 'gitaly_address' => 'tcp://gitaly2.internal:8075' }, }) ``` @@ -31,18 +33,23 @@ several mount points. For example: ```plaintext default: - path: /mnt/git-storage-1 + gitaly_address: tcp://gitaly1.example:8075 storage2: - path: /mnt/git-storage-2 + gitaly_address: tcp://gitaly2.example:8075 ``` -For more information on +For more information on: - Configuring Gitaly, see [Configure Gitaly](gitaly/index.md#configure-gitaly). - Configuring direct repository access, see the following section below. ## Configure repository storage paths +WARNING: +The following information is for configuring GitLab to directly access repositories. This +configuration option is deprecated in favor of using [Gitaly](gitaly/index.md) and is scheduled to +[be removed in GitLab 14.0](https://gitlab.com/gitlab-org/gitaly/-/issues/1690). + To configure repository storage paths: 1. Edit the necessary configuration files: @@ -76,7 +83,7 @@ For [backups](../raketasks/backup_restore.md) to work correctly: Omnibus GitLab takes care of these issues for you, but for source installations you should be extra careful. -While restoring a backup, the current contents of `/home/git/repositories` are moved to +While restoring a backup, the current contents of `/home/git/repositories` are moved to `/home/git/repositories.old`. If `/home/git/repositories` is a mount point, then `mv` would be moving things between mount points, and problems can occur. @@ -96,10 +103,6 @@ For compatibility reasons `gitlab.yml` has a different structure than Omnibus Gi example. Then Omnibus GitLab creates a `repositories` directory under that path to use with `gitlab.yml`. -NOTE: -This example uses NFS. We do not recommend using EFS for storage as it may impact GitLab performance. -Read the [relevant documentation](nfs.md#avoid-using-awss-elastic-file-system-efs) for more details. - **For installations from source** 1. Edit `gitlab.yml` and add the storage paths: @@ -111,10 +114,10 @@ Read the [relevant documentation](nfs.md#avoid-using-awss-elastic-file-system-ef storages: # You must have at least a 'default' repository storage path. default: path: /home/git/repositories - nfs_1: - path: /mnt/nfs1/repositories - nfs_2: - path: /mnt/nfs2/repositories + storage1: + path: /mnt/storage1/repositories + storage2: + path: /mnt/storage2/repositories ``` 1. [Restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect. @@ -126,8 +129,8 @@ Edit `/etc/gitlab/gitlab.rb` by appending the rest of the paths to the default o ```ruby git_data_dirs({ "default" => { "path" => "/var/opt/gitlab/git-data" }, - "nfs_1" => { "path" => "/mnt/nfs1/git-data" }, - "nfs_2" => { "path" => "/mnt/nfs2/git-data" } + "storage1" => { "path" => "/mnt/storage1/git-data" }, + "storage2" => { "path" => "/mnt/storage2/git-data" } }) ``` @@ -153,6 +156,5 @@ often it is chosen. That is, `(storage weight) / (sum of all weights) * 100 = ch ## Move repositories -To move a repository to a different repository path, use the -[Project repository storage moves](../api/project_repository_storage_moves.md) API. Use +To move a repository to a different repository path, use the same process as [migrating existing repositories to Gitaly Cluster](gitaly/praefect.md#migrate-existing-repositories-to-gitaly-cluster). -- cgit v1.2.1