-
Mike Hibler authored
Our MBR/superblock/LVM/ZFS smashing code in rc.frisbee relied on dmesg output to determine the local disks to call zapdisk on. However, the RE we used assumed well ordered output like: da0 at mpt0 bus 0 scbus0 target 0 lun 0 da0: <ATA WDC WD5003ABYZ-0 1S03> Fixed Direct Access SPC-3 SCSI device da0: Serial Number WD-WMAYP0DPNFLM da0: 300.000MB/s transfers da0: Command Queueing enabled da0: 476940MB (976773168 512 byte sectors) where we matched that last line. But due to the asynchronous nature of disk initialization, probably due to some soon-to-be-failing disks on the d710s, the last line was delayed and came out mashed-up with the da1 output: da1: <ATA WDC WD5003ABYX-1 1S02> Fixed Direct Access SPC-3 SCSI device da1: Serial Number WD-WMAYP4939538 da1: 300.000MB/s transfersda0: 476940MB (976773168 512 byte sectors) so we didn't see da0 and didn't call zapdisk on it. This led to some LVM metadata on /dev/sda4 leaking through to a new experiment and if that experiment tried to setup LVM (e.g., a vnode host), it would blow up. Now we use a sysctl call (kern.disks) to get the disk names.
4925a276