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

The Geek Diary

CONCEPTS | BASICS | HOWTO

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

How to modify the iSCSI initiator ID in Linux

By admin

Question

In our environment, we have duplicate initiator id in /etc/iscsi/initiatorname.iscsi due to multiple iSCSI implementations. How can we Create Different ISCSI Initiator ID for the hosts?

Solution

Sometimes, when systems are mass deployed using the same Linux image, you may have duplicate initiator IDs in all the systems. The initiator ID for the system is mentioned in the file /etc/iscsi/initiatorname.iscsi file. In order to modify or create a new iSCSI initiator ID, follow the steps given below.

1. Move the existing /etc/iscsi/initiatorname.iscsi to other temporary directory (or back it up somewhere).

# mv /etc/iscsi/initiatorname.iscsi /var/tmp/initiatorname.iscsi.backup

2. Run following on the command line.

# echo "InitiatorName=`/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi

The command ‘/sbin/iscsi-iname‘ generates a new iSCSI initiator ID, which in turn is overwritten in the file /etc/iscsi/initiatorname.iscsi.

Note: you can run above command line multiple times to create different id.

3. Make sure you make corresponding changes in the iSCSI target ACLs to accommodate the new iSCSI initiator ID and allow access using the new initiator ID. This step is required only if you have any existing iSCSI targets and target ACLS configured using the old iSCSI initiator ID.

How to configure iSCSI Initiator (client) in CentOS / RHEL 6
How to configure iSCSI target using targetcli in CentOS / RHEL 7
How to configure iSCSI Initiator (client) in CentOS / RHEL 7
Understanding iscsiadm Utility in CentOS / RHEL

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

Some more articles you might also be interested in …

  1. How to configure xhost to be persistent across reboots in Linux
  2. CentOS / RHEL : How to adjust the telnet timeout (and how to disable it)
  3. Understanding the dm-multipath Configuration file /etc/multipath.conf
  4. How to merge 2 volume groups (VGs) into one using vgmerge in LVM
  5. Slow SSH login due to unreachable rsyslog server
  6. Linux OS Service ‘network’
  7. Understanding /etc/xinetd.conf file in Linux
  8. CentOS / RHEL 6 : How to rebuild Initial Ramdisk Image
  9. How to use shell aliases in Linux
  10. How to view linux disk partitions (partition table)

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary