From GitLab 14.0, enhancements and bug fixes for NFS for Git repositories will no longer be
From GitLab 14.0, enhancements and bug fixes for NFS for Git repositories are no longer
considered and customer technical support will be considered out of scope.
considered and customer technical support is considered out of scope.
[Read more about Gitaly and NFS](gitaly/index.md#nfs-deprecation-notice) and
[Read more about Gitaly and NFS](gitaly/index.md#nfs-deprecation-notice) and
[the correct mount options to use](#upgrade-to-gitaly-cluster-or-disable-caching-if-experiencing-data-loss).
[the correct mount options to use](#upgrade-to-gitaly-cluster-or-disable-caching-if-experiencing-data-loss).
...
@@ -81,8 +81,8 @@ When you define your NFS exports, we recommend you also add the following
...
@@ -81,8 +81,8 @@ When you define your NFS exports, we recommend you also add the following
options:
options:
-`no_root_squash` - NFS normally changes the `root` user to `nobody`. This is
-`no_root_squash` - NFS normally changes the `root` user to `nobody`. This is
a good security measure when NFS shares will be accessed by many different
a good security measure when NFS shares are accessed by many different
users. However, in this case only GitLab will use the NFS share so it
users. However, in this case only GitLab uses the NFS share so it
is safe. GitLab recommends the `no_root_squash` setting because we need to
is safe. GitLab recommends the `no_root_squash` setting because we need to
manage file permissions automatically. Without the setting you may receive
manage file permissions automatically. Without the setting you may receive
errors when the Omnibus package tries to alter permissions. Note that GitLab
errors when the Omnibus package tries to alter permissions. Note that GitLab
...
@@ -137,15 +137,15 @@ NFS performance with GitLab can in some cases be improved with
...
@@ -137,15 +137,15 @@ NFS performance with GitLab can in some cases be improved with
[Rugged](https://github.com/libgit2/rugged).
[Rugged](https://github.com/libgit2/rugged).
NOTE:
NOTE:
From GitLab 12.1, it will automatically be detected if Rugged can and should be used per storage.
From GitLab 12.1, it automatically detects if Rugged can and should be used per storage.
If you previously enabled Rugged using the feature flag, you will need to unset the feature flag by using:
If you previously enabled Rugged using the feature flag, you need to unset the feature flag by using:
```shell
```shell
sudo gitlab-rake gitlab:features:unset_rugged
sudo gitlab-rake gitlab:features:unset_rugged
```
```
If the Rugged feature flag is explicitly set to either `true` or `false`, GitLab will use the value explicitly set.
If the Rugged feature flag is explicitly set to either `true` or `false`, GitLab uses the value explicitly set.
#### Improving NFS performance with Puma
#### Improving NFS performance with Puma
...
@@ -190,7 +190,7 @@ Note there are several options that you should consider using:
...
@@ -190,7 +190,7 @@ Note there are several options that you should consider using:
| `lookupcache=positive` | Tells the NFS client to honor `positive` cache results but invalidates any `negative` cache results. Negative cache results cause problems with Git. Specifically, a `git push` can fail to register uniformly across all NFS clients. The negative cache causes the clients to 'remember' that the files did not exist previously.
| `lookupcache=positive` | Tells the NFS client to honor `positive` cache results but invalidates any `negative` cache results. Negative cache results cause problems with Git. Specifically, a `git push` can fail to register uniformly across all NFS clients. The negative cache causes the clients to 'remember' that the files did not exist previously.
| `hard` | Instead of `soft`. [Further details](#soft-mount-option).
| `hard` | Instead of `soft`. [Further details](#soft-mount-option).
| `cto` | `cto` is the default option, which you should use. Do not use `nocto`. [Further details](#nocto-mount-option).
| `cto` | `cto` is the default option, which you should use. Do not use `nocto`. [Further details](#nocto-mount-option).
| `_netdev` | Wait to mount filesystem until network is online. See also the [`high_availability['mountpoint']`](https://docs.gitlab.com/omnibus/settings/configuration.html#only-start-omnibus-gitlab-services-after-a-given-file-system-is-mounted) option.
| `_netdev` | Wait to mount filesystem until network is online. See also the [`high_availability['mountpoint']`](https://docs.gitlab.com/omnibus/settings/configuration.html#only-start-omnibus-gitlab-services-after-a-given-file-system-is-mounted) option.
#### `soft` mount option
#### `soft` mount option
...
@@ -222,7 +222,7 @@ they highlight that if the NFS client driver caches data, `soft` means there is
...
@@ -222,7 +222,7 @@ they highlight that if the NFS client driver caches data, `soft` means there is
writes by GitLab are actually on disk.
writes by GitLab are actually on disk.
Mount points set with the option `hard` may not perform as well, and if the
Mount points set with the option `hard` may not perform as well, and if the
NFS server goes down, `hard`will cause processes to hang when interacting with
NFS server goes down, `hard`causes processes to hang when interacting with
the mount point. Use `SIGKILL` (`kill -9`) to deal with hung processes.
the mount point. Use `SIGKILL` (`kill -9`) to deal with hung processes.
The `intr` option
The `intr` option
[stopped working in the 2.6 kernel](https://access.redhat.com/solutions/157873).
[stopped working in the 2.6 kernel](https://access.redhat.com/solutions/157873).
...
@@ -260,7 +260,7 @@ mountpoint
...
@@ -260,7 +260,7 @@ mountpoint
└── uploads
└── uploads
```
```
To do so, we'll need to configure Omnibus with the paths to each directory nested
To do so, configure Omnibus with the paths to each directory nested
in the mount point as follows:
in the mount point as follows:
Mount `/gitlab-nfs` then use the following Omnibus
Mount `/gitlab-nfs` then use the following Omnibus
| `/var/opt/gitlab/git-data` | Git repository data. This will account for a large portion of your data | `git_data_dirs({"default" => { "path" => "/var/opt/gitlab/git-data"} })`
| `/var/opt/gitlab/git-data` | Git repository data. This accounts for a large portion of your data | `git_data_dirs({"default" => { "path" => "/var/opt/gitlab/git-data"} })`
| `/var/opt/gitlab/gitlab-rails/uploads` | User uploaded attachments | `gitlab_rails['uploads_directory'] = '/var/opt/gitlab/gitlab-rails/uploads'`
| `/var/opt/gitlab/gitlab-rails/uploads` | User uploaded attachments | `gitlab_rails['uploads_directory'] = '/var/opt/gitlab/gitlab-rails/uploads'`
| `/var/opt/gitlab/gitlab-rails/shared` | Build artifacts, GitLab Pages, LFS objects, temp files, etc. If you're using LFS this may also account for a large portion of your data | `gitlab_rails['shared_path'] = '/var/opt/gitlab/gitlab-rails/shared'`
| `/var/opt/gitlab/gitlab-rails/shared` | Build artifacts, GitLab Pages, LFS objects, temp files, and so on. If you're using LFS this may also account for a large portion of your data | `gitlab_rails['shared_path'] = '/var/opt/gitlab/gitlab-rails/shared'`