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
8
votes
5 answers

How to remove directory on NFS fileystem with an enormous number of files

A poorly tested program created a directory on an NFS share with an enormous number of files, which I need to remove. ls -ald /home/foo drwxrwxr-x 2 503 503 317582336 Jul 29 11:38 /home/foo The directory is located on an NFS mount of about 600GB…
hrf
8
votes
5 answers

Networked filesystem with user level security for linux

I want to enable file sharing between servers and clients, both linux. I don't want to rely on machine trust like in NFSv4 because client users will have root privileges. What are my options besides SMB (SAMBA)? Does OpenAFS support user level…
Konrads
  • 870
  • 2
  • 20
  • 40
8
votes
2 answers

Server load high, CPU idle. NFS the cause?

I am running into a scenario where I'm seeing a high server load (sometimes upwards of 20 or 30) and a very low CPU usage (98% idle). I'm wondering if these wait states are coming as part of an NFS filesystem connection. Here is what I see in…
Mech
  • 660
  • 2
  • 11
  • 22
8
votes
4 answers

Good NFS configuration for Small Network (NFS Performance Issues)

I have a small LAN that has a couple of Linux boxes (Ubuntu 9.10) with NFS shares on them. The boxes are networked with a consumer grade Netgear router (model WGR614V9) and using wired connections. When I first set up the NFS shares, I noticed that…
dmcer
  • 195
  • 1
  • 5
7
votes
1 answer

NFS: What is remote locking, and do I need it?

I'm building a somewhat minimalistic system that collects serial port data and shoves it into a logfile on an NFS mount. In an effort to reduce the system somewhat I decided to disable RPC as I couldn't see the use for it, and this resulted in the…
Jarmund
  • 535
  • 2
  • 6
  • 17
7
votes
1 answer

How to configure reasonable timeout for nfs?

I have nfs mount to a directory on remote machine. When the remote machine is down or disconnected, any command on the nounted nfs (such as: ls, or open file) is stuck. I want it to just fail in a few seconds if the nfs dir is not available. How…
SHR
  • 293
  • 1
  • 2
  • 10
7
votes
2 answers

Is it possible to have a unique .bash_history file per host?

My home directory is mounted on an NFS mount. The commands I use on one machine are usually quite different to those on another. Is it possible to have easy host write to it's own history file?
brianegge
  • 1,064
  • 2
  • 14
  • 23
7
votes
2 answers

Figuring out why I'm going over hard-drive quota

I suck at system administration, so if I'm getting something basic wrong, please let me know. Here is something that drives me nuts. At work, we have a big NFS server that serves all the employees of our company. Everyone has a certain number of…
Ram Rachum
  • 5,231
  • 7
  • 34
  • 46
7
votes
1 answer

How can I use POSIX ACLs on an NFSv4 mount in Linux?

I have recently transitioned a Linux fileserver from offering only NFS v3 to also offering NFS v4. All of our clients happily started using NFS v4 automatically. Unfortunately, this effectively broke ACL management for the handful of users that…
asciiphil
  • 3,086
  • 3
  • 28
  • 53
7
votes
4 answers

Maximum Number of Files in a Single Directory for Netapp NFS mounts on Linux

On an older Linux box I have, there is an NFS mount of a Netapp. Once there are 100k files in a single directory on this box, files can no longer be written. Anyone know what might be causing this? I have been told symbolic links can still be…
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
7
votes
6 answers

Rsync hangs: expand file_list pointer array to N bytes, did move

Rsync is going into "interruptible sleep" mode after transferring some files from a local folder to a NFS folder. The folder I am trying to backup contains more than 180gb of data. This is what rsync outputs before it hangs: [sender] expand…
jithujose
  • 241
  • 1
  • 3
  • 6
7
votes
1 answer

NFS alternative

I'm running a storage server that has to mount home-dirs of different users at several (5) centos servers. The NFS storage server has direct Fibrechannel storage (with high speed, verified). When the NFS is mounted on a client, big file writes go…
Jeffrey
  • 83
  • 1
  • 1
  • 6
7
votes
2 answers

Can NFS server limit the amount of disk space that the NFS client can use?

Let's say in a server A with 100GB partition, user create a NFS export directory. In server B, user mount the NFS share to use it. In server A, can the NFS server limit the amount of disk space that the NFS client can use? Or the client will always…
userpal
  • 613
  • 4
  • 10
  • 17
7
votes
3 answers

Concurrent NFS access

Similar to Concurrent FTP access. How is concurrent file access handled for NFS? Say that one client is updating/overwriting a file on a NFS server, and a process on the server is reading that same file directly from the file system at the same…
Kristian
  • 195
  • 1
  • 1
  • 6
7
votes
3 answers

How do I configure an NFS server to accept all mount requests?

Adding 0.0.0.0/32 in /etc/exports does not seem to work. Is there some other configuration option that can be used for this?
xkcd
  • 444
  • 3
  • 7
  • 16