Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
iSCSI Target Deletion Failure Due to Active Sessions
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
When attempting to delete an iSCSI target in an OpenStack environment, the operation fails with the following error message:
Terminal
xxxxxxxxxx# tgt-admin --delete <target_iqn> -f tgtadm: this target is still activeThis issue occurs because the iSCSI target is still active, preventing its removal. The target may be in use by active sessions, stale connections, or underlying kernel locks.
Environment
- Platform9 Managed OpenStack - v4.0 and Higher
Cause
The failure to delete the iSCSI target is commonly due to:
- Active iSCSI sessions: The target is still being accessed by connected clients.
- Lingering iSCSI sessions: Previously established connections were not properly closed.
- Kernel locks on the volume: The logical volume is still being referenced.
- TGT service state: The iSCSI target daemon (
tgtd) has stale sessions preventing cleanup.
Resolution
Step 1: Identify Active iSCSI Sessions
Run the following command on the Cinder node to list active iSCSI sessions:
Terminal
xxxxxxxxxx# tgtadm --mode target --op showLook for session related to <target_iqn>
Check for the Active ISCSI sessions connected to the target:
Terminal
xxxxxxxxxx# tgtadm --mode connection --op show --tid=<target-id>Step 2: Delete the Active iSCSI Sessions
If there are active connections, then terminate forcefully the active sessions for the target to allow its removal:
Terminal
xxxxxxxxxx# tgtadm --mode connection --op delete --tid=<target-id> --sid=<session-id> --forceStep 3: Restart the TGT Service
Restarting the tgt service helps clear stale sessions:
Terminal
xxxxxxxxxx# systemctl restart tgtVariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Next to read:
Viewing Per-Tenant Block Storage Usage in OpenStackDiscard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message