AWS Security ChangesHomeSearch

AWS fsx documentation change

Service: fsx · 2025-05-10 · Documentation low

File: fsx/latest/ONTAPGuide/mount-iscsi-windows.md

Summary

Updated iSCSI connection script to check existing MPIO settings, track active connections, and dynamically adjust sessions based on recommended counts.

Security assessment

The changes improve script reliability by ensuring MPIO path verification is enabled and preventing redundant connections. While MPIO configuration impacts availability, there is no evidence of a specific security vulnerability being addressed. The modifications focus on operational efficiency rather than security fixes.

Diff

diff --git a/fsx/latest/ONTAPGuide/mount-iscsi-windows.md b/fsx/latest/ONTAPGuide/mount-iscsi-windows.md
index fd5a6f2f0..2ed38674b 100644
--- a//fsx/latest/ONTAPGuide/mount-iscsi-windows.md
+++ b//fsx/latest/ONTAPGuide/mount-iscsi-windows.md
@@ -140 +140 @@ In this example, the IP address of `iscsi_1` is `172.31.0.143` and `iscsi_2` is
-     * Establishes 8 sessions for each iSCSI connection, which enables the client to drive up to 40 Gbps (5,000 MBps) of aggregate throughput to the iSCSI LUN. Having 8 sessions ensures a single client can drive the full 4,000 MBps throughput capacity for the highest-level FSx for ONTAP throughput capacity. You can optionally change the number of sessions to a higher or lower number of sessions (each session provides up to 625 MBps of throughput) by modifying the script's for-loop in the `#Establish iSCSI connection` step from `1..8` to another upper-bound. For more information, see [ Amazon EC2 instance network bandwidth](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-network-bandwidth.html) in the _Amazon Elastic Compute Cloud User Guide for Windows Instances_.
+     * Establishes 8 sessions for each iSCSI connection, which enables the client to drive up to 40 Gbps (5,000 MBps) of aggregate throughput to the iSCSI LUN. Having 8 sessions ensures a single client can drive the full 4,000 MBps throughput capacity for the highest-level FSx for ONTAP throughput capacity. You can optionally change the number of sessions to a higher or lower number of sessions (each session provides up to 625 MBps of throughput) by modifying the `RecommendedConnectionCount` variable. For more information, see [ Amazon EC2 instance network bandwidth](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-network-bandwidth.html) in the _Amazon Elastic Compute Cloud User Guide for Windows Instances_.
@@ -148,2 +148,3 @@ Copy the following set of commands into a file to create the `.psl` script.
-        #iSCSI IP addresses for Preferred and Standby subnets 
-    $TargetPortalAddresses = @("iscsi_1","iscsi_2") 
+        Write-Host "Starting iSCSI connection setup..."
+         $TargetPortalAddresses = @("iscsi_1","iscsi_2"); $LocaliSCSIAddress = "ec2_ip"
+         $RecommendedConnectionCount = 8
@@ -151,4 +151,0 @@ Copy the following set of commands into a file to create the `.psl` script.
-    #iSCSI Initator IP Address (Local node IP address) 
-    $LocaliSCSIAddress = "ec2_ip" 
-                                        
-    #Connect to FSx for NetApp ONTAP file system 
@@ -159 +155,0 @@ Copy the following set of commands into a file to create the `.psl` script.
-    #Add MPIO support for iSCSI 
@@ -162,2 +158,17 @@ Copy the following set of commands into a file to create the `.psl` script.
-    #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
+         $currentMPIOSettings = Get-MPIOSetting
+         if ($currentMPIOSettings.PathVerificationState -ne 'Enabled') {
+             Write-Host "Setting MPIO path verification state to Enabled"; Set-MPIOSetting -NewPathVerificationState Enabled
+         } else { Write-Host "MPIO path verification state already Enabled" }
+    
+         $portalConnectionCounts = @{}
+         foreach ($TargetPortalAddress in $TargetPortalAddresses) { $portalConnectionCounts[$TargetPortalAddress] = 0 }
+    
+         $sessions = Get-IscsiSession
+         if ($sessions) {
+             foreach ($session in $sessions) {
+                 if ($session.IsConnected) {
+                     $targetPortal = (Get-IscsiTargetPortal -iSCSISession $session).TargetPortalAddress
+                     if ($portalConnectionCounts.ContainsKey($targetPortal)) { $portalConnectionCounts[$targetPortal]++ }
+                 }
+             }
+         }
@@ -165,3 +176,10 @@ Copy the following set of commands into a file to create the `.psl` script.
-    #Establish iSCSI connection 
-    1..8 | %{Foreach($TargetPortalAddress in $TargetPortalAddresses)
-    {Get-IscsiTarget | Connect-IscsiTarget -IsMultipathEnabled $true -TargetPortalAddress $TargetPortalAddress -InitiatorPortalAddress $LocaliSCSIAddress -IsPersistent $true}}
+         foreach ($TargetPortalAddress in $TargetPortalAddresses) {
+             $existingCount = $portalConnectionCounts[$TargetPortalAddress]; $remainingConnections = $RecommendedConnectionCount - $existingCount
+             Write-Host "Portal $TargetPortalAddress has $existingCount existing connections, $remainingConnections remaining (max recommended: $RecommendedConnectionCount)"
+             if ($remainingConnections -gt 0) {
+                 Write-Host "Creating $remainingConnections connections for portal $TargetPortalAddress"
+                 1..$remainingConnections | ForEach-Object {
+                     Get-IscsiTarget | Connect-IscsiTarget -IsMultipathEnabled $true -TargetPortalAddress $TargetPortalAddress -InitiatorPortalAddress $LocaliSCSIAddress -IsPersistent $true
+                 }
+             } else { Write-Host "Maximum connections (8) reached for portal $TargetPortalAddress" }
+         }
@@ -169 +186,0 @@ Copy the following set of commands into a file to create the `.psl` script.
-    #Set the MPIO Policy to Round Robin