• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6,7 : How to delete an iSCSI Target on the initiator (iSCSI client)

by admin

Internet Small Computer System Interface (iSCSI) is an IP-based standard for connecting storage devices. iSCSI uses IP networks to encapsulate SCSI commands, allowing data to be transferred over long distances. iSCSI provides shared storage among a number of client systems. Storage devices are attached to servers (targets). Client systems (initiators) access the remote storage devices over IP networks. To the client systems, the storage devices appear to be locally attached. iSCSI uses the existing IP infrastructure and does not require any additional cabling, as is the case with Fibre Channel (FC) storage area networks.

If you no longer need the iSCSI storage from a particular target, you can disable/delete the target on the initiator node. Follow the steps below to log out and delete the target IQN on the initiator node

1. Umount iSCSI device/filesystems

Before deleting the target, make sure the iSCSI devices from that target are not in use. Umount and/or delete the filesystems using the iSCSI devices esported from the target.

2. Logout

First step is to logout of the iSCSI target.

# iscsiadm -m node -T iqn.2007-06.com.test.geeklab:storage.geeklab --portal 192.168.10.12:3260 -u

3. Delete Target’s Record ID

When you discover the targets and log into it, the information is stored in the node database found in /var/lib/iscsi. In order to delete the target, we have to delete the target’s record ID out of /var/lib/iscsi:

# iscsiadm -m node -o delete -T iqn.2007-06.com.test.geeklab:storage.geeklab --portal 192.168.10.12:3260

4. Stop the iSCSI service (optional)

Follow this step only if you have no other target left on the system and do not want to use iSCSI. Stop the iSCSI service and disable it to start at boot using chkconfig or systemctl commands.

For RHEL 6

# service iscsi stop
# chkconfig iscsi off

For RHEL 7

# systemctl stop iscsi
# systemctl disable iscsi

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. test: command not found
  2. Can’t start X11 applications after “su” or “su -” to another user
  3. CentOS / RHEL 5,6 : How to reinstall GRUB loader from rescue mode
  4. dphys-swapfile: command not found
  5. “error: can’t find command ‘ffffffffff…..” GRUB2 error CentOS/RHEL 7
  6. groupadd Command Examples in Linux
  7. md5sum: command not found
  8. How to Map Static IP to your Domain (with GoDaddy example)
  9. Unable To Join Linux Samba Server To Windows Active Directory Domain
  10. Linux OS Service ‘ntpd’

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright