70-740, Teil 2.2.5. iSCSI-Ziel und -Initiator konfigurieren

70-740, Teil 2.2.5.

iSCSI-Ziel und -Initiator konfigurieren

Ideen für die Recherche im Web:

Zum Nachschlagen:

Übungen:

Get-VM

#Bei Bedarf
#Start-VM CL-Core1

HOSTNAME.EXE

Get-WindowsFeature *iscsi*

Install-WindowsFeature FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools

Get-WindowsFeature *iscsi*

Get-Command new*iscsi*

Get-Help New-IscsiVirtualDisk -ShowWindow

dir C:\iSCSI\

mkdir C:\iSCSI\

ls C:\iSCSI\

New-IscsiVirtualDisk -Path C:\iSCSI\iSCSI-Target-1.vhdx -SizeBytes 100GB
#https://docs.microsoft.com/en-us/powershell/module/iscsitarget/new-iscsivirtualdisk?view=win10-ps

New-IscsiServerTarget -TargetName „iSCSI-Ziel-1“ -InitiatorId @(„IPAddress:10.105.2.1“)
#https://docs.microsoft.com/en-us/powershell/module/iscsitarget/new-iscsiservertarget?view=win10-ps

Add-IscsiVirtualDiskTargetMapping -TargetName „iSCSI-Ziel-1“ -DevicePath „C:\iSCSI\iSCSI-Target-1.vhdx“
#https://docs.microsoft.com/en-us/powershell/module/iscsitarget/add-iscsivirtualdisktargetmapping?view=win10-ps

Enter-PSSession -VMName CL-Core1
#Invoke-Command

Get-Service -Name msiscsi

Set-Service -Name msiscsi -StartupType Automatic
#https://blogs.msdn.microsoft.com/san/2012/07/31/managing-iscsi-initiator-connections-with-windows-powershell-on-windows-server-2012/

Get-Service -Name msiscsi

Set-Service -Name msiscsi -Status Running

Get-Service -Name msiscsi

Get-NetFirewallServiceFilter -Service msiscsi | Get-NetFirewallRule | Select DisplayGroup,DisplayName,Enabled

Get-NetFirewallServiceFilter -Service msiscsi | Get-NetFirewallRule | Set-NetFirewallRule -Enabled True

Get-NetFirewallServiceFilter -Service msiscsi | Get-NetFirewallRule | Select DisplayGroup,DisplayName,Enabled

Get-IscsiTargetPortal

New-IscsiTargetPortal –TargetPortalAddress 10.5.2.1

Get-IscsiTargetPortal
#https://docs.microsoft.com/en-us/powershell/module/iscsi/new-iscsitargetportal?view=win10-ps

Get-IscsiTarget | Connect-IscsiTarget #-IsMultipathEnabled $true -IsPersistent $true

Get-IscsiTarget | ft NodeAddress, IsConnected

Get-iSCSIConnection

Get-iSCSISession

Get-iSCSISession | Get-Disk | ft Size,OperationalStatus

Get-Disk | Where-Object IsOffline –Eq $True

Get-Disk | Where-Object IsOffline –Eq $True | Set-Disk -IsOffline $false

Get-Disk | ft Size,OperationalStatus

Exit-PSSession