Red Hat Bugzilla – Bug 291991
RFE: use hardware-centric identifiers to specific storage devices in anaconda
Last modified: 2010-11-11 09:30:48 EST
So, this would entail (at a minimum) copying all the symlink-making udev infrastructure to the install environment, and basing the partitioning code off of that. (Which wouldn't be useful for a large class of users.)
If I'm reading things correctly, this feature request may be related to, or be
useful as an input to
*** Bug 455799 has been marked as a duplicate of this bug. ***
So since we haven't heard back on whether the mockups at
meet your needs, I'm acking this on the assumption that they are, or are at least a step in your desired direction. If you have comments we'd love to hear them. We're expecting this UI to show up for Beta 1.
I have introduced a new feature to RHEL6 that ought to help with this, at least as far as kickstart installs are concerned. With the storage rewrite, it has become much easier to refer to drives in more complex ways so I have exposed some of this in kickstart.
With the old clearpart, ignoredisk, and part commands you would have to know that a disk was "sda" or whatever in order to refer to it. That's both an unstable name and doesn't convey any information about where the actual disk is. With my modification, you can now refer to the disk as /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:0. I admit this is not really the most user-friendly syntax ever invented, but it is made available to us by the system and does refer to where the disk is located.
To make it a little easier, I have also introduced globbing for the clearpart and ignoredisk commands. So, you could do ignoredisk --only-use=/dev/disk/by-path/pci-0000:00:05.0-* and grab all the disks attached to that controller. That should help narrow down your set of target disks, at least provided you are able to figure out how those paths should look.
Tested with anaconda-13.21.50-9.el6 with 3 disks:
pci-0000:00:01.1-scsi-0:0:0:0 -> ../../sda - IDE disk
pci-0000:00:01.1-scsi-0:0:1:0 -> ../../sdb - IDE disk
pci-0000:00:06.0-scsi-0:0:0:0 -> ../../sdc - SCSI disk
# sda, sdb
clearpart --initlabel --drives=/dev/disk/by-path/pci-0000:00:01.1*
Result: Inspecting the system post install showed that disk names changed but the paths were the same. Partitioning on sdc (later sda) (the SCSI disk) was preserved and was not part of the LVM volume group.
This test also shows that globbing for the clearpart and ignoredisk commands works as expected.
clearpart --initlabel --all
part /boot --fstype=ext4 --size=500 --ondisk=/dev/disk/by-path/pci-0000:00:01.1-scsi-0:0:0:0
part pv.01 --size=1 --grow --ondisk=/dev/disk/by-path/pci-0000:00:01.1-scsi-0:0:0:0
part pv.02 --size=1 --grow --ondisk=/dev/disk/by-path/pci-0000:00:01.1-scsi-0:0:1:0
part /data --fstype=vfat --size=500 --grow --ondisk=/dev/disk/by-path/pci-0000:00:06.0-scsi-0:0:0:0
volgroup vg_root --pesize=4096 pv.01 pv.02
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_root --grow --size=1008 --maxsize=2016
Here all partitions specify the disk by full path. After installation was complete the partitioning matched what was requested.
Moving to VERIFIED.
Verified on RHEL6.0-20100622.1 x86_64 Server
clearpart --drives=/dev/disk/by-path/pci-0000:06:00.0 --initlabel
part /boot --fstype=ext4 --size=100 --asprimary --ondrive=/dev/disk/by-path/pci-0000:06:00.0
part / --fstype=ext4 --size=1 --grow --asprimary --ondrive=/dev/disk/by-path/pci-0000:06:00.0
part swap --recommended --ondrive=/dev/disk/by-path/pci-0000:06:00.0
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.