Compare file-level NAS shares with block-level iSCSI on the same data

applied · 50 min · Objective 1.2

Task

Serve the same folder from lin-srv as an NFS export and an SMB share, access both from win-srv and lin-srv, and compare them with the iSCSI LUN from the short lab: who owns the file system, how permissions are enforced, and what happens when two clients use the storage at once. This is the NAS-against-SAN distinction made concrete.

Steps

  1. On lin-srv create /srv/share, export it over NFS to the host-only subnet read-write, and share it over SMB with a Samba user. Save exportfs -v to lab/nas/exports.txt and testparm -s to lab/nas/smb.txt.
  2. Mount the NFS export on lin-srv itself at /mnt/nfs and map the SMB share on win-srv as a drive letter. Save mount | grep nfs to lab/nas/nfs-mount.txt and Get-SmbMapping | Format-List to lab/nas/smb-mount.txt.
  3. Create a file from each client and confirm both clients see both files. Record the result in lab/nas/shared.txt.
  4. Remove write permission for the Samba user on one file and record, in lab/nas/permissions.txt, which system enforced the refusal and where.
  5. Write lab/nas/compare.csv with header property,nfs_or_smb,iscsi covering at least: level (file or block), who owns the file system, safe for two clients at once, and typical use.

Verify

These checks run in a POSIX shell: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. A stock Windows PowerShell or Command Prompt has no awk or grep, so there the first line fails.

grep -Ec '/srv/share' lab/nas/exports.txt lab/nas/smb.txt
grep -c 'nfs' lab/nas/nfs-mount.txt
grep -Eic 'Status +: +OK|Connected' lab/nas/smb-mount.txt
awk -F, 'NR>1 {n++} END {print n" propert(ies) compared"}' lab/nas/compare.csv
grep -Eic 'block' lab/nas/compare.csv

Both configurations name the shared folder, both mounts are present, and the comparison has at least four rows and describes iSCSI as block-level. The key line is the one about two clients: NFS and SMB coordinate access on the server, while an iSCSI LUN formatted by one client belongs to that client alone.

Notes

Fibre Channel cannot be practised in a home lab without expensive hardware, but it is block storage like iSCSI: everything this lab shows about the iSCSI column applies to a Fibre Channel LUN too, with zoning in place of the ACL.

This is an independent study companion for CompTIA Server+ SK0-005 and is not produced by or endorsed by CompTIA.