Network File System: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
mNo edit summary
Tag: Reverted
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= NFS =
= Crashed NFS server =
 
== Crashed NFS server ==


* You can unmount a non-responsive NFS server by using the -l (lazy) option:
* You can unmount a non-responsive NFS server by using the -l (lazy) option:
  umount -l /mnt/data
  umount -l /mnt/data


== Stale file handle error ==
= Stale file handle error =


* If you get this error, and are unable to mount the share on the client, just restart the server. For instance on Debian:
* If you get this error, and are unable to mount the share on the client, just restart the server. For instance on Debian:
Line 12: Line 10:
  sudo systemctl restart nfs-server
  sudo systemctl restart nfs-server


== Adding a NFS share ==
= Adding a NFS share =


* Just edit /etc/exports:
* Just edit /etc/exports:
Line 18: Line 16:
  /mnt/data  192.168.0.0/24(rw,sync)
  /mnt/data  192.168.0.0/24(rw,sync)


* This would grant access to all IPs in range 192.168.0.*. You may need to restart the server (/etc/init.d/nfs restart) for the share to be actually added.
* If you want the share to be accessible from non root users (it's needed for access on Android for instance, or on Batocera), you need to add the insecure flag:


= Samba =
/mnt/data  192.168.0.8(ro,sync,no_subtree_check)


* Using Samba can make sense in some cases, as more clients support Samba than NFS. For instance, 4XVR Video Player supports Samba but not NFS.
* This would grant access to all IPs in range 192.168.0.*. You may need to restart the server (/etc/init.d/nfs restart) for the share to be actually added.
* Setting up Samba is pretty quick. [https://serverspace.io/support/help/configuring-samba-on-debian/ Here is a good tutorial that works fine on Debian. ]

Latest revision as of 09:23, 17 March 2025

Crashed NFS server

  • You can unmount a non-responsive NFS server by using the -l (lazy) option:
umount -l /mnt/data

Stale file handle error

  • If you get this error, and are unable to mount the share on the client, just restart the server. For instance on Debian:
sudo systemctl restart nfs-server

Adding a NFS share

  • Just edit /etc/exports:
/mnt/data  192.168.0.0/24(rw,sync)
  • If you want the share to be accessible from non root users (it's needed for access on Android for instance, or on Batocera), you need to add the insecure flag:
/mnt/data  192.168.0.8(ro,sync,no_subtree_check)
  • This would grant access to all IPs in range 192.168.0.*. You may need to restart the server (/etc/init.d/nfs restart) for the share to be actually added.