Cannot use LFS using storage on an NFS share
I have installed Gitlab on a VM. This works fine, including LFS, when everything is local to the VM - the users for the various Gitlab process, as well as the storage area.
Because I want to store a large amount of data with LFS, I need to switch the storage to an existing NFS mount. I can create a user that has access to the the mount, but gitlab-ctl reconfigure
will always error out. The problem is that it uses the root account to create the dir and chown it to the user, rather than using the actual user to create the dir.
Using the root account to write to NFS shares is a big no-no, so I cannot ask my IT to add no_root_squash
to the share.
A simple solution would be to add an option in gitlab.rb
to specify that the LFS storage base dir is already created (similar to the gitlab_rails['manage_backup_path'] = false
option).
I have a local implementation of this variable. I'll create a pull request as soon as Gitlab has finished forking the project into my account (it's been running for over an hour now...)
Clément