RHEL 6 system startup drive letter Drift Problem Solution

Source: Internet
Author: User

This article describes how to solve the drive letter Drift Problem When RHEL 6 is started. If you want to solve this problem, refer to this article.

After installing a new SCSI device in RHEL 6, the drive letter may drift. For example, if the drive letter of the original system disk is/dev/sda, add the new device and restart the system, the drive letter is changed to the last one, for example,/dev/ssda.

Causes of drive letter drift

In the Linux kernel, the distribution of SCSI hard drive letters is related to the hard drive sequence scanned by the driver, that is, the first scanned hard drive letter is/dev/sda, the second drive letter is/dev/sdb... And so on.

Generally, the hard drive scan sequence is related to the loading sequence of different types of SAS/RAID Controller drivers. If you first load the megaraid_sas driver, the hard disk under the RAID Controller will first be assigned a drive letter, that is, the hard disk corresponding to/dev/sda is under the RAID Controller. If the FC driver is loaded first, the hard disk under the FC will first get the drive letter, and the/dev/sda will be the hard disk under the FC controller.

In RHEL 6, after a new device is added, the drive loading sequence of the SAS/RAID Controller changes because of drive letter drift. The order of loading is determined by the udev mechanism configuration file.

Drive letter drift Solution

In the intramfs kernel Startup File, we can see the startup script 01parse-kernel.sh in the cmdline/directory. Run the script before loading the driver through the udev mechanism. In this script, you can see the parsing Kernel Parameter rdloaddriver, that is, the kernel first loads the rdloaddriver In the parameter.

The Code is as follows: Copy code

[Root @ RH2285 cmdline] # ls

01parse-kernel.sh 10parse-resume.sh 20parse-blacklist.sh 30parse-crypt.sh 30parse-lvm.sh

01version. sh 10parse-root-opts.sh 20parse-i18n.sh 30parse-dmsquash-live.sh 95parse-block.sh

[Root @ RH2285 using line] #

[Root @ RH2285 cmdline] # cat 01parse-kernel.sh

#! /Bin/sh

 

For p in $ (getargs rdloaddriver =); do

Modprobe $ p

Done

 

On the machine where the drive letter is drifting, execute the driver loading sequence. For example, first load the megaraid_sas driver and then the qla4xxx driver.

The Code is as follows: Copy code

Title Red Hat Enterprise Linux Server (2.6.32-220. el6.x86 _ 64)

Root (hd0, 2)

Kernel/boot/vmlinuz-2.6.32-220.el6.x86_64 ro rdloaddriver = megaraid_sasrdloaddriver = qla4xxx root = UUID = d44cb995-39d0-4882-a25b-43803b3b9d4b

Initrd/boot/initramfs-2.6.32-220.el6.x86_64.img

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.