Symptom
After the link between the host and the storage system recovers from a long-time breakdown, the previously mounted drive letters are no longer available. The output of lsscsi shows that the drive letters change to new ones.
Root Cause
During the link recovery, the host deletes the original drive letters and generates new drive letters for the identified LUNs under the DEV directory. However, an error occurs and the original drive letters are not deleted. As a result, new drive letters are generated for the identified LUNs following the original drive letters. Therefore, drive letters shift backwards.
Solution
This problem can be resolved by mounting disks by UUID. Perform the following steps:
Run the fdisk -l command to discover all disks.
Partition and format the detected disks and create file systems for them.
Run the following command to query the UUIDs of disks that you want to mount:
SMCDB-1:/# blkid /dev/sdb1: UUID="894d76a6-b175-4eb1-89e5-3fd8d146eab7" SEC_TYPE="xfs" TYPE="ext2"/dev/sdc1: UUID="ef285a94-2f34-4025-baa6-d35d8fbd0a86" SEC_TYPE="xfs" TYPE="ext2"
Set files on disk partitions to be automatically mounted after the system restarts.
Modify the /etc/fstab file and add the following information to the end of this file (this example mounts file systems sdb1 and sdc1 to directories fs1 and fs2 respectively):
UUID=894d76a6-b175-4eb1-89e5-3fd8d146eab7 /fs1 ext3 defaults 0 0UUID=ef285a94-2f34-4025-baa6-d35d8fbd0a86 /fs2 ext3 defaults 0 0
Run the following command to mount the file system:
SMCDB-1:/# mount -a
Modify the system startup file to ensure the system mounts the file system after a restart as described in the /etc/fstab file.
SMCDB-1:/# vi /etc/rc.d/rc ####Add /bin/ mount –a to the end of the file.
The /bin/mount -a command must be added in front of exit0.
After removing cables, unmount the directories and mount the disks.