Thank you for your answer.
change adapter sequence on /etc/modprobe.conf and rebuild image always my first try.
Unfortunately it does NOT work on DELL R900. The reason is DELL R900 internal RAID and external RAID use same driver. There is NO way to change adapter sequence on /etc/modprobe.conf.
--- 09/7/1 (三),Ross Walker rswwalker@gmail.com 寫道:
寄件者: Ross Walker rswwalker@gmail.com 主旨: Re: [CentOS] How to change Disk sequence on DELL R900 CENTOS 5.3? 收件者: "CentOS mailing list" centos@centos.org 日期: 2009年7月1日,三,上午11:59 2009/7/1 mcclnx mcc mcclnx@yahoo.com.tw:
Thank you for answer.
I change /etc/fstab and using UUID instead of LABEL.
蟵fter reboot, UUID did NOT change disk sequence back to what I want. 泎oot device original /dev/sda1, it still /dev/sdc1 NO change.
Modify modprobe.conf to list the disk driver you want loaded in the order you want then re-make the initrd file:
For example, say you want your internal SATA disks recognized before your SAS RAID disks, your modprobe for the scsi_hostadapter would look something like this:
alias scsi_hostadapter ata_piix (or ahci, sata_XXX whatever your SATA controller is) alias scsi_hostadapter0 megaraid_sas
Then you remake your initrd with a command:
mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
Remember to use LABELs or UUIDs in fstab first or your partitions won't mount (wrong disk names)!
Then reboot.
-Ross _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
______________________________________________________________________________________________________ 付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing
Unfortunately it does NOT work on DELL R900. The reason is DELL R900 internal RAID and external RAID use same driver. There is NO way to change adapter sequence on /etc/modprobe.conf.
Well, I suspect a udev rule *might* work to rename the discs, but labels or uuid's aren’t designed to *change* the name (who cares?), they are designed to cause mount to "mount" the expected disc :) It makes much more sense to focus on that than to maintain aesthetics which again can be changed in the future so the solution is not failsafe.
To each his own I guess!
jlc
--- 09/7/1 (三),Ross Walker rswwalker@gmail.com 寫道:
寄件者: Ross Walker rswwalker@gmail.com 主旨: Re: [CentOS] How to change Disk sequence on DELL R900 CENTOS 5.3? 收件者: "CentOS mailing list" centos@centos.org 日期: 2009年7月1日,三,上午11:59 2009/7/1 mcclnx mcc mcclnx@yahoo.com.tw:
Thank you for answer.
I change /etc/fstab and using UUID instead of LABEL.
蟵fter reboot, UUID did NOT change disk sequence back to what I want. 泎oot device original /dev/sda1, it still /dev/sdc1 NO change.
Modify modprobe.conf to list the disk driver you want loaded in the order you want then re-make the initrd file:
For example, say you want your internal SATA disks recognized before your SAS RAID disks, your modprobe for the scsi_hostadapter would look something like this:
alias scsi_hostadapter ata_piix (or ahci, sata_XXX whatever your SATA controller is) alias scsi_hostadapter0 megaraid_sas
Then you remake your initrd with a command:
mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r)
Remember to use LABELs or UUIDs in fstab first or your partitions won't mount (wrong disk names)!
Then reboot.
-Ross _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
______________________________________________________________________________________________________ 付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
At Thu, 2 Jul 2009 02:39:02 +0800 (CST) CentOS mailing list centos@centos.org wrote:
Thank you for your answer.
change adapter sequence on /etc/modprobe.conf and rebuild image always my first try.
Unfortunately it does NOT work on DELL R900. The reason is DELL R900 internal RAID and external RAID use same driver. There is NO way to change adapter sequence on /etc/modprobe.conf.
Is there some *specific* reason you want the device names in /dev to match some sequence? For mounting to work, you can just use UUIDs or LABELs in /etc/fstab. This also works for swap partitions (mkswap has a -L option).
The only other reason would be getting the BIOS to boot the correct disk (and this would be handled by BIOS settings). I am not sure what grub needs exactly (I use lilo myself).
Otherwise, why *exactly* does it matter if a certain disk's device file is named /dev/sda1 or /dev/sdc1?
If you are not hung up on the device name changing, i.e. the device must ALWAYS be /dev/sda1 or /dev/hda1, you can use LABEL=? or UUID=? in /etc/fstab, or use LVM to create logical volumes that do not depend on the actual device name.
By default, a fresh install will label the filesystem for /boot as "/boot" and put the following line in /etc/fstab:
LABEL=/boot /boot ext3 defaults 1 2
This works just fine, but if you would prefer something that does not depend on labels you can determine the UUID of the device using vol_id and put that in /etc/fstab. For example, on my system the boot device happens to be /dev/sda3 for the moment. I can determine the UUID of that device file as follows:
[root@b82526 ~]# /lib/udev/vol_id /dev/sda3 ID_FS_USAGE=filesystem ID_FS_TYPE=ext3 ID_FS_VERSION=1.0 ID_FS_UUID=93ffbfba-d42b-48fb-aaf3-90e563b12dc0 ID_FS_LABEL=/boot ID_FS_LABEL_SAFE=boot [root@b82526 ~]#
Using that information, I can use the ID_FS_LABEL value in fstab using LABEL=, like the installer does, or I can use the ID_FS_UUID value in a UUID= line. For example:
UUID=93ffbfba-d42b-48fb-aaf3-90e563b12dc0 /boot ext3 defaults 1 2
If it's not the /boot filesystem you are dealing with you can also use LVM. I believe there are several good references on using LVM available, including the Red hat-provided docs, that explain the procedures better than I can.
Hope that gives you a starting-point!