Questions tagged [nfs]

Network File System (NFS) is a network file system protocol originally developed by Sun Micro systems in 1984, allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The Network File System is an open standard defined in RFCs.

Original NFS version

The implementation details are defined in RFC 1094. Sun used version 1 only for in-house experimental purposes. When the development team added substantial changes to NFS version 1 and released it outside of Sun, they decided to release the new version as v2, so that version interoperation and RPC version fall back could be tested.

NFSv2

Version 2 of the protocol (defined in RFC 1094, March 1989) originally operated entirely over UDP. Its designers meant to keep the protocol stateless, with locking (for example) implemented outside of the core protocol. NFSv2 only allowed the first 2 GB of a file to be read.

NFSv3

Version 3 (RFC 1813, June 1995) added:

  • support for 64-bit file sizes and offsets, to handle files larger than 2 gigabytes (GB)
  • support for asynchronous writes on the server, to improve write performance
  • additional file attributes in many replies, to avoid the need to re-fetch them
  • a READDIRPLUS operation, to get file handles and attributes along with file names when scanning a directory
  • assorted other improvements.

At the time of introduction of Version 3, vendor support for TCP as a transport-layer protocol began increasing. While several vendors had already added support for NFS Version 2 with TCP as a transport, Sun Micro systems added support for TCP as a transport for NFS at the same time it added support for Version 3. Using TCP as a transport made using NFS over a WAN more feasible.

NFSv4

Version 4 (RFC 3010, December 2000; revised in RFC 3530, April 2003), influenced by AFS and CIFS, includes performance improvements, mandates strong security, and introduces a stateful protocol. Version 4 became the first version developed with the Internet Engineering Task Force (IETF) after Sun Micro systems handed over the development of the NFS protocols.

NFS version 4 minor version 1 (NFSv4.1) has been approved by the IETF and received an RFC number 5661 since Jan 2010. The NFSv4.1 specification aims:

  • To provide protocol support to take advantage of clustered server deployments including the ability to provide scalable parallel access to files distributed among multiple servers (pNFS extension).
  • to provide sessions and Exacely One Semantic (EOS)
1887 questions
27
votes
1 answer

Measure & benchmark the speed & latency of file access on a mounted NFS share

I have a Linux Centos system that mounts some NFS shares, what technique can I use to measure the I/O speed/latency/rate when reading and writing files from that share? Could this technique also be applied to the local hard drive for comparison…
Mark Theunissen
  • 3,168
  • 3
  • 16
  • 10
26
votes
4 answers

NFS poor write performance

I have two machines connected with 10Gbit Ethernet. Let one of them be NFS server and another will be NFs client. Testing network speed over TCP with iperf shows ~9.8 Gbit/s throughput in both directions, so network is OK. Testing NFS server's disk…
Sergey
  • 611
  • 2
  • 6
  • 11
26
votes
7 answers

mount.nfs: access denied by server while mounting

On my Ubuntu system, I have this line in /etc/fstab: myserver:/home/me /mnt/me nfs rsize=8192,wsize=8192,timeo=14,intr When I do sudo mount -a I get: mount.nfs: access denied by server while mounting myserver:/home/me How can I diagnose this…
JoelFan
  • 2,285
  • 5
  • 26
  • 30
26
votes
4 answers

Is it reasonable to use NFS on a production web server?

Can NFS be reasonably used on production servers as a means of connecting a compute server to a storage server, assuming the connection is over a LAN 1Gbe or 10Gbe connection? There's obviously some network overhead and NFS seems particularly slower…
Makoto
  • 371
  • 3
  • 6
23
votes
5 answers

Files mounted over NFSv4 are owned by 4294967294, UIDs and GIDs match

I have two identical linux machines (identical images launched in amazon EC2) and I am trying to mount an exported directory over NFSv4. Here is what the mounted directory looks like on the client machine: root@server:~# ls -l /websites/ drwxr-xr-x …
jberryman
  • 914
  • 2
  • 10
  • 25
23
votes
8 answers

Analyzing Linux NFS server performance

I'd like to do some analysis of our NFS server to help track down potential bottlenecks in our applications. The server is running SUSE Enterprise Linux 10. The kind of things I'm looking to know are: Which files are being accessed by which…
Kamil Kisiel
  • 12,184
  • 7
  • 48
  • 69
22
votes
4 answers

Systemd: start a unit after another unit REALLY starts

In my particular case I want to start remote-fs unit after all glusterfs completely starts. My systemd files: glusterfs target: node04:/usr/lib/systemd/system # cat glusterfsd.service [Unit] Description=GlusterFS brick processes (stopping…
Sergey
  • 611
  • 2
  • 6
  • 11
21
votes
1 answer

Mount NFS volume on Ubuntu Linux server from macOS client

I have an Ubuntu 20.04 server (a local VM in my case). How do I mount a directory on the Linux server from a macOS Catalina client, using NFS?
Jo Liss
  • 2,878
  • 2
  • 23
  • 23
21
votes
3 answers

How do I forcibly unmount when I'm getting stale nfs file handles?

Got myself into a tricky situation. Have aufs mounted at /mnt/1 aufs on /mnt/1 type aufs (rw,relatime,si=daab1cec23213eea) I can't unmount the thing: sudo umount -f /mnt/1 umount2: Stale NFS file handle umount: /mnt/1: Stale NFS file…
UsAaR33
  • 1,096
  • 3
  • 11
  • 20
20
votes
2 answers

Does NFS and SMB support sparse files?

This question was previously asked in stack overflow but the good folks there have recommended that i try the community over here instead. I am researching on sparse files with regards to various filesystems and am trying to find something concrete…
winhung
  • 313
  • 2
  • 7
20
votes
6 answers

exportfs: Warning: /home/user/share does not support NFS export

'exportfs -r' returns me this error when I'm trying to export /home/user/share (ext4): exportfs: Warning: /home/user/share does not support NFS export. /etc/exports: /home/user/share 192.168.1.3 (rw,no_subtree_check) The system is Ubuntu 10.04…
Talis
  • 209
  • 1
  • 2
  • 3
19
votes
7 answers

Slow NFS transfer performance of small files

I'm using Openfiler 2.3 on an HP ML370 G5, Smart Array P400, SAS disks combined using RAID 1+0. I set up an NFS share from ext3 partition using Openfiler's web based configuration, and I succeeded to mount the share from another host. Both host are…
Arie K
  • 1,633
  • 5
  • 19
  • 27
18
votes
4 answers

File locks on an NFS?

My server uses NFS (Network File System), and I'm unable to use PHP's flock() -function. Is there a way to lock files on an NFS or is there a need to do so?
rFactor
  • 367
  • 1
  • 3
  • 13
18
votes
4 answers

"Stale NFS file handle" after reboot

On the server node, it is possible to access an exported folder. However, after reboots (both server and client), the folder is no longer accessible from the clients. On server # ls /data Folder1 Forlder2 and the /etc/exports file contains /data…
mahmood
  • 1,022
  • 7
  • 20
  • 33
18
votes
2 answers

An unknown tool is wiping our Virtual Machines and we can't ID it

A console view of a Windows 2008 R2 VM, on vSphere is showing the following screen: "Operation 2 of 2" "Wiping disk" Can someone advise on what this program is? Some information on this mystery: A number of VMs are now effected. The symptom is…
Rqomey
  • 1,055
  • 9
  • 25