我将要拥有一个大型的存储库(> 150gb),该存储库可以满足主驱动器的需求,因此/var/opt/gitlab/git-data
不够用。我想将现有存储库(和Wiki)从/var/opt/gitlab/git-data/repositories/mygroup/myproject
移到/mnt/big-repos/git-data/mygroup/myproject
/etc/gitlab/gitlab.rb
:
git_data_dirs({
"alternative" => {
"path" => "/mnt/big-repos/git-data"
},
"default" => {
"path" => "/var/opt/gitlab/git-data"
}
})
1。
sudo -u git mkdir /mnt/big-repos/git-data/mygroup
sudo -u git mv /var/opt/gitlab/git-data/repositories/mygroup/myproject.* /mnt/big-repos/git-data/mygroup
rm -rf /var/opt/gitlab/git-data/repositories/mygroup/myproject.*
gitlab-ctl reconfigure
gitlab-ctl restart
无法正常工作,因为它不断产生旧的目录中的所有内容。
2。
sudo -u git mkdir /mnt/big-repos/git-data/mygroup
sudo rsync -av /var/opt/gitlab/git-data/repositories/mygroup/myproject.* /mnt/big-repos/git-data/mygroup
rm -rf /var/opt/gitlab/git-data/repositories/mygroup/myproject.*
gitlab-ctl reconfigure
gitlab-ctl restart
这里也一样。帮助