Slide 30
Slide 30 text
Windows Server に FSx for NetApp ONTAP を iSCSI 接続してみる 30
● ④. Windows Server:作成した LUN をマウント
● Windows Server に作成した LUN を iSCSI マウントするためのスクリプトが提供されている
#iSCSI IP addresses for Preferred and Standby subnets
$TargetPortalAddresses = @("iscsi_1","iscsi_2")
#iSCSI Initator IP Address (Local node IP address)
$LocaliSCSIAddress = "ec2_ip"
#Connect to FSx for NetApp ONTAP file system
Foreach ($TargetPortalAddress in $TargetPortalAddresses) {
New-IscsiTargetPortal -TargetPortalAddress $TargetPortalAddress -TargetPortalPortNumber 3260 -InitiatorPortalAddress $LocaliSCSIAddress
}
#Add MPIO support for iSCSI
New-MSDSMSupportedHW -VendorId MSFT2005 -ProductId iSCSIBusType_0x9
#Set the MPIO path configuration for new servers to ensure that MPIO is properly configured and visible in the disk properities.
Set-MPIOSetting -NewPathVerificationState Enabled
#Establish iSCSI connection
1..8 | %{Foreach($TargetPortalAddress in $TargetPortalAddresses)
{Get-IscsiTarget | Connect-IscsiTarget -IsMultipathEnabled $true -TargetPortalAddress $TargetPortalAddress -InitiatorPortalAddress $LocaliSCSIAddress -IsPersistent $true}}
#Set the MPIO Policy to Round Robin
Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR
iscsi_1(前の手順で取得した iSCSI IP①)
iscsi_2(前の手順で取得した iSCSI IP②)
ec2_ip(マウントする Windows Server のプライベート IP)
※発表では省略します