>>>>> "Bill" == Bill Bogstad <bogs...@pobox.com> writes:
Bill> On Wed, Apr 8, 2015 at 5:45 PM, Michael Tiernan Bill> <michael.tier...@gmail.com> wrote: >> On 4/8/15 11:23 AM, Robert Hajime Lanning wrote: >>>> could you poll for the UUID assigned to the file system on the drives? >>>> blkid i think is the command... >>> I would not trust that. Aside from having to know the UUID up-front, >>> what happens when there is no filesystem. >> Precicely. >>> I believe he wants to error out if the drive in slot 0 is missing or >>> not responding without touching any other drives. >> Exactly. >>> Problem is that this is machine model specific. You have to know the >>> channel path to slot 0. >> This isn't an issue as far as I'm concerned, the environment is pretty >> controlled so I can script that part pretty easily. >> >> It seems that this isn't a common issue so that's fine, i'll keep >> hammering away. >> Just signed up for ServerFault finally so I'll keep pursuing that route. >> >> Thanks for everyon'es time. Bill> This seems related to why modern Linux systems use UUIDs to Bill> identify disks rather then disk/partition names. I seem to Bill> recall the problem was that depending on the hardware, bios, Bill> versions and timing; the system might enumerate the disks in a Bill> different order and therefore assign them different /dev/sdX Bill> names. Not sure if /sys/devices/pci.... will stay consistent Bill> or not. This misses the point. At kickstart time, there is no OS, not disk UUID, etc. He just wants to be able to say "is the disk in slot 0 working, great install on it. Otherwise fail out of kickstart with a message. Now as for how to do this, you will probably need to dig through /sys/devices/pci* or maybe you can use the output of lsscsi to see if you find a disk at the expected host:controller:target:logical tuple and exit if you don't. Scripting in kickstart is a pain to debug though. You'll need to have a box at hand, or a KVM with good support for Alt-F# handling so you can poke around and see the various screens. It's tedious to debug. It might be simpler to just see if there are six disks in the system and crap out if there aren't. A simpler thing to check for. And thinking about it more, I'd probably start with lspci, since it's known hardware to make sure you only check the controller you want, and skip stuf like USB thumb drives, CDROMs, etc that might be in the system. For example, my main home file server has an LSI MPT Fusion SATA controller (which works great!! and is cheap) so I can do something like this: set pci=`lspci |grep MPT | awk '{print $1}'` lsscsi -v |grep $pci and I get a nice output like this: > lspci | grep MPT 02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT ) > lsscsi -v | grep 02:00.0 dir: /sys/bus/scsi/devices/0:0:0:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:1:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:2:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:3:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:4:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:5:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] dir: /sys/bus/scsi/devices/0:0:6:0 [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por] Which might be more scriptable to fit your needs. John _______________________________________________ Discuss mailing list Discuss@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss This list provided by the League of Professional System Administrators http://lopsa.org/