I’m looking at getting some help with my on-prem GitLab CE repository which is violently growing in size (upwards of 10GB per week). We are using GitLab CE in the following ways:
- Version control of all source code (developer commits)
- Source control for automation scripts (commit then pull later to execute in respective environments)
- Commit tagging when source control is built (build server periodically checks for changes in a branch and kicks-off a build then tags the most recent commit associated with that successful build)
Unfortunately, this repository holds four years worth of stuff, including some historical binaries which aren’t used anymore (files between 50MB and 240MB). In each case of the binaries, they were only ever committed once but it looks like the binary was duplicated for each commit that was tagged.
The 240MB file has a single commit history from four years ago with an initial commit but somehow got replicated nearly 7000 times (compressed to 28MB). Using a GitExtensions plugin ‘Find large files’, I used it to delete every coopy of it in the repository via a ReWrite of history. After this process, instead of gaining back roughly 200GB of disk space, it took up 8GB more. I proceeded to use the same process for five other files between 50MB and 150MB and now my source control is 18GB larger than before I begin trying to get rid of the files.
I’ve since gone through and deleted old branches we don’t need anymore and deleted all tags for those branches. I’ve also completely deleted some old projects all-together. I’m not getting any free space back.
What can I do here guys? I’ve gone through and explicitly deleted unused binaries etc from the two most-recent branches. The disk usage has gone from 500GB to 640GB in the last couple of months.
Version: GitLab Community Edition 8.12.3
Filesystem: LVM mapped to /dev/mapper/gitlab-root (dm-0)
Project Sizes (according to GitLab in Admin Section of server website - Top 10): 750MB, 280MB, 240MB, 120MB,100MB,77MB,77MB,60MB, 53MB, 52MB