Compare file-level NAS shares with block-level iSCSI on the same data
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
- 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. Saveexportfs -vtolab/nas/exports.txtandtestparm -stolab/nas/smb.txt. - Mount the NFS export on lin-srv itself at
/mnt/nfsand map the SMB share on win-srv as a drive letter. Savemount | grep nfstolab/nas/nfs-mount.txtandGet-SmbMapping | Format-Listtolab/nas/smb-mount.txt. - Create a file from each client and confirm both clients see both files. Record the result in
lab/nas/shared.txt. - Remove write permission for the Samba user on one file and record, in
lab/nas/permissions.txt, which system enforced the refusal and where. - Write
lab/nas/compare.csvwith headerproperty,nfs_or_smb,iscsicovering 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.