Hello there!
1. What is the drive letter drift?
In a Linux system, if there are multiple hard disks, the order in which the kernel assigns drive letters is usually /dev/sda, /dev/sdb, /dev/sdc. During the system boot process, the kernel installs the drive letter assigned to the hard disk. After the system is booted, the hard disk is hot swapped and the drive letter is assigned sequentially.
In the same disk slot, the drive letter in the system may be inconsistent each time the hard disk is inserted. For example, the first time you insert, the drive letter may be /dev/sdb; pull the hard drive out, insert it into the hard disk again and the drive letter may become /dev/sde, while the drive letter drifts.
If the system is connected to the array, the result of each LUN sweep may be inconsistent and the drive letter may drift due to the sequence reported by the LUN.
If the system is connected to the array, when the system is booted, the local disk and the array disk may be changed due to the drive loading sequence (for example, when the array has no LUN mapping, the local disk drive letter is /dev/sda; when the array has When LUN mapping, the local drive letter is generated after the array LUN and the drive letter drift occurs).
2. What are the effects of drive letter drift?
a) If it is a system disk, the drift will cause the system to fail to start.
b) If the service disk is operating on the drive letter, the drive letter will drift, which will cause business problems.
3. What are the ways to solve the problem caused by drive letter drift?
a) If the system disk drifts, the system fails to start or the service disk drifts, causing the service to fail. You can use the UUID binding mode to avoid the impact of the drive letter drift. E.g.:
Add the configuration entries to the /boot/grub/menu.lst or /etc/fstab file and use the UUID to mount the partitioned file system. E.g.:
Root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
or
UUID=894d76a6-b175-4eb1-89e5-3fd8d146eab7 /archive ext3 defaults 0 0
(ls –l /dev/disk/by-* - you can query the system device binding information).
b) You can use udev as a device alias to establish a symbolic link to avoid the impact of drive letter drift on the application.