Block 2 implements an enterprise Storage Area Network (SAN) using the iSCSI (Internet Small Computer System Interface) protocol over standard TCP/IP. We configure the FS-iSCSITarget-Server role, provision a dedicated 5GB Logical Unit Number (LUN01.vhdx), configure target Access Control Lists (ACLs) using IQN qualifiers, connect the initiator session persistently, and mount the remote SAN disk as Drive F: iSCSI-SAN.
๐ Storage Architecture Comparison: DAS vs NAS vs SAN
| Parameter | DAS (Direct Attached Storage) | NAS (Network Attached Storage) | SAN (Storage Area Network) |
|---|---|---|---|
| Access Level | Block-Level (Internal SATA/SAS) | File-Level (Filesystem shares) | Block-Level (Raw disk over IP) |
| Protocols | SATA, SAS, NVMe, PCIe | SMB (Windows), CIFS, NFS (Linux) | iSCSI (TCP 3260), Fibre Channel |
| Transport | Motherboard Cables / Bus | Standard LAN (Ethernet) | Dedicated IP SAN / Fibre Mesh |
| Best For | Single machine boot OS disk | Shared team folders, backups | Hyper-V Failover Clusters, SQL DBs |
Step 1: Deploy iSCSI Target Server & 5GB LUN
We install the iSCSI Target Server role, create the 5GB virtual hard disk (LUN), and configure the target name Target-Lab01:
# 1. Install iSCSI Target Server Feature Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeManagementTools # 2. Provision 5GB LUN VHDX $lunPath = "C:\iSCSI_LUNs\LUN01.vhdx" if (-not (Test-Path "C:\iSCSI_LUNs")) { New-Item -Path "C:\iSCSI_LUNs" -ItemType Directory | Out-Null } New-IscsiVirtualDisk -Path $lunPath -SizeBytes 5GB # 3. Create iSCSI Target and configure Initiator Access $targetName = "Target-Lab01" New-IscsiServerTarget -TargetName $targetName -InitiatorIds "IQN:*", "IPAddress:192.168.10.10", "IPAddress:127.0.0.1" # 4. Map LUN to Target Add-IscsiVirtualDiskTargetMapping -TargetName $targetName -DevicePath $lunPath
Step 2: Connect Initiator & Mount SAN Volume (Drive F:)
We start the MSiSCSI initiator service, discover the target portal at 192.168.10.10, establish a persistent session, initialize the remote SAN disk, and format it as NTFS:
# 1. Start & Configure Initiator Service Set-Service -Name MSiSCSI -StartupType Automatic Start-Service -Name MSiSCSI # 2. Add Target Portal & Connect Persistent Session New-IscsiTargetPortal -TargetPortalAddress "192.168.10.10" $target = Get-IscsiTarget | Where-Object NodeAddress -like "*target-lab01*" Connect-IscsiTarget -NodeAddress $target.NodeAddress -IsPersistent $true # 3. Initialize SAN Disk and Format NTFS Volume (F:) Update-HostStorageCache $sanDisk = Get-Disk | Where-Object BusType -eq 'iSCSI' Initialize-Disk -Number $sanDisk.Number -PartitionStyle GPT $part = New-Partition -DiskNumber $sanDisk.Number -UseMaximumSize -DriveLetter 'F' Format-Volume -Partition $part -FileSystem NTFS -NewFileSystemLabel "iSCSI-SAN" -Confirm:$false
-IsPersistent $true, the iSCSI session will drop on server reboot. Setting persistence ensures Windows automatically re-establishes the TCP 3260 channel during boot before cluster services or SQL start up.
Step 3: Verification & Active Session Audit
& ".\scripts\02_Block2_iSCSI\Verify-Block2.ps1"