Permalink
Switch branches/tags
166 20160526 HEAD-2315 OS-3068 OS-4683 OS-5783 OS-6443-final OS-6443 OS-6473 OS-6534 OS-7200 OS-7217 OS-7320 RFD96 arm64-dev backout_9421 dev-bhyve-promisc dev-overlay eu-ams-1 gcc4 ikev2 intrd jclulow_pf libzfs_diff master mdb-union nat-reform netperf openssl release-20120528 release-20120626 release-20120712 release-20120726 release-20120809 release-20120823 release-20120906 release-20120920 release-20121004 release-20121101 release-20121129 release-20121213 release-20121227 release-20130110 release-20130124 release-20130207 release-20130221 release-20130307 release-20130321 release-20130404 release-20130418 release-20130502 release-20130515 release-20130530 release-20130613 release-20130627 release-20130711 release-20130725 release-20130822 release-20130905 release-20130919 release-20131003 release-20131017 release-20131031 release-20131128 release-20131212 release-20140109 release-20140123 release-20140206 release-20140220 release-20140307 release-20140320 release-20140403 release-20140417 release-20140501 release-20140515 release-20140529 release-20140612 release-20140626 release-20140703 release-20140710 release-20140724 release-20140807 release-20140821 release-20140904 release-20140918 release-20141002 release-20141016 release-20141030 release-20141113 release-20141127 release-20141211 release-20141225 release-20150108 release-20150122 release-20150205 release-20150219 release-20150305 release-20150319 release-20150402 release-20150416 release-20150430 release-20150514 release-20150528 release-20150611 release-20150625 release-20150709 release-20150723 release-20150806 release-20150820 release-20150903 release-20150917 release-20151001 release-20151015 release-20151029 release-20151112 release-20151126 release-20151210 release-20151224 release-20160107 release-20160121 release-20160204 release-20160218 release-20160303 release-20160317 release-20160331 release-20160414 release-20160428 release-20160512 release-20160526 release-20160609 release-20160625 release-20160707 release-20160721 release-20160804 release-20160818 release-20160901 release-20160915 release-20160929 release-20161013 release-20161027 release-20161110 release-20161124 release-20161208 release-20161222 release-20170105 release-20170119 release-20170202 release-20170216 release-20170302 release-20170316 release-20170330 release-20170413 release-20170427 release-20170511 release-20170525 release-20170608 release-20170622 release-20170706 release-20170720 release-20170803 release-20170817 release-20170831 release-20170914 release-20170928 release-20171012 release-20171026 release-20171109 release-20171110 release-20171123 release-20171207 release-20171221 release-20180104 release-20180118 release-20180201 release-20180215 release-20180301 release-20180315 release-20180329 release-20180412 release-20180426 release-20180510 release-20180524 release-20180607 release-20180621 release-20180705 release-20180719 release-20180802 release-20180816 release-20180830 release-20180913 release-20180927 release-20181011 release-20181025 release-20181108 release-20181122 release-20181206 rpz-lso smartarray smatch uefi us-west-2 vpc zfs-crypto
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
220 lines (191 sloc) 7.49 KB
/*
* 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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
*/
#pragma dictionary "DISK"
#define P disk
fru P;
asru P;
/*
* Over all comments for this file:
* <disk-as-detector> The disk-as-detector DE provides the mapping between
* ereports generated by a kernel disk driver sd(7D) and resulting faults.
*/
/*
* SERD engine for media error fault propagation:
*
* This strategy is designed to give a file system, like ZFS, the
* ability to attempt data recovery/relocation without faulting a disk.
* This implementation depends on a file system retry to the same lba
* to trigger a fault when recovery/relocation is not possible.
*
* We let the engine propagate one error only once every 1 minute and then if we
* still get 2 or more errors within 24 hours for the same LBA,
* there is a fault.
*/
engine serd.io.scsi.cmd.disk.dev.rqs.merr@P, N=1, T=24h;
/*
* 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,
engine=serd.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"))};
/*
* Utilize setserdsuffix with specific LBA,
* the serd engine would only trigger if the fault recurred on the same LBA
*/
prop fault.io.scsi.cmd.disk.dev.rqs.merr@P->
ereport.io.scsi.cmd.disk.dev.rqs.merr@P{ DRIVER_ASSESSMENT_FATAL &&
setserdsuffix(payloadprop("lba")) &&
setpayloadprop("key", payloadprop("key")) &&
setpayloadprop("asc", payloadprop("asc")) &&
setpayloadprop("ascq", payloadprop("ascq")) &&
setpayloadprop("lba", payloadprop("lba"))};
/*
* NOTE: this propagation uses the "may" propagation of eversholt.
* The ereport need never exist. It's just a way of making
* the diagnosis wait for the within time on that ereport
* to complete. Once it has completed the diagnosis continues
* even though the dummy ereport didn't occur.
*/
event ereport.io.scsi.cmd.disk.dev.rqs.merr.dummy@P {within(60s)};
prop fault.io.scsi.cmd.disk.dev.rqs.merr@P (0) ->
ereport.io.scsi.cmd.disk.dev.rqs.merr.dummy@P;
/*
* 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;
event fault.io.disk.ssm-wearout@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;
event ereport.io.scsi.disk.ssm-wearout@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 {
setpayloadprop("asc", payloadprop("additional-sense-code")) &&
setpayloadprop("ascq", payloadprop("additional-sense-code-qualifier")) };
prop fault.io.disk.ssm-wearout@P ->
ereport.io.scsi.disk.ssm-wearout@P {
setpayloadprop("current-wearout-percentage",
payloadprop("current-ssm-wearout"))
&& setpayloadprop("threshold-wearout-percentage",
payloadprop("threshold-ssm-wearout")) };