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
6
votes
7 answers

When using NFS, how do I make user A on the server appear as user B on the client?

I have a couple of servers on which the UIDs and GIDs are different for the same user names and group names. When I NFS mount a directory ostensibly owned by the same user from one server to another, the user can't access the files because of the…
Nick Pierpoint
  • 629
  • 1
  • 9
  • 14
6
votes
1 answer

Slow copying between NFS/CIFS directories on same server

Please bear with me, I know it's a lot to read. This problem may be applicable to others, so it would be great to have an answer. I had to give away the bounty because it was going to expire. When I copy to or from my NFS server (Debian) from a…
Ryan Babchishin
  • 6,260
  • 2
  • 17
  • 37
6
votes
1 answer

How can I test whether fcntl() locks work with my NFS setup?

From the SQLite FAQ: Can multiple applications or multiple instances of the same application access a single database file at the same time? … SQLite uses reader/writer locks to control access to the database. … But use caution: this locking…
200_success
  • 4,771
  • 1
  • 25
  • 42
6
votes
2 answers

Is there a valid stability argument against NFS?

We are adding a feature to our web app where uploaded files (to app servers) are processed by background workers (other machines). The nature of the application means these files stick around for a certain amount of time. Code executing on the…
z5h
  • 163
  • 6
6
votes
1 answer

Configuring Synology NAS as freeIPA client

I'm attempting to deploy freeIPA in my company. The network is quite simple: < 10 FC20 (and FC21 beta) desktops < 5 FC20 servers (including the one with freeIPA) 1 Synology NAS DS1813+ (DSM 5.0) I am first simulating everything on VMs (including…
cornuz
  • 437
  • 1
  • 7
  • 17
6
votes
3 answers

Shared Disk in modern data center (SAN, virtualization, etc)

I'm a developer...treading here on foreign terrain. Please pardon any naivete. I work on an application that stores data both in a database and the filesystem. Context: Clustering and Network Shares In the past when we ran the application clustered…
user50460
  • 315
  • 1
  • 2
  • 8
6
votes
1 answer

Is this a Linux NFS client bufferbloat?

On a NFS mount (standard options on RedHat 5.6 with ancient 2.6.18 kernel), it seems to me that big and multiple write operations delay smaller read operations. For example, doing a simple ls in a directory will takes seconds (or minutes) if there's…
Benoît
  • 1,341
  • 3
  • 11
  • 23
6
votes
3 answers

mount using nfs4 giving no such device error

I am trying to mount a folder workspace from server to the client over NFS. For this I bind the folder to an /export by adding the following in my /etc/fstab on server: /home /export none bind Then I add the following lines in my /etc/exports…
Shehbaz Jaffer
  • 181
  • 1
  • 1
  • 6
6
votes
1 answer

How to reference an NFS share by UUID in the client's /etc/fstab

I have the following NFS export on my server, with fsid set to a newly generated UUID. /etc/exports: /mnt/data client(ro,fsid=b07f5af6-6b10-11e3-b4c1-00248115724d) I would then run exportfs -rav which returns no errors, but I don't know how to…
v25
  • 764
  • 1
  • 6
  • 14
6
votes
2 answers

SELinux contexts with NFS shares

I'm trying to set up an NFS share between 2 CentOS servers (filesrv & websrv) for a folder that needs to be readable & writeable by the Apache process. I'm having trouble with the writeable side of this, which I've narrowed down to SELinux…
lyserge
  • 201
  • 1
  • 2
  • 5
6
votes
2 answers

inconsistency between du -sh and df -h

I know this is a common occurrence when the result of du -sh is smaller than that returned by the file system with df -h. (Because some files are still open in processes etc..) But in my case I have the opposite. I'm running Ubuntu 12.04 and trying…
D.Mill
  • 379
  • 5
  • 15
6
votes
3 answers

NFSv4 with idmap

The following errors appear on the NFS server, could you please advise how I can fix this? Details: System: CentOS release 6.4, NFS: nfs-utils-1.2.3-36 # cat /etc/idmapd.conf [General] Domain = domain.com [Mapping] Nobody-User =…
HTF
  • 3,148
  • 14
  • 52
  • 82
6
votes
1 answer

NFS user mapping

I have two machines, both with CentOS 6.4 installed, connected on the same private network. One of them has the purpose of being a NFS server, and the other it's client. On the server machine (server) I exported the directory /net/directory by…
Jorge
  • 163
  • 1
  • 1
  • 3
6
votes
1 answer

NFS client has unbalanced read and write speeds

I've got a NetApp as my nfs server, and two Linux servers as the nfs clients. The problem is that the newer of the two servers has extremely differing read and write speeds whenever it is doing read and writes simultaneously to the nfs server. …
Banjer
  • 3,974
  • 12
  • 41
  • 47
6
votes
1 answer

Why does the "nocto" NFS mount option in Linux not prevent flush-on-close?

I've been learning about the close-to-open policy of NFS, which causes each file to be flushed to the server as it's closed, to ensure consistency across clients. (See http://docstore.mik.ua/orelly/networking_2ndEd/nfs/ch07_04.htm.) This leads…