Solution if drive letter shifts occur in a Red Hat cluster environment

3

Drive letters of the mounted raw disk, disk1, disk2, disk3, and disk4<>/b are used as an example. iqn.2010-05.com.forzw is the target name of the storage system's host port. 192.168.10.10 is the IP address of the storage system's host port.

When drive letter drift occurs, perform the following operations:

1. Run vi /etc/rc.local to open the /etc/rc.local file.

2. Press i to enter the editing mode and add the following contents to the beginning of the /etc/rc.local file.
/sbin/iscsiadm -m discovery -t sendtargets -p 192.168.10.10
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk1 -p 192.168.10.10 -l
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk2 -p 192.168.10.10 -l
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk3 -p 192.168.10.10 -l
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk4 -p 192.168.10.10 -l

3. Press Esc, enter :wq, and press Enter to save the file.

4. Run vi /etc/init.d/halt to open the /etc/init.d/halt file.

5. Press i to enter the editing mode and add the following contents to the beginning of the /etc/init.d/halt file.
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk1 -p 192.168.10.10 -u
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk2 -p 192.168.10.10 -u
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk3 -p 192.168.10.10 -u
/sbin/iscsiadm -m node -T iqn.2010-05.com.forzw.disk4 -p 192.168.10.10 -u

6. Press Esc, enter :wq, and press Enter to save the file.

7. Restart the application server.

Other related questions:
Method used to deal with the drive letter shift that occurred when the Linux operating system is installed on the IBM xx server
Add Legacy Only in the startup options to solve the problem. The procedure is as follows: Open the Boot Manager page and select Add Boot Option. Set the Legacy Only to the first startup option. Recreate RAID groups and install the operating system. Note: After the operating system is installed, set Hard Disk 0 to the first startup option.

Installing OS on a server
Use the Huawei Server Compatibility Checker (http://support.huawei.com/onlinetoolsweb/ftca/en) to check the OS supported by the server. For details about the OS installation methods (using ServiceCD, DVD-ROM drive, image, and PXE), see OS Installation Guide. For details about the OS installation cases (including centOS, Citrix, Debian, Fedora, FreeBSD, Kylin, Oracle Linux, RedFlag, RedHat, Rocky, Solaris, SUSE, Ubuntu, VMware ESXi, and Windows), see http://support.huawei.com/huaweiconnect/enterprise/thread-286397.html.

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.

Automatically mounting a file system using by-id in Red Hat
You can automatically mount a file system using by-id in Red Hat as follows: 1. Run the fdisk command to create partition sdb1. An ID is generated in the /dev/disk/by-id directory. If a file system exists, go to step 3 to modify configuration. 2. Create a file system. Run the mkfs -t ext3 /dev/sdb1 command to format sdb1 as ext3 file system. 3. Modify the /etc/fstab file and add the by-id of sdb1 to the file. 4. Restart the system. You can see that sdb1 has been automatically mounted.

Method used to install library files on Red Hat
Method used to install library files on Red Hat: By default, not all library files are installed on Red Hat. Therefore, you need to use the yum software to install all library files. The procedure for installing library files is as follows: 1. Insert the operating system installation CD-ROM into the server's CD-ROM drive. Mount the CD-ROM. In this example, the CD-ROM is mounted to /source/mnt. 2. Edit the yum configuration file on the server. The yum configuration file is saved under /etc/yum.repo.d/, including the following content: [rhel-source] name=Red Hat Enterprise Linux $releasever - $basearch - Source baseurl=file:///source/mnt enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Change the baseur value and the gpgkey value based on the actual situation. Keep the defaults for other settings. 3. Check whether the yum configuration file is correctly configured. Run the yum list available command. If information about the required installation package is displayed, the content of the yum configuration file is correct. 4. Install a library file. For example, to install the ld-linux.so.2 library file, run the yum install ld-linux.so.2 command and proceed as prompted.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top