Microsoft のiSCSI Initiatorのコマンドライン・インタフェース iscsicli.exe の使い方
- ディスカバリ対象を追加
> iscsicli AddTargetPortal IPアドレス ポート > iscsicli AddTargetPortal 10.0.7.201 3260
- ターゲット一覧
> iscsicli ListTargets T
- ログイン
> iscsicli LoginTarget iqn.2008-09.com.example:dev.vg00.lv00 T * * * * * * * * * * * * * * * 0 Microsoft iSCSI Initiator version 2.0 Build 3640 LoginTarget to iqn.2008-09.com.example:dev.vg00.lv00 on <no init instance> to <no portal>/0 Session Id is 0xffffffff89f92544-0x400001370000002f Connection Id is 0xffffffff89f92544-0x39 The operation completed successfully.
- セッション一覧
> iscsicli SessionList Microsoft iSCSI Initiator version 2.0 Build 3640 Total of 1 sessions Session Id : ffffffff89f92544-400001370000002f Initiator Node Name : iqn.1991-05.com.microsoft:yoshifumi1975 Target Node Name : (null) Target Name : iqn.2008-09.com.example:dev.vg00.lv00 ISID : 40 00 01 37 00 00 TSID : 27 00 Number Connections : 1 Connections: Connection Id : ffffffff89f92544-39 Initiator Portal : 0.0.0.0/2929 Target Portal : 10.0.7.201/3260 CID : 01 00
- ログアウト
iscsicli LogoutTarget
> iscsicli LogoutTarget 0xffffffff89f92544-0x400001370000001c Microsoft iSCSI Initiator version 2.0 Build 3640 Logout Target 0xffffffff89f92544-0x400001370000002f The operation completed successfully.
- コネクション切断
> iscsicli RemoveConnection <SessionId> <ConnectionId>
- ディスカバリ対象の削除
> iscsicli RemoveTargetPortal <TargetPortalAddress> <TargetPortalSocket>
- ターゲット削除
> iscsicli RemoveTarget <TargetName>