iSCSI Hub
Isometric pink cubes of various sizes linked by thin lines to a central platform with a padlock on a dark navy background, evoking networked homelab storage
comparisons

NFS vs iSCSI for a Homelab: Which One to Pick

Choose NFS or iSCSI for a homelab NAS. Compare shared files, Proxmox VM disks and backups, and see what the performance data can tell you.

By iSCSI Hub Editorial · · 4 min read

Use NFS for shared files, ISO images and backup archives on a homelab NAS. On a single Proxmox node, start with local storage for VM disks. Choose iSCSI when a host needs a NAS-backed block device. Give an ordinary filesystem on that device one host at a time, or use a cluster-aware layer to coordinate shared access.

NFS vs iSCSI side by side

NFSiSCSI
What the NAS exposesA directory that clients mount as a file shareA block device, called a LUN, that the client sees as a disk
Who manages the filesystemThe NAS, which serves files and directoriesThe host or guest using the disk, or a cluster filesystem if configured
How hosts share accessMultiple hosts mount the export and work with files through the NASHosts sharing the same LUN need a layer that coordinates access to its blocks

A NAS is the storage server. It can offer NFS for file access and iSCSI for block access. If several machines need the same media or backup files, give them an NFS share. For Windows file sharing, see iSCSI vs NFS vs SMB. USENIX on file and block access

Can two computers use the same iSCSI LUN?

LayoutWho accesses the LUNWhat coordinates access
One host mounts an ordinary filesystemNAS LUN → Host A → local filesystemHost A’s filesystem driver manages blocks and metadata.
A cluster shares a LUNNAS LUN → Hosts A and B → cluster filesystemThe cluster filesystem coordinates access across both hosts.

Mount an ordinary filesystem on a writable LUN from one host at a time. For concurrent access to the same filesystem, use a cluster filesystem designed to coordinate access to the shared blocks. USENIX on sharing iSCSI storage

With shared LVM, Proxmox coordinates storage operations within the cluster and divides the LUN into logical volumes for individual guests. Use NFS when those guests need to share ordinary files. Proxmox LVM backend

For target, initiator and LUN terminology, see iSCSI fundamentals.

Should I use NFS or iSCSI for Proxmox?

Start with a NAS export for ISOs and backups, and keep VM disks on the Proxmox host. This example assumes the NAS already exports a writable directory to the node and the node already has local-lvm, the default VM disk store on an LVM-based installation. Proxmox storage manager documentation

On the Proxmox node, replace 10.0.0.10 and /exports/proxmox with your NAS address and export path. Add the export and confirm nas-archives is active. Proxmox NFS backend

pvesm add nfs nas-archives --server 10.0.0.10 --export /exports/proxmox --content iso,backup
pvesm status

For writable NFS storage, keep the default hard behavior. Requests retry if the NAS becomes unavailable. A soft timeout can cause silent data corruption. Linux nfs(5) manual

ContentStorage to chooseHow to use it
Installer ISOsnas-archives (iso)Store installer images here and select one when attaching installation media to a VM.
Backup archivesnas-archives (backup)Select it as the destination for the backup job under Datacenter → Backup. Proxmox backup guide
VM diskslocal-lvm (images)Select it when creating the VM’s virtual disk. The ISO and the new virtual disk can live on different stores.

To migrate a running VM without copying its disks, give the nodes shared access to its disk storage. Register a separate NFS export with images as its content type and select it when creating the VM disk. For shared block storage, select a configured shared LVM store backed by an iSCSI LUN. Keep ISOs and backups on nas-archives. Proxmox Open-iSCSI backend

Is NFS or iSCSI faster?

The USENIX FAST ’04 study found similar performance for several data-heavy workloads and a substantial iSCSI lead in metadata-heavy tests. The authors compared Linux clients and servers with no data shared across hosts. The results below compare NFS v3 and iSCSI on that Linux testbed, which used ext3 and Gigabit Ethernet. System setup

WorkloadWhat the study found
TPC-C transactions and read-heavy TPC-H queriesThroughput was comparable in both database workloads. The paper reported normalized results from unaudited runs. TPC-C and TPC-H results
PostMark small-file creation, deletion, reads and appendsWith 100,000 operations on a pool of 25,000 files, NFS v3 took 516 seconds and iSCSI took 208 seconds. The authors credited client-side metadata caching and batched updates. PostMark results
Sequential reads and writes of a 128 MB test fileSequential reads were comparable. iSCSI completed sequential writes faster in this setup, which the authors attributed to ext3’s asynchronous writes. Sequential and random I/O results

Why does iSCSI look faster on TrueNAS?

Check the sync settings and when each setup acknowledges writes. TrueNAS documents how the zvol’s Sync setting can make asynchronous writes synchronous. Compare results with equivalent write durability before attributing a difference to the protocol. TrueNAS SLOG documentation

FAQ

Can Docker volumes be on NFS?

Yes. Use an NFS-backed Docker volume for shared media or bulk files. Keep SQLite application data on the host’s local filesystem, since broken network filesystem locking can corrupt a database under concurrent access. Docker volumes · SQLite’s locking guidance

Evidence and limits. Performance figures are from FAST ’04. Storage guidance draws on the FAST ’04 paper and Proxmox VE’s upstream storage documentation (master). The example commands were not run for this article.

Sources

  1. USENIX FAST ’04: Differences Between NFS and iSCSI
  2. Proxmox VE: LVM Backend
  3. Proxmox VE: Storage Manager
  4. Proxmox VE: NFS Backend
  5. Debian Manpages: nfs(5)
  6. Proxmox VE: Backup and Restore
  7. Proxmox VE: Open-iSCSI Backend
  8. USENIX FAST ’04: A Performance Comparison of NFS and iSCSI for IP-Networked Storage
  9. USENIX FAST ’04: System Setup
  10. USENIX FAST ’04: TPC-C and TPC-H Results
  11. USENIX FAST ’04: PostMark Results
  12. USENIX FAST ’04: Impact of Sequential and Random I/O
  13. TrueNAS Documentation: SLOG Devices
  14. Docker Engine: Volumes
  15. SQLite: How To Corrupt An SQLite Database File

Related