Method used to configure the iSCSI initiator in Red Hat 5

You can configure the iSCSI initiator in Red Hat 5 as follows:
Perform basic iSCSI configurations as follows:
1. Run the /etc/init.d/iscsi start command to start the iSCSI service.
2. Modify the configuration file /etc/iscsi/iscsid.conf. Specifically, set node.startup to automatic to enable automatic logins to the target.
3. Run the iscsiadm -m discovery -t st -p [targetip] command to discover the target.
4. Add ports detected on the storage array to corresponding hosts and map these ports to LUNs.
5. Run the iscsiadm -m node -p [targetip] -l command to register the target.
6. Run the chkconfig iscsi on command to automatically start the iSCSI service upon system startup.
7. Run the fdisk -l command to scan for the LUNs mapped to the host.
Note:
(1) You can perform an operation opposite to step 5 by running the iscsiadm -m node -p [targetip] -u command to deregister the target from the system.
(2) Step 2 and step 6 aim to automatically restart the iSCSI service upon system startup. You can run the fdisk -l to automatically detect LUNs mapped to the host (including command devices).
Configure CHAP as follows:
1. Run the following three commands in sequence to add the CHAP authentication to a target:
iscsiadm -m node -o update -p [targetip] -n node.session.auth.authmethod -v CHAP
iscsiadm -m node -o update -p [targetip] -n node.session.auth.username -v [chap user name]
iscsiadm -m node -o update -p [targetip] -n node.session.auth.password -v [Chap auth passwd]
2. Configure the same user name and password for the target on the storage side by referring to the array operation guide.
3. Run the /etc/init.d/iscsi restart command to restart the iSCSI service.
4. If CHAP authentication for multiple targets is required, repeat the preceding steps.

Scroll to top