1
0
Fork 0
mirror of https://code.forgejo.org/infrastructure/documentation synced 2024-12-22 12:53:53 +00:00

nfs mounts must not be sync

This is a 10x performance hit.

It is reasonable to mount NFS in async. Just like with locally mounted
disk, there is a risk of data loss. But since it honors requests to
sync, the application is in control of when it matters. An
application (database, git, forgejo even) would have a bad design if,
for instance, it returned success on a write operation without issuing
a sync.
This commit is contained in:
Earl Warren 2024-10-09 12:01:37 +03:00
parent 40513d541a
commit b5f7d949ab
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -759,8 +759,8 @@ lxc-helpers.sh lxc_install_lxc_inside 10.47.3 fc11
```sh
sudo apt install nfs-kernel-server nfs-common
cat <<EOF | sudo tee -a /etc/exports
/precious 10.53.101.0/24(rw,sync,fsid=0,no_root_squash,no_subtree_check)
/precious/k8s 10.53.101.0/24(rw,nohide,insecure,no_subtree_check,sync)
/precious 10.53.101.0/24(rw,fsid=0,no_root_squash,no_subtree_check)
/precious/k8s 10.53.101.0/24(rw,nohide,insecure,no_subtree_check)
EOF
sudo exportfs -av
sudo exportfs -s