iSCSI Target-Server

iSCSI Target-Server

#Create a new iSCSI Target
New-IscsiServerTarget -TargetName mssql_target01

#Check the current configuration of the iSCSI Target
Get-IscsiTargetServerSetting

#Remove the LAN NIC - only the iSCSI network should be available for iSCSI traffic
Set-IscsiTargetServerSetting -IP 192.168.50.10 -Enable $false

#Create three fixed-size iSCSI LUNs (Quorum, Database and Logs)
New-IscsiVirtualDisk -Path D:\iSCSI\mssql_quorum.vhdx -Size 500MB -Fixed
New-IscsiVirtualDisk -Path D:\iSCSI\mssql_db.vhdx -Size 10GB -Fixed
New-IscsiVirtualDisk -Path D:\iSCSI\mssql_logs.vhdx -Size 10GB -Fixed

#Add all LUNs to the iSCSI target
Add-IscsiVirtualDiskTargetMapping -TargetName mssql_target01 -Path D:\iSCSI\mssql_quorum.vhdx
Add-IscsiVirtualDiskTargetMapping -TargetName mssql_target01 -Path D:\iSCSI\mssql_db.vhdx
Add-IscsiVirtualDiskTargetMapping -TargetName mssql_target01 -Path D:\iSCSI\mssql_logs.vhdx

You may also like...