... h2. How to Remove Discovered iSCSI Targets
The associated targets are logged out after you perform any of the following actions: * Remove a discovery address * Remove an iSNS server * Remove a static configuration * Disable a discovery method
If these associated targets are still in use (for example, if they have mounted file systems) the logout of these devices will fail and they will remain on the active target list.
This optional procedure assumes that you are logged in to the local system where access to an iSCSI target device has already been configured.
# Become superuser. # (Optional) Disable an iSCSI target discovery method. #* To disable the SendTargets discovery method: {code} initiator# iscsiadm modify discovery --sendtargets disable {code} #* To disable the iSNS discovery method: {code} initiator# iscsiadm modify discovery --iSNS disable {code} #* To disable the static target discovery method: {code:none} initiator# iscsiadm modify discovery --static disable {code} # Remove an iSCSI device discovery entry. #* To remove an iSCSI SendTargets discovery entry: {code} initiator# iscsiadm remove discovery-address 10.0.1.3260 {code} #* To remove an iSCSI iSNS discovery entry: {code} initiator# iscsiadm remove isns-server 10.0.0.1.3205 {code} #* To remove a static iSCSI discovery entry: {code:none} initiator# iscsiadm remove static-config eui.5000ABCD78945E2B,10.0.0.1 {code} {note:title=Note}If you attempt to disable or remove a discovery entry that has an associated logical unit in use, the disable or remove operation fails with the following message: {{logical unit in use}}. If this error occurs, stop all associated I/O on the logical unit, unmount the file systems, and so on. Repeat the disable or remove operation. {note} # Remove the iSCSI target device. Remove a target by specifying the target IQN. {code} target# itadm delete-target <target IQN> {code}
h2. Where to Go Next
* [How to Monitor an iSCSI Configuration] |