A shared folder that many machines can mount, with the files and folders you already know.
File storage gives you a shared folder over the network. Many machines can mount it and use it like a local disk, with the same files, folders and permissions they already know. NFS is the common protocol for this on Linux and Unix.
There are three main kinds of storage. Block storage is a raw disk for one machine. Object storage stores whole objects behind an HTTP API. File storage sits between them: it shows a tree of folders and files, and many machines can use it at the same time.
With NFS (Network File System), a server shares a folder, called an export. A client attaches it at a path such as /mnt/shared, called a mount. After that, programs on the client read and write files there with ordinary calls, and have no idea the bytes travel over a network. Windows networks use a similar protocol called SMB (also known as CIFS).
# on the server: /etc/exports /data 10.0.0.0/24(rw,sync) # on a client mount -t nfs fileserver:/data /mnt/shared
| Block storage | File storage (NFS) | Object storage | |
|---|---|---|---|
| Looks like | A raw disk | Folders and files | A bucket of keyed objects |
| Used by | One machine (usually) | Many machines at once | Any client over HTTP |
| Access | Block reads and writes | POSIX-style file calls | PUT / GET of whole objects |
| Latency | Lowest | Medium: round trips for metadata | Highest per request |
| Scale | Per volume | Per file server or cluster | Almost unlimited |
| Edit part of a file | Yes | Yes | No: replace the whole object |
| Best for | Databases, boot disks | Shared folders, legacy apps | Photos, backups, static assets |
Older NFS versions were designed so the server kept little state about each client. Newer versions are stateful and add features such as better locking, security and parallel access. The details differ by version, so check which one your system uses.
| Step | What the client does | Why it costs time |
|---|---|---|
| Lookup | Find the file by walking the path | A network round trip for each folder level, unless cached |
| Open | Ask the server to open the file | One more round trip |
| Read | Fetch the bytes | Data transfer, possibly in several requests |
| Close | Tell the server it is done | Another round trip, and a point where changes are flushed |
Illustrative model, not a benchmark: every file is assumed to cost about 3 round trips (open, data request, close) one after another, and the link moves 100 MB per second. Real clients can overlap requests and cache metadata, but the lesson holds: on a network mount, the number of files matters as much as the number of bytes.
| Term | Meaning in easy words |
|---|---|
| NFS | Network File System: a protocol for sharing a folder over a network, common on Linux and Unix |
| SMB / CIFS | The file-sharing protocol common in Windows networks |
| Export | A folder the server offers to share |
| Mount | Attaching a shared folder at a path on the client |
| POSIX semantics | The usual Unix file behaviour: open, read, write, rename, permissions and locks |
| Metadata | Information about a file (name, size, owner, time), apart from its contents |
| File lock | A way to say that one process is using a file, so others wait or fail |
| Client cache | A local copy of data or metadata kept by the client to save round trips |
| Close-to-open consistency | A promise that data written before a close is visible to a later open |
| File server / NAS | A machine or appliance whose job is to serve files over the network |
| Managed file service | A cloud service that runs the file servers for you (EFS, Azure Files, Filestore) |
| Choice | We gain | We lose |
|---|---|---|
| File storage over block | Sharing between machines | Latency and some speed |
| File storage over object | Folders, rename, locks and partial writes | Scale and low cost per gigabyte |
| Client caching on | Fewer round trips, faster reads | Other clients may see old data for a moment |
| Client caching off | Fresh data | Much slower |
| Single NFS server | Simple and cheap | A single point of failure and a limit on scale |
| Managed file service | Failover and growth handled for you | Cost and less control |