iscsiservertarget ( iscsi에 연결된 메인스트로지 역할서버)
iscsiservertarget 상태확인 기본 명령어
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
PS C:\Users\Administrator> Get-IscsiServerTarget ChapUserName : ClusterGroupName : ComputerName : WIN-V55CVJ309EL Description : EnableChap : False EnableReverseChap : False EnforceIdleTimeoutDetection : True FirstBurstLength : 65536 IdleDuration : 00:00:00 InitiatorIds : {IPAddress:192.168.1.207} LastLogin : 2022-07-21 오후 6:39:20 LunMappings : {TargetName:192.168.1.207;VHD:"E:\192.168.1.207\192.168.1.207.vhdx";LUN:0} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {400001370000-0100} Status : Connected TargetIqn : iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.207-target TargetName : 192.168.1.207 ChapUserName : ClusterGroupName : ComputerName : WIN-V55CVJ309EL Description : EnableChap : False EnableReverseChap : False EnforceIdleTimeoutDetection : True FirstBurstLength : 65536 IdleDuration : 20:03:08 InitiatorIds : {IPAddress:192.168.1.206} LastLogin : 2022-07-21 오후 2:40:12 LunMappings : {TargetName:192.168.1.206;VHD:"E:\192.168.1.206\192.168.1.206_10gb.vhdx";LUN:0} MaxBurstLength : 262144 MaxReceiveDataSegmentLength : 65536 ReceiveBufferCount : 10 ReverseChapUserName : Sessions : {} Status : NotConnected TargetIqn : iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.206-target TargetName : 192.168.1.206 PS C:\Users\Administrator> |
좀더 보기 편하게 필요한 필드값만 추출해보자
1 2 3 4 5 6 |
PS C:\Users\Administrator> Get-IscsiServerTarget | select targetname,status,targetiqn TargetName Status TargetIqn ---------- ------ --------- 192.168.1.207 Connected iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.207-target 192.168.1.206 NotConnected iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.206-target |
추가적으로 클라이언트 iscsi에 연결된것을 강제로 enable , disable 할수 있다
1 2 3 4 5 |
### enable Set-IscsiServerTarget -TargetName "192.168.1.206" -enable $true ### disable Set-IscsiServerTarget -TargetName "192.168.1.206" -enable $false |
192.168.1.207번 연결된 상태에서 disable 진행해보자
1 2 3 4 5 6 7 8 9 10 |
PS C:\Users\Administrator> Set-IscsiServerTarget -TargetName "192.168.1.207" -enable $false ### 변경 후 상태 값 확인 PS C:\Users\Administrator> Get-IscsiServerTarget | select targetname,status,targetiqn TargetName Status TargetIqn ---------- ------ --------- 192.168.1.207 Disabled iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.207-target 192.168.1.206 NotConnected iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.206-target |
다시 207번을 enable 시켜보자
1 2 3 4 5 6 7 8 9 |
PS C:\Users\Administrator> Set-IscsiServerTarget -TargetName "192.168.1.207" -enable $true PS C:\Users\Administrator> Get-IscsiServerTarget | select targetname,status,targetiqn TargetName Status TargetIqn ---------- ------ --------- 192.168.1.207 NotConnected iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.207-target 192.168.1.206 NotConnected iqn.1991-05.com.microsoft:win-v55cvj309el-192.168.1.206-target |