📄 smartd.conf.5.in
字号:
.igCopyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net>$Id: smartd.conf.5.in,v 1.87 2008/03/04 22:09:47 ballen4705 Exp $This program is free software; you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by the FreeSoftware Foundation; either version 2, or (at your option) any laterversion.You should have received a copy of the GNU General Public License (forexample COPYING); if not, write to the Free Software Foundation, Inc., 675Mass Ave, Cambridge, MA 02139, USA.This code was originally developed as a Senior Thesis by Michael Cornwellat the Concurrent Systems Laboratory (now part of the Storage SystemsResearch Center), Jack Baskin School of Engineering, University ofCalifornia, Santa Cruz. http://ssrc.soe.ucsc.edu/...TH SMARTD.CONF 5 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE.SH NAME\fBsmartd.conf\fP \- SMART Disk Monitoring Daemon Configuration File\fP.SH FULL PATH.B /usr/local/etc/smartd.conf.SH PACKAGE VERSIONCURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME.SH DESCRIPTION\fB/usr/local/etc/smartd.conf\fP is the configuration file for the \fBsmartd\fPdaemon, which monitors the Self-Monitoring, Analysis and ReportingTechnology (SMART) system built into many ATA-3 and later ATA, IDE andSCSI-3 hard drives.If the configuration file \fB/usr/local/etc/smartd.conf\fP is present,\fBsmartd\fP reads it at startup, before \fBfork\fP(2)ing into thebackground. If \fBsmartd\fP subsequently receives a \fBHUP\fP signal,it will then re-read the configuration file. If \fBsmartd\fP isrunning in debug mode, then an \fBINT\fP signal will also make itre-read the configuration file. This signal can be generated by typing\fB\<CONTROL-C\>\fP in the terminal window where \fBsmartd\fP isrunning..\" DO NOT MODIFY THIS OR THE FOLLOWING TWO LINES. WHAT FOLLOWS.\" IS AUTOMATICALLY INCLUDED FROM THE FILE smartd.8.in.\" STARTINCLUDE.SH CONFIGURATION FILE /usr/local/etc/smartd.confIn the absence of a configuration file, under Linux\fBsmartd\fP will try to open the 20 ATA devices .B /dev/hd[a-t] and the 26 SCSI devices.B /dev/sd[a-z].Under FreeBSD, \fBsmartd\fPwill try to open all existing ATA devices (with entries in /dev).B /dev/ad[0-9]+and all existing SCSI devices.B /dev/da[0-9]+. Under NetBSD/OpenBSD, \fBsmartd\fPwill try to open all existing ATA devices (with entries in /dev).B /dev/wd[0-9]+cand all existing SCSI devices.B /dev/sd[0-9]+c.Under Solaris \fBsmartd\fP will try to open all entries \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI diskdevices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.Under Windows \fBsmartd\fP will try to open all entries \fB"/dev/hd[a-j]"\fP ("\\\\.\\PhysicalDrive[0-9]")for IDE/ATA devices on WinNT4/2000/XP, \fB"/dev/hd[a-d]"\fP(bitmask from "\\\\.\\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,and \fB"/dev/scsi[0-9][0-7]"\fP (ASPI adapter 0-9, ID 0-7) for SCSIdevices on all versions of Windows.Under Darwin, \fBsmartd\fP will open any ATA block storage device.This can be annoying if you have an ATA or SCSI device that hangs ormisbehaves when receiving SMART commands. Even if this causes noproblems, you may be annoyed by the string of error log messages aboutblock-major devices that can\'t be found, and SCSI devices that can\'tbe opened.One can avoid this problem, and gain more control over the types ofevents monitored by\fBsmartd\fP,by using the configuration file.B /usr/local/etc/smartd.conf.This file contains a list of devices to monitor, with one device perline. An example file is included with the.B smartmontoolsdistribution. You will find this sample configuration file in\fB/usr/local/share/doc/smartmontools-5.1/\fP. For security, the configuration fileshould not be writable by anyone but root. The syntax of the file is asfollows:.IP \(bu 4There should be one device listed per line, although you may havelines that are entirely comments or white space..IP \(bu 4Any text following a hash sign \'#\' and up to the end of the line istaken to be a comment, and ignored..IP \(bu 4Lines may be continued by using a backslash \'\e\' as the lastnon-whitespace or non-comment item on a line..IP \(bu 4Note: a line whose first character is a hash sign \'#\' is treated asa white-space blank line, \fBnot\fP as a non-existent line, and will\fBend\fP a continuation line..PP 0.fiHere is an example configuration file. It\'s for illustrative purposesonly; please don\'t copy it onto your system without reading to the endof the.B DIRECTIVESSection below!.nf.B ################################################.B # This is an example smartd startup config file.B # /usr/local/etc/smartd.conf for monitoring three.B # ATA disks, three SCSI disks, six ATA disks.B # behind two 3ware controllers, three SATA disks.B # directly connected to the highpoint rocket-.B # raid controller, two SATA disks connected to.B # the highpoint rocketraid controller via a pmport.B # device and one SATA disk..B #.nf.B # First ATA disk on two different interfaces. On.B # the second disk, start a long self-test every.B # Sunday between 3 and 4 am..B #.B \ \ /dev/hda -a -m admin@example.com,root@localhost .B \ \ /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03.B #.nf.B # SCSI disks. Send a TEST warning email to admin on.B # startup..B #.B \ \ /dev/sda.B \ \ /dev/sdb -m admin@example.com -M test.B #.nf.B # Strange device. It\'s SCSI. Start a scheduled.B # long self test between 5 and 6 am Monday/Thursday.B \ \ /dev/weird -d scsi -s L/../../(1|4)/05.B #.nf.B # An ATA disk may appear as a SCSI device to the.B # OS. If a SCSI to ATA Translation (SAT) layer.B # is between the OS and the device then this can be.B # flagged with the '-d sat' option. This situation.B # may become common with SATA disks in SAS and FC.B # environments..B \ \ /dev/sda -a -d sat.B #.nf.B # Four ATA disks on a 3ware 6/7/8000 controller..B # Start short self-tests daily between midnight and 1am,.B # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6.B # kernel series, /dev/sdX is deprecated in favor of.B # /dev/tweN. For example replace /dev/sdc by /dev/twe0.B # and /dev/sdd by /dev/twe1..B \ \ /dev/sdc -d 3ware,0 -a -s S/../.././00.B \ \ /dev/sdc -d 3ware,1 -a -s S/../.././01.B \ \ /dev/sdd -d 3ware,2 -a -s S/../.././02.B \ \ /dev/sdd -d 3ware,3 -a -s S/../.././03.B #.nf.B # Two ATA disks on a 3ware 9000 controller..B # Start long self-tests Sundays between midnight and .B # 1am and 2-3 am.B \ \ /dev/twa0 -d 3ware,0 -a -s L/../../7/00.B \ \ /dev/twa0 -d 3ware,1 -a -s L/../../7/02.B #.nf.B # Three SATA disks on a highpoint rocketraid controller..B # Start short self-tests daily between 1-2, 2-3, and.B # 3-4 am..B \ \ /dev/sde -d hpt,1/1 -a -s S/../.././01.B \ \ /dev/sde -d hpt,1/2 -a -s S/../.././02.B \ \ /dev/sde -d hpt,1/3 -a -s S/../.././03.B #.nf.B # Two SATA disks connected to a highpoint rocketraid .B # via a pmport device. Start long self-tests Sundays.B # between midnight and 1am and 2-3 am..B \ \ /dev/sde -d hpt,1/4/1 -a -s L/../../7/00.B \ \ /dev/sde -d hpt,1/4/2 -a -s L/../../7/02.B #.nf.B # The following line enables monitoring of the .B # ATA Error Log and the Self-Test Error Log. .B # It also tracks changes in both Prefailure.B # and Usage Attributes, apart from Attributes.B # 9, 194, and 231, and shows continued lines:.B #.B \ \ /dev/hdd\ -l\ error\ \e.B \ \ \ \ \ \ \ \ \ \ \ -l\ selftest\ \e.B \ \ \ \ \ \ \ \ \ \ \ -t\ \e\ \ \ \ \ \ # Attributes not tracked:.B \ \ \ \ \ \ \ \ \ \ \ -I\ 194\ \e\ \ # temperature.B \ \ \ \ \ \ \ \ \ \ \ -I\ 231\ \e\ \ # also temperature.B \ \ \ \ \ \ \ \ \ \ \ -I 9\ \ \ \ \ \ # power-on hours.B #.B ################################################.fi.PP .SH CONFIGURATION FILE DIRECTIVES.PPIf the first non-comment entry in the configuration file is the textstring.B DEVICESCANin capital letters, then\fBsmartd\fPwill ignore any remaining lines in the configuration file, and willscan for devices..B DEVICESCANmay optionally be followed by Directives that will apply to alldevices that are found in the scan. Please see below for additionaldetails..sp 2The following are the Directives that may appear following the devicename or.B DEVICESCANon any line of the.B /usr/local/etc/smartd.confconfiguration file. Note that.B these are NOT command-line options for \fBsmartd\fP.The Directives below may appear in any order, following the devicename. .B For an ATA device,if no Directives appear, then the device will be monitoredas if the \'\-a\' Directive (monitor all SMART properties) had been given..B If a SCSI disk is listed,it will be monitored at the maximum implemented level: roughlyequivalent to using the \'\-H \-l selftest\' options for an ATA disk.So with the exception of \'\-d\', \'\-m\', \'\-l selftest\', \'\-s\', and\'\-M\', the Directives below are ignored for SCSI disks. For SCSIdisks, the \'\-m\' Directive sends a warning email if the SMART statusindicates a disk failure or problem, if the SCSI inquiry about diskstatus fails, or if new errors appear in the self-test log..B If a 3ware controller is usedthen the corresponding SCSI (/dev/sd?) or character device (/dev/twe?or /dev/twa?) must be listed, along with the \'\-d 3ware,N\' Directive(see below). The individual ATA disks hosted by the 3ware controllerappear to \fBsmartd\fP as normal ATA devices. Hence all the ATAdirectives can be used for these disks (but see note below)..TP.B \-d TYPESpecifies the type of the device. This Directive may be used multipletimes for one device, but the arguments \fIata\fP, \fIscsi\fP, \fIsat\fP,\fImarvell\fP, \fIcciss,N\fP and \fI3ware,N\fP are mutually-exclusive. If morethan one is given then \fBsmartd\fP will use the last one which appears.If none of these three arguments is given, then \fBsmartd\fP willfirst attempt to guess the device type by looking at whether the sixthcharacter in the device name is an \'s\' or an \'h\'. This will work fordevice names like /dev/hda or /dev/sdb, and corresponds to choosing\fIata\fP or \fIscsi\fP respectively. If\fBsmartd\fPcan\'t guess from this sixth character, then it will simply try toaccess the device using first ATA and then SCSI ioctl()s.The valid arguments to this Directive are:.I ata\- the device type is ATA. This prevents\fBsmartd\fPfrom issuing SCSI commands to an ATA device..I scsi\- the device type is SCSI. This prevents\fBsmartd\fPfrom issuing ATA commands to a SCSI device..I sat\- the device type is SCSI to ATA Translation (SAT).\fBsmartd\fPwill generate ATA (smart) commands and then package them inthe SAT defined ATA PASS THROUGH SCSI commands. The commandsare then routed through the SCSI pass through interface to theoperating system. There are two types of ATA PASS THROUGHSCSI commands: a 12 byte and 16 byte variant.\fBsmartd\fPcan use either and defaults to the 16 byte variant. This canbe overridden with this syntax: \'\-d sat,12\' or \'\-d sat,16\'..I marvell\- Under Linux, interact with SATA disks behind Marvell chip-setcontrollers (using the Marvell rather than libata driver)..I 3ware,N\- the device consists of one or more ATA disks connected to a 3wareRAID controller. The non-negative integer N (in the range from 0 to 31inclusive) denotes which disk on the controller is monitored. In logfiles and email messages this disk will be identified as 3ware_disk_XXwith XX in the range from 00 to 31 inclusive.This Directive may at first appear confusing, because the 3warecontroller is a SCSI device (such as /dev/sda) and should be listed assuch in the the configuration file.However when the \'\-d 3ware,N\'Directive is used, then the corresponding disk is addressed usingnative ATA commands which are \'passed through\' the SCSI driver. AllATA Directives listed in this man page may be used. Note that whileyou may use \fBany\fP of the 3ware SCSI logical devices /dev/sd? toaddress \fBany\fP of the physical disks (3ware ports), error and logmessages will make the most sense if you always list the 3ware SCSIlogical device corresponding to the particular physical disks. Pleasesee the \fBsmartctl\fP man page for further details.ATA disks behind 3ware controllers may alternatively be accessed via acharacter device interface /dev/twe0-15 (3ware 6000/7000/8000controllers) and /dev/twa0-15 (3ware 9000 series controllers). Notethat the 9000 series controllers may \fBonly\fP be accessed using thecharacter device interface /dev/twa0-15 and not the SCSI deviceinterface /dev/sd?. Please see the \fBsmartctl\fP man page forfurther details.Note that older 3w-xxxx drivers do not pass the \'Enable Autosave\'(\fB-S on\fP) and \'Enable Automatic Offline\' (\fB-o on\fP) commandsto the disk, if the SCSI interface is used, and produce these types ofharmless syslog error messages instead: \fB\'3w-xxxx: tw_ioctl():Passthru size (123392) too big\'\fP. This can be fixed by upgrading toversion 1.02.00.037 or later of the 3w-xxxx driver, or by applying apatch to older versions. See\fBhttp://smartmontools.sourceforge.net/\fP for instructions.Alternatively use the character device interfaces /dev/twe0-15 (3ware6/7/8000 series controllers) or /dev/twa0-15 (3ware 9000 seriescontrollers)..I cciss,N\- the device consists of one or more SCSI disks connected to a ccissRAID controller. The non-negative integer N (in the range from 0 to 15
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -