gitlab-02 running out of disk space
From: nagios@hetzner-hel1-01.torproject.org
Subject: ** PROBLEM Service Alert: gitlab-02/disk usage on /var/opt is CRITICAL **
To: anarcat+rapports@orangeseeds.org
Date: Thu, 21 Oct 2021 16:09:39 +0000
***** Icinga *****
Notification Type: PROBLEM
Service: disk usage on /var/opt
Host: gitlab-02
Address: 116.202.120.180
State: CRITICAL
Date/Time: Thu Oct 21 16:09:39 UTC 2021
Additional Info:
DISK CRITICAL - free space: /var/opt 8752 MB (4% inode=95%):
Solution picked (see below): grow the disk.
It will require two downtimes:
- a reboot (done)
- a period during which artifacts are moved between the two disks
The next steps are:
-
wait for the disk to grow -
reboot the VM from the outside -
pvresize /dev/sdd
-
lvcreate -n gitlab-shared vg_gitlab-02_hdd -L 250G
-
mkfs -t ext4 -j /dev/vg_gitlab-02_hdd/gitlab-shared
-
echo /dev/vg_gitlab-02_hdd/gitlab-share /srv/gitlab-shared ext4 defaults 0 2 >> /etc/fstab
-
mount /srv/gitlab-shared
-
rsync -aSHAXx --info=progress2 --partial /var/opt/gitlab/gitlab-rails/shared/artifacts/ /srv/gitlab-shared/artifacts/
-
stop gitlab? -
again: rsync -aSHAXx --info=progress2 --partial /var/opt/gitlab/gitlab-rails/shared/artifacts/ /srv/gitlab-shared/artifacts/
-
mount bind or symlink? -
restart gitlab -
close this ticket. :)
Edited by anarcat