I am trying to automate the creation of a logical disk based on a RAID array and the preparation of a partition table in the% pre kickstart file section. Those. In% pre, I have the lines responsible for creating logical drives with MegaCli (loading MegaCli from outside). It creates a logical disk in RAID 1:
# Clear any existing configuration ./MegaCli64 -CfgClr -aALL # Ensure the drives are in a good state before creating the logical device ./MegaCli64 -PDMakeGood -PhysDrv "[${e[0]}:${s[0]},${e[1]}:${s[1]}]" -Force -a0 # Create a RAID1 logical device from the detected disks ./MegaCli64 -CfgLdAdd -r1 "[${e[0]}:${s[0]},${e[1]}:${s[1]}]" -a0 It works. Next, I try to set a variable using / dev / disk / by-path, so that I can use not the drive name (for example, / dev / sda), but the UUID of the form pci-0000: 01: 00.0-scsi-0: 2: 5 : 0:
datadisk=$(ls -lh /dev/disk/by-path/ | grep 'scsi-0:2:0:0 ' | awk '{print $9}') The problem is that at this moment (% pre) of working out the file there is no result of issuing ls -lh / dev / disk / by-path / | grep 'scsi-0: 2: 0: 0'. I understand that udev has not yet been launched.
Can you somehow combine these two tasks in the% pre kickstart file section? This is required for the most automated and universal OS installation scenario using cobbler via PXE, since servers have different configurations and manufacturers.
blkidprogram. - aleksandr barakin