По умолчанию, омнибус-gitlab хранит данные репозитория Git под /var/opt/gitlab/git-data
. Репозитории хранятся в подпапках repositories
. Вы можете изменить местоположение родительского каталога , добавив следующую строку в /etc/gitlab/gitlab.rb
.
git_data_dirs({"default" => "/mnt/nas/git-data"})
Начиная с GitLab 8.10 Вы также можете добавить больше чем один Git данные каталог, добавив следующие строки в /etc/gitlab/gitlab.rb
вместо.
git_data_dirs({
"default" => "/var/opt/gitlab/git-data",
"alternative" => "/mnt/nas/git-data"
})
Обратите внимание, что целевые каталоги и любой из его подпутей не должны быть символическими.
Запустить sudo gitlab-ctl reconfigure
, чтобы изменения вступили в силу.
Если у вас уже есть существующий Git репозиториев в /var/opt/gitlab/git-data
вы можете переместить их на новое место, как следующим образом:
# Prevent users from writing to the repositories while you move them.
sudo gitlab-ctl stop
# Note there is _no_ slash behind 'repositories', but there _is_ a
# slash behind 'git-data'.
sudo rsync -av /var/opt/gitlab/git-data/repositories /mnt/nas/git-data/
# Fix permissions if necessary
sudo gitlab-ctl reconfigure
# Double-check directory layout in /mnt/nas/git-data. Expected output:
# gitlab-satellites repositories
sudo ls /mnt/nas/git-data/
# Done! Start GitLab and verify that you can browse through the repositories in
# the web interface.
sudo gitlab-ctl start
Я забыл отредактировать gitlab-shell config.yml, и мои попытки были отклонены крюком, это помогло мне понять проблему, thx! – Roberto