The git_data_dirs is hashed out, which means it is not in use, it is just example configuration.
Anyway, NFS has been deprecated for quite a while now and isn’t possible to use anymore. All of the stuff is in Gitaly now. You can keep an eye on disk space by doing:
cd /var/opt/gitlab
du -sh *
and then see which directories have a large amount of disk space, go inside that directory and then repeat the du command.
You can see repository sizes within Gitlab anyway. From the command like and directory structures, there isn’t much else you can do anyway. The rest of the stuff you will have to check in Gitlab in relation to repositories and repository cleanup.
I assumed that the commented out configs represented the defaults, as many many other packages do, hence my confusion. So where are the actual defaults kept so I can learn more? The reference template at gitlab.rb.template still seems to have /mnt/nfs-01/git-data commented out as a storage location too.
My actual issue is that I set up the machine for gitlab hosting with a big partition for /home and not so much for /var … eventually I’ll need to add another directory on the bigger partition to gitaly storage and there seems to be little or no instruction on how this might be arranged in gitlab. The gitaly config instructions lead round in circles or talk about things like clustering etc which are interesting, but out of the league of this deployment for one small company IT dept.
How do I just add another folder as gitaly storage?
By default, repositories are in /var/opt/gitlab/git-data/repositories. You will see this when you use the df command that I posted about before on checking directory sizes.
The problem is you created /home - most likely using the default recommended partioning in the installer. Unless you need /home on this server, it didn’t need to be configured and you could have created a far larger partition for /var, or even /var/opt where Gitlab gets installed.
Since this is a new fresh installation, if you haven’t started using it yet, just make a new server and partition it properly. If it is being used, you can use the Gitlab backup and restore documentation to back it up, and then restore it to a new server that has plenty of disk space for /var or /var/opt.
Gitaly in a default configuration:
cat /var/opt/gitlab/gitaly/config.toml
# Gitaly configuration file
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run:
# sudo gitlab-ctl reconfigure
runtime_dir = "/var/opt/gitlab/gitaly/run"
socket_path = "/var/opt/gitlab/gitaly/gitaly.socket"
prometheus_listen_addr = "localhost:9236"
bin_dir = "/opt/gitlab/embedded/bin"
[logging]
dir = "/var/log/gitlab/gitaly"
format = "json"
[git]
use_bundled_binaries = true
bin_path = "/opt/gitlab/embedded/bin/git"
ignore_gitconfig = true
[[storage]]
name = "default"
path = "/var/opt/gitlab/git-data/repositories"
[gitlab]
url = "http+unix://%2Fvar%2Fopt%2Fgitlab%2Fgitlab-workhorse%2Fsockets%2Fsocket"
relative_url_root = ""
[gitlab-shell]
dir = "/opt/gitlab/embedded/service/gitlab-shell"
you will see in the storage section, it shows exactly where Gitaly is going to store the data, eg: /var/opt/gitlab/git-data/repositories as mentioned unless a cluster has been configured which in your case it hasn’t yet.
Obviously you could remain with the existing server, and then just create new servers that would run just Gitaly, and have them store your data. But it would complicate things a little more.