Updated: 28 September 2026 · Applies to: iscsi-initiator-utils 6.2.1 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; open-iscsi on Ubuntu 24.04 and 26.04 and Debian 13
When an iSCSI disk is no longer needed, remove it from the client (the initiator) in the right order: stop using it, log out of the target, and delete the saved target records so the server does not log in again at the next boot. Skipping the first steps can hang the server or damage data.
Steps
- List the active sessions and note the target name (IQN) and portal address:
iscsiadm -m session
Example:tcp: [1] 10.0.0.50:3260,1 iqn.2026-09.com.example:storage.lun1 - Stop using the disk: unmount its file systems, remove them from
/etc/fstab, and if it is part of LVM, move the data off and remove it from the volume group (vgreduce, thenpvremove). If multipath is used, flush the device:multipath -f mpatha. - Log out of the target:
iscsiadm -m node -T iqn.2026-09.com.example:storage.lun1 -p 10.0.0.50:3260 -u
- Delete the node record so it is not used at boot:
iscsiadm -m node -T iqn.2026-09.com.example:storage.lun1 -p 10.0.0.50:3260 -o delete
- If the storage server is gone completely, delete its discovery record as well:
iscsiadm -m discoverydb -t sendtargets -p 10.0.0.50:3260 -o delete
- Check that nothing is left:
iscsiadm -m sessionshould report no active sessions, andiscsiadm -m nodeshould no longer list the target.
Common problems
- Logout fails or hangs: something still uses the disk. Check
lsblk,findmntandpvs, and stop it first. - The target comes back after reboot: the node record still exists (step 4), or a startup setting logs in to every discovered target. Check
node.startupwithiscsiadm -m node -T IQN -p PORTAL. - Boot waits for the missing disk: an fstab line still refers to it. Remove it, or add
nofail,_netdevto iSCSI entries in future.
Official documentation: Configuring an iSCSI initiator (Red Hat) and open-iscsi.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
