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
13
votes
3 answers

NFS cache : file content not updated on client when modified on server

Here's my set up: One NFS Server machine (v4), several NFS client machines. When a client machine write files to the NFS mount, the other clients see the new content instantly : no problem. But, when the server machine modify the content of the…
numberxiii
  • 131
  • 1
  • 1
  • 4
13
votes
4 answers

Read only bind-mount?

I use mount -o bind to mount directories inside chroots, which works really well. The problem is that I'd like some of these bind-mounted directories to be read only in chroot. Is it possible? If not - any other way to achieve it? I was thinking…
user13185
12
votes
8 answers

Tuning NFS client/server stack

I have a CentOS 5 VMWare server connecting to an OpenSolaris 2009.06 machine over NFS that holds the disk images. My virtual machines seem to be bound by slow IO so I'd like to do everything I can to optimize the connection. I'm not sure of the…
Sysadminicus
  • 596
  • 4
  • 8
  • 20
12
votes
1 answer

Is rpcbind needed for an NFS client?

I understand that rpcbind runs on NFS servers to respond to port-mapping requests from clients. Is the rpcbind daemon needed on an NFS client? I'm surprised that it is so difficult to find a definitive answer to this question. That might be because…
Jonathon Reinhart
  • 506
  • 1
  • 8
  • 27
11
votes
6 answers

What does 'no locks available' mean?

I'm trying to commit to a SVN server. On the server the subversion repository is NFS mounted. When doing a commit, I get this error message: svn: Can't get exclusive lock on file '/svn/repo/db/transactions/7802-2.txn/rev-lock': No locks…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
11
votes
3 answers

How to get decent NFS performance for workloads like git?

I manage a vagrant setup for our developers running OSX to manage VirtualBox systems for development. In order to support inotify inside the linux machine, we eschew the usual method of sharing directories with VirtualBox: instead, the Virtualbox…
Cera
  • 553
  • 4
  • 6
  • 13
11
votes
3 answers

nfs, execution denied

I have server (debian 6) machine (say, ip = 10.13.13.100) with nfs exports /etc/exports /path/to/my/shared/folder 10.13.13.0/24(rw,async,no_sub_tree_check,no_root_squash) There are two users on this machine admin (uid = 1000) and user (uid =…
yakki
  • 123
  • 1
  • 1
  • 6
11
votes
4 answers

Crontab running before nfs mounted

Running Cronjob @reboot returns that file on nfs share does not exist. Example @reboot python /abs/path/to/script.py mail from crontab on startup reads "more or less" /usr/bin/python can't open file "/abs/path/to/script.py": [Error No. 2] No such…
Rusty Weber
  • 472
  • 8
  • 21
11
votes
6 answers

CentOS 6 + LDAP + NFS. File ownership is stuck on "nobody"

I've been trying to get LDAP authentication and NFS exported home directories on CentOS 6 working for a few days now. I've gotten to the point that I can now login to the client machine using the username and password in LDAP. On the client, /home…
jamieb
  • 3,427
  • 4
  • 25
  • 36
11
votes
1 answer

What causes repeated linux NFS client side RPC credential refreshing?

Using nfsstat -c, I'm seeing a high "authrefrsh" (known as "newcred" on some systems) count on my NFS client pc for operations like ls and find on directories containing ~1000 files. This correlates with very poor performance (20+ minute directory…
Chris Betti
  • 380
  • 3
  • 14
11
votes
1 answer

NFS v3 versus v4

I am wondering why NFS v4 would be so much faster than NFS v3 and if there are any parameters on v3 that could be tweaked. I mount a file system sudo mount -o 'rw,bg,hard,nointr,rsize=1048576,wsize=1048576,vers=4' toto:/test /test and then run …
Kyle Hailey
  • 275
  • 3
  • 11
11
votes
2 answers

ZFS - destroying deduplicated zvol or data set stalls the server. How to recover?

I'm using Nexentastor on a secondary storage server running on an HP ProLiant DL180 G6 with 12 Midline (7200 RPM) SAS drives. The system has an E5620 CPU and 8GB RAM. There is no ZIL or L2ARC device. Last week, I created a 750GB sparse zvol with…
ewwhite
  • 197,159
  • 92
  • 443
  • 809
11
votes
2 answers

Linux NFS create mask and force user equivalent

I have two Linux servers: fileserver Debian 5.0.3 (2.6.26-2-686) Samba version 3.4.2 apache Ubuntu 10.04 LTS (2.6.32-23-generic) Apache 2.2.14 I have a number of Samba shares on fileserver so that I can access files from Windows PCs. I am also…
Mike
  • 247
  • 1
  • 2
  • 8
11
votes
5 answers

Best filesystem choices for NFS storing VMware disk images

Currently we use an iSCSI SAN as storage for several VMware ESXi servers. I am investigating the use of an NFS target on a Linux server for additional virtual machines. I am also open to the idea of using an alternative operating system (like…
mlambie
  • 1,221
  • 2
  • 16
  • 22
11
votes
9 answers

Geographically distributed file system with preferred locality

I'm building a application that needs to distribute a standard file server across a few sites over a WAN. Basically, each site needs to write a lot of misc files of varying size (some in the 100s MB range, but most small), and the application is…
dpb
  • 445
  • 5
  • 16