刪除iSCSI target
更新時間 2025-09-29 17:49:30
最近更新時間: 2025-09-29 17:49:30
分享文章
本節主要介紹刪除iSCSI target。
./stor target rm { -n | --name } TARGET_NAME [ { -c | --connection } ISCSI_INITIATOR_NAME ] [ { -i | --target-ip } TARGET_IP ]
此命令用來刪除指定iSCSI target或斷開指定iSCSI target連接。
注意
只有未關聯任何卷的iSCSI target才能被刪除。
參數
| 參數 | 描述 |
|---|---|
| -n TARGET_NAME 或 --name TARGET_NAME | iSCSI target名稱。 |
| -c ISCSI_INITIATOR_NAME 或 --connection ISCSI_INITIATOR_NAME | 要刪除連接所屬的intiator名稱。 字符串形式,取值:
|
| -i TARGET_IP 或 --target-ip TARGET_IP | 刪除指定target IP的intiator連接。 |
示例
示例1
刪除名為targettest的target。
[root@hblockserver CTYUN_HBlock_Plus_3.10.0_x64]# ./stor target rm -n targettest
Removed target targettest successfully.示例2
刪除target的intiator連接。并需要在客戶端斷開與iSCSI target的連接,詳見客戶端操作。
[root@hblockserver CTYUN_HBlock_Plus_3.10.0_x64]# ./stor target rm -n target01 -c iqn.1994-05.com.redhat:265a95d81ae
Removed the connection 'iqn.1994-05.com.redhat:265a95d81ae' with target target01 successfully.