Add iSCSI adapter via CLI on ESXi its-self?
Interesting that ESXi has esxcfg-nas, which can establish a NFS based datastore from scratch. Using esxcfg-nas, and TGZ...
新年早々、ESXi環境が破損したので、修復を試みた際に調べたことをメモしておきます。
手順
1.iSCSI ソフトウェアアダプターの有効化
# esxcli iscsi software set --enabled true
Software iSCSI Enabled
2. iSCSIアダプターの一覧表示
# esxcli iscsi adapter list
Adapter Driver State UID Description
------- --------- ------ ------------- ----------------------
vmhba35 iscsi_vmk online iscsi.vmhba35 iSCSI Software Adapter
3. iSCSIソフトウェアアダプターの状態確認
# esxcli iscsi software get
true
4. iSCSIターゲットの追加
# esxcli iscsi adapter discovery sendtarget add --address=<ip or server name> --adapter vmhba37
5. ストレージデバイスならびにVMFSボリュームのスキャン
# esxcli storage core adapter rescan --adapter vmhba37
6. iSCSIセッションの一覧表示
# esxcli iscsi session list
vmhba35,iqn.1986-03.com.sun:02:6ef7ef0d-07ef-c0e8-e9e1-a4149b70362c,00023d000001
Adapter: vmhba35
Target: iqn.1986-03.com.sun:02:6ef7ef0d-07ef-c0e8-e9e1-a4149b70362c
ISID: 00023d000001
TargetPortalGroupTag: 1
AuthenticationMethod: none
DataPduInOrder: true
DataSequenceInOrder: true
DefaultTime2Retain: 0
DefaultTime2Wait: 2
ErrorRecoveryLevel: 0
FirstBurstLength: 65536
ImmediateData: true
InitialR2T: true
MaxBurstLength: 262144
MaxConnections: 1
MaxOutstandingR2T: 1
TSIH: 28
参照先URLには他にもコマンドで色々とパラメータを得る方法が記載されているので、気になる方は覗いてみてはいかがでしょうか?