Editing
Removing a persistent iSCSI connection
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Kill the iSCSI session == First, find the session you're trying to delete: sudo iscsiadm -m session The key information is also available from the iSCSI server itself (using the equallogic cluster as an example): sudo iscsiadm -m discovery -t st -p 10.2.0.201 The iqn number is the key from the command output. To disconnect the session: sudo iscsiadm -m node -T <iqn> -p 10.2.0.201 -u This is only the first skirmish of the battle, however, as the iscsi subsystem is rather persistent about keeping its connections alive and restoring them after a reboot. To prevent the session from re-establishing, you may wish to remove the node: sudo iscsiadm -m node -o delete -T <iqn> Once this is complete, make sure the session is no longer listed: sudo iscsiadm -m session If required (it is extreme, but may be necessary), you can also delete the targets from the ISCSI discovery database entirely. sudo iscsiadm -m discoverydb -t sendtargets -p 10.2.0.201 -o delete Finally, clean out the state information to ensure Linux does not try to re-establish the connection on future boot operations. ls /var/lib/iscsi/nodes/<iqn> If the <iqn> exists, delete it: sudo rm -rf /var/lib/iscsi/nodes/<iqn> ---- Excerpted and adapted from https://support.unitrends.com/hc/en-us/articles/360013269518-Remove-ISCSI-sessions-using-the-Linux-command-line
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information