/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma dictionary "DISK" #define P disk fru P; asru P; /* * disk-as-detector: The disk-as-detector DE provides the mapping between * ereports generated by a kernel disk driver sd(7D) and resulting faults. */ /* * disk-as-detector: fault events. */ event fault.io.scsi.cmd.disk.dev.rqs.derr@P; event fault.io.scsi.cmd.disk.dev.rqs.merr@P; /* * The uderr fault will be defined at some future time. * event fault.io.scsi.cmd.disk.dev.uderr@P; */ /* * disk-as-detector: upset events. * NOTE: For now we define an upset to implement discard. */ event upset.io.scsi.cmd.disk.dev.rqs.derr@P; event upset.io.scsi.cmd.disk.dev.rqs.merr@P; event upset.io.scsi.cmd.disk.dev.uderr@P; event upset.io.scsi.cmd.disk.dev.serr@P; event upset.io.scsi.cmd.disk.tran@P; event upset.io.scsi.cmd.disk.recovered@P; /* * disk-as-detector: ereports from the kernel. * * We don't know the topology for all scsi disks, but the kernel will always * generate ereport telemetry assuming that we do. We define these ereports * with 'discard_if_config_unknown=1', which permits ereports against things * with unknown topology to be silently discarded. The ereport data is logged * in either case, and can be viewed via 'fmdump -eV'. */ event ereport.io.scsi.cmd.disk.dev.rqs.derr@P, discard_if_config_unknown=1; event ereport.io.scsi.cmd.disk.dev.rqs.merr@P, discard_if_config_unknown=1; event ereport.io.scsi.cmd.disk.dev.serr@P, discard_if_config_unknown=1; event ereport.io.scsi.cmd.disk.dev.uderr@P, discard_if_config_unknown=1; event ereport.io.scsi.cmd.disk.recovered@P, discard_if_config_unknown=1; event ereport.io.scsi.cmd.disk.tran@P, discard_if_config_unknown=1; /* * For some ereports we let the 'driver-assessment', communicated as part of * the ereport payload, determine fault .vs. upset via propagation constraints. */ #define DRIVER_ASSESSMENT_FATAL \ (payloadprop_contains("driver-assessment", "fatal")) #define DRIVER_ASSESSMENT_NONFATAL (!DRIVER_ASSESSMENT_FATAL) /* * disk-as-detector: propagations from faults(based on * DRIVER_ASSESSMENT_FATAL). * We need to set additional fault payloads to indicate fault details. * The payload we may need are listed as following: * fault.io.scsi.cmd.disk.dev.rqs.derr * op_code, key, asc, ascq * fault.io.scsi.cmd.disk.dev.rqs.merr * op_code, key, asc, ascq, lba */ prop fault.io.scsi.cmd.disk.dev.rqs.derr@P-> ereport.io.scsi.cmd.disk.dev.rqs.derr@P{ DRIVER_ASSESSMENT_FATAL && setpayloadprop("key", payloadprop("key")) && setpayloadprop("asc", payloadprop("asc")) && setpayloadprop("ascq", payloadprop("ascq"))}; prop fault.io.scsi.cmd.disk.dev.rqs.merr@P-> ereport.io.scsi.cmd.disk.dev.rqs.merr@P{ DRIVER_ASSESSMENT_FATAL && setpayloadprop("key", payloadprop("key")) && setpayloadprop("asc", payloadprop("asc")) && setpayloadprop("ascq", payloadprop("ascq")) && setpayloadprop("lba", payloadprop("lba"))}; /* * The uderr fault will be propagated at some future time. * prop fault.io.scsi.cmd.disk.dev.uderr@P-> * ereport.io.scsi.cmd.disk.dev.uderr@P{ DRIVER_ASSESSMENT_FATAL }; */ /* * disk-as-detector: propagations from upsets(based on * DRIVER_ASSESSMENT_NONFATAL). */ prop upset.io.scsi.cmd.disk.dev.rqs.derr@P-> ereport.io.scsi.cmd.disk.dev.rqs.derr@P{ DRIVER_ASSESSMENT_NONFATAL }; prop upset.io.scsi.cmd.disk.dev.rqs.merr@P-> ereport.io.scsi.cmd.disk.dev.rqs.merr@P{ DRIVER_ASSESSMENT_NONFATAL }; /* * disk-as-detector: propagations from upsets(independent of * driver-assessment) */ prop upset.io.scsi.cmd.disk.dev.serr@P-> ereport.io.scsi.cmd.disk.dev.serr@P; prop upset.io.scsi.cmd.disk.dev.uderr@P-> ereport.io.scsi.cmd.disk.dev.uderr@P; prop upset.io.scsi.cmd.disk.recovered@P-> ereport.io.scsi.cmd.disk.recovered@P; prop upset.io.scsi.cmd.disk.tran@P-> ereport.io.scsi.cmd.disk.tran@P; /* * -------------------------------------- * The remainder of this file contains rules associated with the operation of * cmd/fm/modules/common/disk-monitor/disk_monitor.c code. * * The disk DE provides a very simple 1-to-1 mapping between SCSI disk events * generated by the disk-transport fmd module, and the resulting faults. */ /* * Fault events. */ event fault.io.disk.over-temperature@P, FITrate=10, FRU=P, ASRU=P; event fault.io.disk.predictive-failure@P, FITrate=10, FITrate=10, FRU=P, ASRU=P; event fault.io.disk.self-test-failure@P, FITrate=10, FITrate=10, FRU=P, ASRU=P; /* * ereports. */ event ereport.io.scsi.disk.over-temperature@P; event ereport.io.scsi.disk.predictive-failure@P; event ereport.io.scsi.disk.self-test-failure@P; /* * Propagations. */ prop fault.io.disk.over-temperature@P -> ereport.io.scsi.disk.over-temperature@P; prop fault.io.disk.self-test-failure@P -> ereport.io.scsi.disk.self-test-failure@P; prop fault.io.disk.predictive-failure@P -> ereport.io.scsi.disk.predictive-failure@P;