On kickstart how to force a given disk to a defined name during install to control OS to disk partition installation when two distinct device controllers that use the same device driver are present with active backing devices?

Solution In Progress - Updated -

Issue

The question is about udev rules for disks. We have a megaraid sas controller in a cisco ucs C240M4. We are creating the disks on the controller as 2 disks into a volume, and then the rest as jbod, pass through so that Hadoop can do the caching, and raiding of the disks.

We want to install the OS on the volume.

[root@lonlxp00001 rules.d]# lsscsi
[0:0:8:0]    enclosu Cisco    UCS-C240-M4      0222  -
[0:0:9:0]    disk    SEAGATE  ST300MM0006      0003  /dev/sda
[0:0:10:0]   disk    SEAGATE  ST300MM0006      0003  /dev/sdb
[0:2:0:0]    disk    Cisco    UCSC-MRAID12G    4.25  /dev/sdc

The ones marked SEAGATE are the jbods, this host adapter has 4 disks attached. But we want it to be /dev/sda, consistently. Because the megaraid presents the jbods first its not being chosen as sda, but I cant just put sdc in the kickstart.cfg as systems will come with a different number of disks and I cant be sure what disk will be the volume. Instead ive been trying to create a udev rule that identifies the disk, something like.

KERNEL="sd*", BUS="scsi", PROGRAM="udevadm info  -q all -n /dev/%k|grep ID_MODEL=UCSC-MRAID12G", RESULT="ENV{ID_MODEL}=UCSC-MRAID12G", NAME=sda

I've tried various variations on a theme, even using one that hardcodes the disks scsi_id output, but still it doesn't work. Ideally I want an answer like above that just looks for a match to any of the parameters from:

[root@node1 rules.d]# udevadm info  -q all -n /dev/sdc
P: /devices/pci0000:00/0000:00:02.2/0000:0c:00.0/host0/target0:2:0/0:2:0:0/block/sdc
N: sdc
W: 113
S: block/8:32
S: sda
S: disk/by-id/scsi-3600000000000000000aaaaaaaaaaaaaa
S: disk/by-path/pci-0000:0c:00.0-scsi-0:2:0:0
S: disk/by-id/wwn-0x600000000000000000aaaaaaaaaaaaaa
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:02.2/0000:0c:00.0/host0/target0:2:0/0:2:0:0/block/sdc
E: MAJOR=8
E: MINOR=32
E: DEVNAME=/dev/sdc
E: DEVTYPE=disk
E: SUBSYSTEM=block
E: MPATH_SBIN_PATH=/sbin
E: ID_SCSI=1
E: ID_VENDOR=Cisco
E: ID_VENDOR_ENC=Cisco\x20\x20\x20
E: ID_MODEL=UCSC-MRAID12G
E: ID_MODEL_ENC=UCSC-MRAID12G\x20\x20\x20
E: ID_REVISION=4.25
E: ID_TYPE=disk
E: ID_SERIAL_RAW=3600000000000000000aaaaaaaaaaaaaa
E: ID_SERIAL=3600000000000000000aaaaaaaaaaaaaa
E: ID_SERIAL_SHORT=600000000000000000aaaaaaaaaaaaaa
E: ID_WWN=600000000000000000
E: ID_WWN_VENDOR_EXTENSION=aaaaaaaaaaaaaa
E: ID_WWN_WITH_EXTENSION=0x600000000000000000aaaaaaaaaaaaaa
E: ID_SCSI_SERIAL=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
E: ID_BUS=scsi
E: ID_PATH=pci-0000:0c:00.0-scsi-0:2:0:0
E: ID_PART_TABLE_TYPE=dos
E: LVM_SBIN_PATH=/sbin
E: DEVLINKS=/dev/block/8:32 /dev/sda /dev/disk/by-id/scsi-3600000000000000000aaaaaaaaaaaaaa /dev/disk/by-path/pci-0000:0c:00.0-scsi-0:2:0:0 /dev/disk/by-id/wwn-0x600000000000000000aaaaaaaaaaaaaa

And therefore matches something that represents the volume, but is not specific that it wont work across all hosts.

So not picking out things like ID_SERIAL_RAW=3600000000000000000aaaaaaaaaaaaaa as that’s too specific , but sticking to things like ID_MODEL=UCSC-MRAID12G ID_VENDOR=Cisco ID_TYPE=disk would be a perfect solution.

Could you get one of you udev experts to have a look at this and suggest something that works, only need Red Hat Enterprise Linux 6.5 for now.

Environment

Red Hat Enterprise Linux 6.5
UCS

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content