From e6591ce35820068caaebf9880527016188ea126f Mon Sep 17 00:00:00 2001 From: nnuuvv Date: Sun, 8 Mar 2026 17:23:36 +0100 Subject: [PATCH] add nfs info --- nfs.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 nfs.md diff --git a/nfs.md b/nfs.md new file mode 100644 index 0000000..f8df6cb --- /dev/null +++ b/nfs.md @@ -0,0 +1,54 @@ +### Setting up NFS + +#### Server + +install the server package: +```sh +apt install nfs-kernel-server +``` + +add shares to /etc/exports; for example: +``` + (rw,sync,no_subtree_check) +``` + +if the remote user has a different userid you can use nfsidmap; +or use the simple approach of mapping all users to a specific uid on the server. + +by adding `all_squash,anonuid=` like this: + +``` + (rw,sync,no_subtree_check,all_squash,anonuid=) +``` + +you can then export your exports using +```sh +exportfs -arv +``` +-a -> all +-r -> reexport +-v -> list exported shares + + +#### Client + +install the client package: +```sh +apt install nfs-common +``` + +mount your nfs share using: +```sh +mount -t nfs4 : +``` + +assuming that worked; add it to /etc/fstab so it gets mounted at boot +``` +: nfs4 defaults,user,exec 0 0 +``` + +if you arnt certain the share will always be available; add `noauto` +``` +: nfs4 defaults,user,exec,noauto 0 0 +``` +and then use `mount -a` to mount it -- 2.51.2