Linux on Azure

Linux NFS: The Basics and How to Run NFS in the Cloud

November 25, 2020

Topics: Azure NetApp Files Elementary 5 minute read

What is Linux NFS?

Network File System (NFS) is a client-server application that allows users to view and modify files on remote computers as if they were local files. NFS is one of several standards for distributed file systems on network attached storage (NAS). Behind the scenes, NFS uses remote procedure calls (RPC) to route client requests.

NFS allows users or administrators to mount all or part of a server's file system or a local device. On Linux or UNIX, you can do this by running the mount command while the terminal is pointing at a specific local folder. Clients can have read-only or read-write permissions assigned to folders or individual files.

In this article, you will learn:

NFS Pros and Cons

NFS is a tried and tested protocol for remote file mounting, but there are alternatives, like FUSE, and the Windows SMB protocol, which can also be used on Linux systems. Below are some of the pros and cons of NFS.

NFS advantages

  • Low-cost solution for network file sharing.
  • Easy to set up, uses existing IP infrastructure.
  • Enables central management of shared files.
  • Reduces disk space requirements for individual users (due to the reduced need to store software or other files locally).
  • Lets users access remote files in the same way they access local files.
  • Reduces the need for removable media storage like DVDs or USB disks, which improves security.

NFS disadvantages

  • Based on RPC, which is inherently insecure. RPC communication should only be allowed behind a firewall, on a trusted network.
  • NFSv4 and NFSv4.1 may have limits in maximal bandwidth, so NFS can slow down in the event of high traffic loads. This has improved in version 4.2.

NFS Versions

There are currently three versions of NFS:

  • NFS version 2 (NFSv2)—still widely supported, limited to 2GB of file data per client.
  • NFS version 3 (NFSv3)—supports asynchronous writes and is more reliable than NFSv2 in error handling. Supports 64-bit file sizes and offsets, allowing clients to access file shares larger than 2GB.
  • NFS version 4 (NFSv4)—works across firewalls and the Internet, does not require rpcbind (a service that converts RPC addresses into universal addresses). Supports access control lists (ACLs), and stateful operations.

Using NFS with TCP
All versions of NFS support Transmission Control Protocol (TCP) over IP networks. Only NFSv4 requires it. NFSv2 and NFSv3 can alternatively use User Datagram Protocol (UDP) over IP networks, to establish stateless network connections between clients and servers.

TCP vs UDP
When using NFSv2 or NFSv3 over UDP, the overhead required by the UDP protocol is typically lower than TCP. This can improve performance on networks with high uptime and low congestion. However, UDP is stateless and the server crashes unexpectedly, UDP clients keep sending requests to the server, flooding the network with traffic.

In addition, in UDP if a client is missing a frame, it needs to resend the full RPC request, while with TCP, it only needs to retransmit the lost frame. Therefore, we recommend using TCP when connecting to an NFS server. Therefore, in most real-world scenarios, TCP is recommended.

File Shares in the Cloud: NFS Support in Azure Files

Microsoft Azure, a popular public cloud service, offers Azure Files, a cloud-based distributed file which supports NFS 4.1 since September 2020, in the Azure Files premium tier only.

This means you can mount file shares from Azure Files storage just as easily as you would mount file shares from a server in the local data center, with the full semantics of a regular file system. Azure Files also supports strong consistency, enabling frequent updates by clients to their data.

To backup NFS shares, you can use tools like rsync, or third-party backup providers. Migration of large data volumes is managed with standard utilities like scp or rsync.

See the Azure documentation to learn how to create an NFS share in Azure Files.

Related content: Solve your Linux file service challenges in Azure

Enterprise-Grade NFS Cloud Shares with Azure NetApp Files

Azure NetApp Files is a cloud service offering enterprise-class, high-performance file storage for enterprises. It supports NFS versions 3.1 and onwards.

Azure NetApp Files supports all types of production workloads and provides built-in high availability. You can choose the level and performance of the service, and perform instant snapshots of your data.

Extreme File Performance

Leverage industry-leading NetApp technology to migrate the most demanding Linux and Windows file workloads to Azure. Azure NetApp Files delivers sub-millisecond latency and equivalent performance to what you would achieve with a local bare metal server.

Azure NetApp Files provides three performance levels: Standard, Premium, and Ultra. You can provision file shares in any of the tiers with one click.

Integrated Data Management

Azure NetApp Files integrates with complex business workloads such as SAP HANA, high performance computing (HPC), line of business (LOB) applications, and virtual desktop infrastructure (VDI). For these and many more enterprise workloads, it offers integrated data management and application awareness for backups and snapshots.

Central Management

You can manage file shares using Azure Portal or CLI, PowerShell commands, or a REST API, just like any other Azure service. Azure NetApp Files supports multiple storage protocols in one service, including NFSv3, SMB3.1.x, and NFSv4.1. This allows you to transition workloads to the cloud in a “lift and shift” model, without requiring code changes.

Migrate with Confidence

When migrating large enterprise workloads, rsync data transfer is not enough. With Azure NetApp Files you can manage large-scale data transfer and synchronization at ease.

The service provides FIPS 140-2-compliant data encryption, role-based access control (RBAC), Active Directory authentication, and access control lists (ACL). Azure NetApp Files complies with major industry certifications such as HIPAA, SOC and GDPR. These and other enterprise-grade features mean you can migrate any enterprise workload to the cloud with complete confidence.

Want to get started? See Azure NetApp Files for yourself with a free demo.

Cloud Data Services

-
X