删除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.