-
Notifications
You must be signed in to change notification settings - Fork 50
/
smartd.conf.5.in
1794 lines (1785 loc) · 69.2 KB
/
smartd.conf.5.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.ig
Copyright (C) 2002-10 Bruce Allen
Copyright (C) 2004-23 Christian Franke
SPDX-License-Identifier: GPL-2.0-or-later
$Id$
..
.\" Macros borrowed from pages generated with Pod::Man
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp 0.4v
.if n .sp
..
.de Vb \" Begin verbatim text
.if t .ft CW
.if n .ft R
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Use groff extension \(aq (apostrophe quote, ASCII 0x27) if possible
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.TH SMARTD.CONF 5 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
.SH NAME
\fBsmartd.conf\fP \- SMART Disk Monitoring Daemon Configuration File\fP
.Sp
.SH DESCRIPTION
.\" %IF NOT OS ALL
.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
.\"! It does not contain info specific to other platforms.]
.\"! .PP
.\" %ENDIF NOT OS ALL
\fB/usr/local/etc/smartd.conf\fP is the configuration file for the \fBsmartd\fP
daemon.
.PP
If the configuration file \fB/usr/local/etc/smartd.conf\fP is present,
\fBsmartd\fP reads it at startup.
If \fBsmartd\fP subsequently receives a \fBHUP\fP signal,
it will then re-read the configuration file. If \fBsmartd\fP is
running in debug mode, then an \fBINT\fP signal will also make it
re-read the configuration file. This signal can be generated by typing
\fB<CONTROL-C>\fP in the terminal window where \fBsmartd\fP is
running.
.PP
In the absence of a configuration file
\fBsmartd\fP will try to open all available devices
(see \fBsmartd\fP(8) man page).
A configuration file with a single line \fB\*(AqDEVICESCAN \-a\*(Aq\fP
would have the same effect.
.PP
This can be annoying if you have an ATA or SCSI device that hangs or
misbehaves when receiving SMART commands. Even if this causes no
problems, you may be annoyed by the string of error log messages about devices
that can't be opened.
.PP
One can avoid this problem, and gain more control over the types of
events monitored by \fBsmartd\fP, by using the configuration file
\fB/usr/local/etc/smartd.conf\fP.
This file contains a list of devices to monitor, with one device per
line. An example file is included with the
.B smartmontools
distribution. You will find this sample configuration file in
\fB/usr/local/share/doc/smartmontools/\fP.
For security, the configuration file should not be writable by anyone
but root.
The syntax of the file is as follows:
.IP \(bu 4
There should be one device listed per line, although you may have
lines that are entirely comments or white space.
.IP \(bu 4
Any text following a hash sign \*(Aq#\*(Aq and up to the end of the line is
taken to be a comment, and ignored.
.IP \(bu 4
Lines may be continued by using a backslash \*(Aq\e\*(Aq as the last
non-whitespace or non-comment item on a line.
.IP \(bu 4
Note: a line whose first character is a hash sign \*(Aq#\*(Aq is treated as
a white-space blank line, \fBnot\fP as a non-existent line, and will
\fBend\fP a continuation line.
.PP
Here is an example configuration file. It's for illustrative purposes
only; please don't copy it onto your system without reading to the end
of the
.B DIRECTIVES
Section below!
.PP
.Vb 9
################################################
# This is an example smartd startup config file
# /usr/local/etc/smartd.conf
#
# On the second disk, start a long self-test every
# Sunday between 3 and 4 am.
#
/dev/sda \-a \-m [email protected],root@localhost
/dev/sdb \-a \-I 194 \-I 5 \-i 12 \-s L/../../7/03
#
# Send a TEST warning email to admin on startup.
#
/dev/sdc \-m [email protected] \-M test
#
# An ATA disk may appear as a SCSI device to the
# OS. If a SCSI to ATA Translation (SAT) layer
# is between the OS and the device then this can be
# flagged with the '\-d sat' option.
/dev/sda \-a \-d sat
.\" %IF OS FreeBSD Linux
#
# Disks connected to a MegaRAID controller
# Start short self\-tests daily between 1\-2, 2\-3, and
# 3\-4 am.
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
# Linux:
/dev/sda \-d megaraid,0 \-a \-s S/../.././01
/dev/sda \-d megaraid,1 \-a \-s S/../.././02
/dev/sda \-d megaraid,2 \-a \-s S/../.././03
/dev/bus/0 \-d megaraid,2 \-a \-s S/../.././03
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
# FreeBSD:
/dev/mfi0 \-d megaraid,0 \-a \-s S/../.././01
/dev/mfi0 \-d megaraid,1 \-a \-s S/../.././02
/dev/mfi0 \-d megaraid,2 \-a \-s S/../.././03
/dev/mrsas0 \-d megaraid,2 \-a \-s S/../.././03
.\" %ENDIF OS FreeBSD
.\" %IF OS Linux
#
# Three disks connected to an AacRaid controller
# Start short self\-tests daily between 1\-2, 2\-3, and
# 3\-4 am.
/dev/sda \-d aacraid,0,0,66 \-a \-s S/../.././01
/dev/sda \-d aacraid,0,0,67 \-a \-s S/../.././02
/dev/sda \-d aacraid,0,0,68 \-a \-s S/../.././03
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD Linux
#
# Two SATA (not SAS) disks on a 3ware 9750 controller.
# Start long self\-tests Sundays between midnight and
# 1 am and 2\-3 am
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
# under Linux
/dev/twl0 \-d 3ware,0 \-a \-s L/../../7/00
/dev/twl0 \-d 3ware,1 \-a \-s L/../../7/02
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
# under FreeBSD
/dev/tws0 \-d 3ware,0 \-a \-s L/../../7/00
/dev/tws0 \-d 3ware,1 \-a \-s L/../../7/02
.\" %ENDIF OS FreeBSD
.\" %IF OS Linux
#
# Two disks connected to the first HP SmartArray controller
# which uses the Linux cciss driver. Start long self\-tests
# on Sunday nights and short self\-tests every night and send
# errors to root.
/dev/sda \-d cciss,0 \-a \-s (L/../../7/02|S/../.././02) \-m root
/dev/sda \-d cciss,1 \-a \-s (L/../../7/03|S/../.././03) \-m root
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD Linux
#
# Three SATA disks on a HighPoint RocketRAID controller.
# Start short self\-tests daily between 1\-2, 2\-3, and
# 3\-4 am.
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
# under Linux
/dev/sde \-d hpt,1/1 \-a \-s S/../.././01
/dev/sde \-d hpt,1/2 \-a \-s S/../.././02
/dev/sde \-d hpt,1/3 \-a \-s S/../.././03
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
# under FreeBSD
/dev/hptrr \-d hpt,1/1 \-a \-s S/../.././01
/dev/hptrr \-d hpt,1/2 \-a \-s S/../.././02
/dev/hptrr \-d hpt,1/3 \-a \-s S/../.././03
.\" %ENDIF OS FreeBSD
.\" %IF OS FreeBSD Linux
#
# Two SATA disks connected to a HighPoint RocketRAID
# via a pmport device. Start long self\-tests Sundays
# between midnight and 1 am and 2\-3 am.
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
# under Linux
/dev/sde \-d hpt,1/4/1 \-a \-s L/../../7/00
/dev/sde \-d hpt,1/4/2 \-a \-s L/../../7/02
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
# under FreeBSD
/dev/hptrr \-d hpt,1/4/1 \-a \-s L/../../7/00
/dev/hptrr \-d hpt,1/4/2 \-a \-s L/../../7/02
.\" %ENDIF OS FreeBSD
.\" %IF OS FreeBSD Linux
#
# Three SATA disks connected to an Areca
# RAID controller. Start long self\-tests Sundays
# between midnight and 3 am.
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
# under Linux
/dev/sg2 \-d areca,1 \-a \-s L/../../7/00
/dev/sg2 \-d areca,2 \-a \-s L/../../7/01
/dev/sg2 \-d areca,3 \-a \-s L/../../7/02
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
# under FreeBSD
/dev/arcmsr0 \-d areca,1 \-a \-s L/../../7/00
/dev/arcmsr0 \-d areca,2 \-a \-s L/../../7/01
/dev/arcmsr0 \-d areca,3 \-a \-s L/../../7/02
.\" %ENDIF OS FreeBSD
#
# The following line enables monitoring of the
# ATA Error Log and the Self\-Test Error Log.
# It also tracks changes in both Prefailure
# and Usage Attributes, apart from Attributes
# 9, 194, and 231, and shows continued lines:
#
/dev/sdd\ \-l\ error\ \e
\ \ \ \ \ \-l\ selftest\ \e
\ \ \ \ \ \-t\ \e\ \ \ \ \ \ \ \ \ # Attributes not tracked:
\ \ \ \ \ \-I\ 194\ \e\ \ \ \ \ # temperature
\ \ \ \ \ \-I\ 231\ \e\ \ \ \ \ # also temperature
\ \ \ \ \ \-I\ 9\ \ \ \ \ \ \ \ \ # power\-on hours
#
################################################
.Ve
.Sp
.SH DEVICESCAN
If a non-comment entry in the configuration file is the text string
.B DEVICESCAN
in capital letters, then
\fBsmartd\fP
will ignore any remaining lines in the configuration file, and will
scan for devices.
If
.B DEVICESCAN
is not followed by any Directives, then \*(Aq\-a\*(Aq will apply to all
devices.
.PP
.B DEVICESCAN
may optionally be followed by Directives that will apply to all
devices that are found in the scan.
For example
.PP
.Vb
\ \ DEVICESCAN \-m [email protected]
.Ve
.PP
will scan for all devices, and then monitor them.
It will send one email warning per device for any problems that are found.
.PP
.Vb
\ \ DEVICESCAN \-H \-m [email protected]
.Ve
.PP
will do the same, but only monitors the SMART health status of the
devices, rather than the default \*(Aq\-a\*(Aq.
.PP
Multiple \*(Aq\-d TYPE\*(Aq options may be specified with DEVICESCAN
to combine the scan results of more than one TYPE.
.PP
Configuration entries for specific devices may precede the \fBDEVICESCAN\fP
entry.
For example
.PP
.Vb 4
\ \ DEFAULT \-m [email protected]
\ \ /dev/sda \-s S/../.././02
\ \ /dev/sdc \-d ignore
\ \ DEVICESCAN \-s L/../.././02
.Ve
.PP
will scan for all devices except /dev/sda and /dev/sdc, monitor them, and
run a long test between 2\(en3 am every morning.
Device /dev/sda will also be monitored, but only a short test will be run.
Device /dev/sdc will be ignored.
Warning emails will be sent for all monitored devices.
.PP
A device is ignored by DEVICESCAN if a configuration line with the same
device name exists.
.\" %IF NOT OS Windows OS2
Symbolic links are resolved before this check is done.
.\" %ENDIF NOT OS Windows OS2
A device name is also ignored if another device with same identify
information (vendor, model, firmware version, serial number, WWN) already
exists.
.Sp
.SH DEFAULT SETTINGS
If an entry in the configuration file starts with
.B DEFAULT
instead of a device name, then all directives in this entry are set
as defaults for the next device entries.
.PP
This configuration:
.PP
.Vb 7
\ \ DEFAULT \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m [email protected]
\ \ /dev/sda
\ \ /dev/sdb
\ \ /dev/sdc
\ \ DEFAULT \-H \-m [email protected]
\ \ /dev/sdd
\ \ /dev/sde \-d removable
.Ve
.PP
has the same effect as:
.PP
.Vb 5
\ \ /dev/sda \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m [email protected]
\ \ /dev/sdb \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m [email protected]
\ \ /dev/sdc \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m [email protected]
\ \ /dev/sdd \-H \-m [email protected]
\ \ /dev/sde \-d removable \-H \-m [email protected]
.Ve
.Sp
.SH CONFIGURATION FILE DIRECTIVES
The following are the Directives that may appear following the device
name or
.B DEVICESCAN
or
.B DEFAULT
on any line of the
.B /usr/local/etc/smartd.conf
configuration file. Note that
.B these are NOT command-line options for
\fBsmartd\fP.
The Directives below may appear in any order, following the device
name.
.PP
.B For an ATA device,
if no Directives appear, then the device will be monitored
as if the \*(Aq\-a\*(Aq Directive (monitor all SMART properties) had been given.
.PP
.B If a SCSI disk is listed,
it will be monitored at the maximum implemented level: roughly
equivalent to using the \*(Aq\-H \-l selftest\*(Aq options for an ATA disk.
So with the exception of \*(Aq\-d\*(Aq, \*(Aq\-m\*(Aq, \*(Aq\-l selftest\*(Aq,
\*(Aq\-s\*(Aq, and \*(Aq\-M\*(Aq, the Directives below are ignored for SCSI disks.
For SCSI disks, the \*(Aq\-m\*(Aq Directive sends a warning email if the SMART
status indicates a disk failure or problem, if the SCSI inquiry about disk
status fails, or if new errors appear in the self-test log.
.\" %IF OS FreeBSD Linux
.PP
.B If a 3ware controller is used
then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?,
/dev/twa?, /dev/twl? or /dev/tws?) must be listed, along with the
\*(Aq\-d 3ware,N\*(Aq Directive (see below).
The individual ATA disks hosted by the 3ware controller appear to \fBsmartd\fP
as normal ATA devices.
Hence all the ATA directives can be used for these disks (but see note below).
.PP
.B If an Areca controller is used
then the corresponding device (SCSI /dev/sg? on Linux or /dev/arcmsr0 on
FreeBSD) must be listed, along with the \*(Aq\-d areca,N\*(Aq Directive
(see below).
The individual SATA disks hosted by the Areca controller appear to \fBsmartd\fP
as normal ATA devices. Hence all the ATA directives can be used for
these disks. Areca firmware version 1.46 or later which supports
smartmontools must be used; Please see the \fBsmartctl\fP(8) man page
for further details.
.\" %ENDIF OS FreeBSD Linux
.TP
.B \-d TYPE
Specifies the type of the device.
The valid arguments to this directive are:
.Sp
.I auto
\- attempt to guess the device type from the device name or from
controller type info provided by the operating system or from
a matching USB ID entry in the drive database.
This is the default.
.Sp
.I ata
\- the device type is ATA. This prevents
\fBsmartd\fP
from issuing SCSI commands to an ATA device.
.Sp
.\" %IF NOT OS Darwin
.I scsi
\- the device type is SCSI. This prevents
\fBsmartd\fP
from issuing ATA commands to a SCSI device.
.Sp
.\" %ENDIF NOT OS Darwin
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvme[,NSID]
\- the device type is NVM Express (NVMe).
The optional parameter NSID specifies the namespace id (in hex) passed
to the driver.
Use 0xffffffff for the broadcast namespace id.
The default for NSID is the namespace id addressed by the device name.
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.\" %IF NOT OS Darwin
.I sat[,auto][,N]
\- the device type is SCSI to ATA Translation (SAT).
This is for ATA disks that have a SCSI to ATA Translation Layer (SATL)
between the disk and the operating system.
SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and
the other 16 bytes long. The default is the 16 byte variant which can be
overridden with either \*(Aq\-d sat,12\*(Aq or \*(Aq\-d sat,16\*(Aq.
.Sp
If \*(Aq\-d sat,auto\*(Aq is specified, device type SAT (for ATA/SATA disks)
is only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA ").
Otherwise device type SCSI (for SCSI/SAS disks) is used.
.Sp
.I usbasm1352r,PORT
\- [NEW EXPERIMENTAL SMARTD 7.4 FEATURE]
this device type is for one or two SATA disks that are behind an ASMedia
ASM1352R USB to SATA (RAID) bridge.
The parameter PORT (0 or 1) selects the disk to monitor.
.br
Note: This USB bridge also supports \*(Aq\-d sat\*(Aq.
This monitors either the first disk or the second disk if no disk is
connected to the first port.
.Sp
.I usbcypress
\- this device type is for ATA disks that are behind a Cypress USB to PATA
bridge. This will use the ATACB proprietary scsi pass through command.
The default SCSI operation code is 0x24, but although it can be overridden
with \*(Aq\-d usbcypress,0xN\*(Aq, where N is the scsi operation code,
you're running the risk of damage to the device or filesystems on it.
.Sp
.I usbjmicron[,p][,x][,PORT]
\- this device type is for SATA disks that are behind a JMicron USB to
PATA/SATA bridge.
The 48-bit ATA commands (required e.g.\& for \*(Aq\-l xerror\*(Aq, see below)
do not work with all of these bridges and are therefore disabled by default.
These commands can be enabled by \*(Aq\-d usbjmicron,x\*(Aq.
If two disks are connected to a bridge with two ports, an error message is
printed if no PORT (0 or 1) is specified.
.br
The PORT parameter is not necessary if the device uses a port multiplier to
connect multiple disks to one port.
The disks appear under separate /dev/ice names then.
.br
CAUTION: Specifying \*(Aq,x\*(Aq for a device which does not support it results
in I/O errors and may disconnect the drive. The same applies if the specified
PORT does not exist or is not connected to a disk.
.Sp
The Prolific PL2507/3507 USB bridges with older firmware support a pass-through
command similar to JMicron and work with \*(Aq\-d usbjmicron,0\*(Aq.
Newer Prolific firmware requires a modified command which can be selected by
\*(Aq\-d usbjmicron,p\*(Aq.
Note that this does not yet support the SMART status command.
.Sp
.I usbprolific
\- this device type is for SATA disks that are behind a Prolific
PL2571/2771/2773/2775 USB to SATA bridge.
.Sp
.I usbsunplus
\- this device type is for SATA disks that are behind a SunplusIT USB to SATA
bridge.
.Sp
.I sntasmedia
\- this device type is for NVMe disks that are behind an ASMedia USB to NVMe
bridge.
.Sp
.I sntjmicron[,NSID]
\- this device type is for NVMe disks that are behind a JMicron USB to NVMe
bridge.
The optional parameter NSID specifies the namespace id (in hex) passed
to the driver.
The default namespace id is the broadcast namespace id (0xffffffff).
.Sp
.I sntrealtek
\- this device type is for NVMe disks that are behind a Realtek USB to NVMe
bridge.
.Sp
.\" %ENDIF NOT OS Darwin
.\" %IF OS Linux
.I marvell
\- [Linux only] (deprecated and subject to remove).
.Sp
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD Linux
.I megaraid,N
\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS disks
connected to a MegaRAID controller.
The non-negative integer N (in the range of 0 to 127 inclusive) denotes which
disk on the controller is monitored.
This interface will also work for Dell PERC controllers.
In log files and email messages this disk will be identified as
megaraid_disk_XXX with XXX in the range from 000 to 127 inclusive.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux Windows Cygwin
.I aacraid,H,L,ID
\- [Linux, Windows and Cygwin only] the device consists of one or more
SCSI/SAS or SATA disks connected to an AacRaid controller.
The non-negative integers H,L,ID (Host number, Lun, ID) denote which disk
on the controller is monitored.
In log files and email messages this disk will be identified as
aacraid_disk_HH_LL_ID.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.\" %ENDIF OS Linux Windows Cygwin
.\" %IF OS FreeBSD Linux
.I 3ware,N
\- [FreeBSD and Linux only] the device consists of one or more ATA disks
connected to a 3ware RAID controller. The non-negative integer N
(in the range from 0 to 127 inclusive) denotes which disk on the controller
is monitored.
In log files and email messages this disk will be identified as 3ware_disk_XXX
with XXX in the range from 000 to 127 inclusive.
.Sp
Note that while you may use \fBany\fP of the 3ware SCSI logical devices /dev/tw*
to address \fBany\fP of the physical disks (3ware ports), error and log
messages will make the most sense if you always list the 3ware SCSI
logical device corresponding to the particular physical disks.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS FreeBSD Linux Windows Cygwin
.I areca,N
\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or
more SATA disks connected to an Areca SATA RAID controller.
The positive integer N (in the range from 1 to 24 inclusive) denotes which
disk on the controller is monitored.
In log files and email messages this disk will be identified as
areca_disk_XX with XX in the range from 01 to 24 inclusive.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.I areca,N/E
\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one
or more SATA or SAS disks connected to an Areca SAS RAID controller.
The integer N (range 1 to 128) denotes the channel (slot) and E (range
1 to 8) denotes the enclosure.
Important: This requires Areca SAS controller firmware version 1.51 or later.
.Sp
.\" %ENDIF OS FreeBSD Linux Windows Cygwin
.\" %IF OS FreeBSD Linux
.I cciss,N
\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS or
SATA disks connected to a cciss RAID controller.
The non-negative integer N (in the range from 0 to 127 inclusive) denotes
which disk on the controller is monitored.
In log files and email messages this disk will be identified as cciss_disk_XX
with XX in the range from 00 to 127 inclusive.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.I hpt,L/M/N
\- [FreeBSD and Linux only] the device consists of one or more ATA disks
connected to a HighPoint RocketRAID controller. The integer L is the
controller id, the integer M is the channel number, and the integer N
is the PMPort number if it is available. The allowed values of L are
from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4
if PMPort available. And also these values are limited by the model
of the HighPoint RocketRAID controller.
In log files and email messages this disk will be identified as
hpt_X/X/X and X/X/X is the same as L/M/N, note if no N indicated, N set
to the default value 1.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
.I sssraid,E,S
\- [Linux only: NEW EXPERIMENTAL SMARTD 7.4 FEATURE]
the device consists of one or more SCSI/SAS or SATA disks connected to a
SSSRAID controller.
The non-negative integer E (in the range of 0 to 8) denotes the enclosure
and S(range 0 to 128) denotes the slot.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.\" %ENDIF OS Linux
.I intelliprop,N[+TYPE]
\- (deprecated and subject to remove).
.Sp
.I jmb39x[\-q],N[,sLBA][,force][+TYPE]
\- the device consists of multiple SATA disks connected to a JMicron JMB39x
RAID port multiplier.
The suffix \*(Aq\-q\*(Aq selects a slightly different command variant used by
some QNAP NAS devices.
The integer N is the port number from 0 to 4.
Please see the \fBsmartctl\fP(8) man page for further details.
.Sp
.I jms56x,N[,sLBA][,force][+TYPE]
\- the device consists of multiple SATA disks connected to a JMicron JMS56x
USB to SATA RAID bridge.
See \*(Aqjmb39x...\*(Aq above for valid arguments.
.Sp
.I ignore
\- the device specified by this configuration entry should be ignored.
This allows one to ignore specific devices which are detected by a following
DEVICESCAN configuration line.
It may also be used to temporary disable longer multi-line configuration
entries.
This Directive may be used in conjunction with the other \*(Aq\-d\*(Aq
Directives.
.Sp
.I removable
\- the device or its media is removable. This indicates to
\fBsmartd\fP
that it should continue (instead of exiting, which is the default
behavior) if the device does not appear to be present when
\fBsmartd\fP is started.
This directive also suppresses warning emails and repeated log messages
if the device is removed after startup.
This Directive may be used in conjunction with the other \*(Aq\-d\*(Aq
Directives.
.br
\fBWARNING: Removing a device and connecting a different one to same interface
is not supported and may result in bogus warnings until smartd is restarted.\fP
.TP
.B \-n POWERMODE[,N][,q]
[ATA only] This \*(Aqnocheck\*(Aq Directive is used to prevent a disk from
being spun-up when it is periodically polled by \fBsmartd\fP.
.Sp
ATA disks have five different power states. In order of increasing
power consumption they are: \*(AqOFF\*(Aq, \*(AqSLEEP\*(Aq,
\*(AqSTANDBY\*(Aq, \*(AqIDLE\*(Aq, and \*(AqACTIVE\*(Aq.
Typically in the OFF, SLEEP, and STANDBY modes the disk's platters are not
spinning.
But usually, in response to SMART commands issued by \fBsmartd\fP, the disk
platters are spun up.
So if this option is not used, then a disk which is in a low-power mode may
be spun up and put into a higher-power mode when it is periodically
polled by \fBsmartd\fP.
.Sp
Note that if the disk is in SLEEP mode when \fBsmartd\fP is started,
then it won't respond to \fBsmartd\fP commands, and so the disk won't
be registered as a device for \fBsmartd\fP to monitor. If a disk is in
any other low-power mode, then the commands issued by \fBsmartd\fP to
register the disk will probably cause it to spin-up.
.Sp
The \*(Aq\fB\-n\fP\*(Aq (nocheck) Directive specifies if \fBsmartd\fP's
periodic checks should still be carried out when the device is in a
low-power mode. It may be used to prevent a disk from being spun-up
by periodic \fBsmartd\fP polling. The allowed values of POWERMODE
are:
.Sp
.I never
\- \fBsmartd\fP will poll (check) the device regardless of its power
mode. This may cause a disk which is spun-down to be spun-up when
\fBsmartd\fP checks it. This is the default behavior if the '\-n'
Directive is not given.
.Sp
.I sleep
\- check the device unless it is in SLEEP mode.
.Sp
.I standby
\- check the device unless it is in SLEEP or STANDBY mode. In
these modes most disks are not spinning, so if you want to prevent
a laptop disk from spinning up each time that \fBsmartd\fP polls,
this is probably what you want.
.Sp
.I idle
\- check the device unless it is in SLEEP, STANDBY or IDLE mode.
In the IDLE state, most disks are still spinning, so this is probably
not what you want.
.Sp
Maximum number of skipped checks (in a row) can be specified by
appending positive number \*(Aq,N\*(Aq to POWERMODE (like
\*(Aq\-n standby,15\*(Aq).
After N checks are skipped in a row, powermode is ignored and the
check is performed anyway.
.Sp
When a periodic test is skipped, \fBsmartd\fP normally writes an
informal log message. The message can be suppressed by appending
the option \*(Aq,q\*(Aq to POWERMODE (like \*(Aq\-n standby,q\*(Aq).
This prevents a laptop disk from spinning up due to this message.
.Sp
Both \*(Aq,N\*(Aq and \*(Aq,q\*(Aq can be specified together.
.TP
.B \-T TYPE
Specifies how tolerant
\fBsmartd\fP
should be of SMART command failures. The valid arguments to this
Directive are:
.Sp
.I normal
\- do not try to monitor the disk if a mandatory SMART command fails, but
continue if an optional SMART command fails. This is the default.
.Sp
.I permissive
\- try to monitor the disk even if it appears to lack SMART
capabilities. This may be required for some old disks (prior to
ATA-3 revision 4) that implemented SMART before the SMART standards
were incorporated into the ATA/ATAPI Specifications.
[Please see the \fBsmartctl \-T\fP command-line option.]
.TP
.B \-o VALUE
[ATA only] Enables or disables SMART Automatic Offline Testing when
\fBsmartd\fP
starts up and has no further effect. The valid arguments to this
Directive are \fIon\fP and \fIoff\fP.
.Sp
The delay between tests is vendor-specific, but is typically four
hours.
.Sp
Note that SMART Automatic Offline Testing is \fBnot\fP part of the ATA
Specification. Please see the
.B smartctl \-o
command-line option documentation for further information about this
feature.
.TP
.B \-S VALUE
Enables or disables Attribute Autosave when \fBsmartd\fP
starts up and has no further effect. The valid arguments to this
Directive are \fIon\fP and \fIoff\fP. Also affects SCSI devices.
[Please see the \fBsmartctl \-S\fP command-line option.]
.TP
.B \-H
[ATA] Check the health status of the disk with the SMART RETURN
STATUS command.
If this command reports a failing health status, then disk
failure is predicted in less than 24 hours, and a message at loglevel
.B \*(AqLOG_CRIT\*(Aq
will be logged to syslog. [Please see the
.B smartctl \-H
command-line option.]
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
[NVMe] Checks the "Critical Warning" byte from the SMART/Health
Information log.
If any warning bit is set, a message at loglevel \fB\*(AqLOG_CRIT\*(Aq\fP
will be logged to syslog.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-l TYPE
Reports increases in the number of errors in one of three SMART logs. The
valid arguments to this Directive are:
.Sp
.I error
\- [ATA] report if the number of ATA errors reported in the Summary SMART
error log has increased since the last check.
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I error
\- [NVMe] report if the "Number of Error Information Log Entries" from the
SMART/Health Information log has increased since the last check.
.br
[NEW EXPERIMENTAL SMARTD 7.4 FEATURE]
This will only be logged as LOG_CRIT if at least one of the new errors is
still present in the Error Information log and its status indicates a
device related error.
Up to eight of the most recent of these errors are logged as LOG_INFO then.
This is useful because the NVMe Error Information log is not persistent
across power cycles or device resets.
.br
If all new errors are either no longer present in the log or are not device
related (e.g. invalid command, invalid field in command, ...), a LOG_INFO
message is generated instead.
This avoids misleading warnings if the operating system issues unsupported
commands and the device firmware also logs these kind of errors.
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I xerror
\- [ATA] report if the number of ATA errors reported in the Extended
Comprehensive SMART error log has increased since the last check.
.Sp
If both \*(Aq\-l error\*(Aq and \*(Aq\-l xerror\*(Aq are specified, smartd
checks the maximum of both values.
.Sp
[Please see the \fBsmartctl \-l xerror\fP command-line option.]
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I xerror
\- [NVMe] same as \*(Aq\-l error\*(Aq.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I selftest
\- report if the number of failed tests reported in the SMART
Self-Test Log has increased since the last check, or if the timestamp
associated with the most recent failed test has increased. Note that
such errors will \fBonly\fP be logged if you run self-tests on the
disk (and it fails a test!). Self-Tests can be run automatically by
\fBsmartd\fP: please see the \*(Aq\-s\*(Aq Directive below.
Self-Tests can also be run manually by using the \*(Aq\-t short\*(Aq
and \fB\*(Aq\-t\ long\*(Aq\fP options of \fBsmartctl\fP and the results of
the testing can be observed using the \fBsmartctl \*(Aq\-l\ selftest\*(Aq\fP
command-line option.
[Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-line
options.]
.Sp
[ATA only] Failed self-tests outdated by a newer successful extended
self-test are ignored. The warning email counter is reset if the
number of failed self tests dropped to 0. This typically happens when
an extended self-test is run after all bad sectors have been reallocated.
.Sp
.I offlinests[,ns]
\- [ATA only] report if the Offline Data Collection status has changed
since the last check. The report will be logged as LOG_CRIT if the new
status indicates an error. With some drives the status often changes,
therefore \*(Aq\-l offlinests\*(Aq is not enabled by \*(Aq\-a\*(Aq Directive.
.\" %IF NOT OS Cygwin Windows
.\"! Appending ',ns' (no standby) to this directive is not implemented
.\"! on OS_MAN_FILTER.
.\" %ENDIF NOT OS Cygwin Windows
.\" %IF OS Cygwin Windows
.Sp
[Windows and Cygwin only] If \*(Aq,ns\*(Aq (no standby) is appended to this
directive, smartd disables system auto standby as long as an Offline
Data Collection is in progress. See \*(Aq\-l selfteststs,ns\*(Aq below.
.\" %ENDIF OS Cygwin Windows
.Sp
.I selfteststs[,ns]
\- [ATA only] report if the Self-Test execution status has changed
since the last check. The report will be logged as LOG_CRIT if the new
status indicates an error.
.\" %IF NOT OS Cygwin Windows
.\"! Appending ',ns' (no standby) to this directive is not implemented
.\"! on OS_MAN_FILTER.
.\" %ENDIF NOT OS Cygwin Windows
.\" %IF OS Cygwin Windows
.Sp
[Windows and Cygwin only] If \*(Aq,ns\*(Aq (no standby) is appended to this
directive, smartd disables system auto standby as long as a Self-Test
is in progress. This prevents that a Self-Test is aborted because the
OS sets the system to a standby/sleep mode when idle. Smartd check
interval (\*(Aq\-i\*(Aq option) should be shorter than the configured idle
timeout. Auto standby is not disabled if the system is running on
battery.
.\" %ENDIF OS Cygwin Windows
.Sp
.I scterc,READTIME,WRITETIME
\- [ATA only] sets the SCT Error Recovery Control settings to the specified
values (deciseconds) when \fBsmartd\fP starts up and has no further effect.
Values of 0 disable the feature, other values less than 65 are probably
not supported. For RAID configurations, this is typically set to
70,70 deciseconds.
[Please see the \fBsmartctl \-l scterc\fP command-line option.]
.TP
.B \-e NAME[,VALUE]
Sets non-SMART device settings when \fBsmartd\fP starts up and has no
further effect.
[Please see the \fBsmartctl \-\-set\fP command-line option.]
Valid arguments are:
.Sp
.I aam,[N|off]
\- [ATA only] Sets the Automatic Acoustic Management (AAM) feature.
.Sp
.I apm,[N|off]
\- [ATA only] Sets the Advanced Power Management (APM) feature.
.Sp
.I lookahead,[on|off]
\- [ATA only] Sets the read look-ahead feature.
.Sp
.I security-freeze
\- [ATA only] Sets ATA Security feature to frozen mode.
.Sp
.I standby,[N|off]
\- [ATA only] Sets the standby (spindown) timer and places the drive in the
IDLE mode.
.Sp
.I wcache,[on|off]
\- [ATA only] Sets the volatile write cache feature.
.Sp
.I dsn,[on|off]
\- [ATA only] Sets the DSN feature.
.TP
.B \-s REGEXP
Run Self-Tests or Offline Immediate Tests, at scheduled times. A
Self- or Offline Immediate Test will be run at the end of periodic
device polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fP
match the extended regular expression \fBREGEXP\fP. Here:
.RS 7
.IP \fBT\fP 4
is the type of the test. The values that \fBsmartd\fP will try to
match (in turn) are: \*(AqL\*(Aq for a \fBL\fPong Self-Test, \*(AqS\*(Aq for a
\fBS\fPhort Self-Test, \*(AqC\*(Aq for a \fBC\fPonveyance Self-Test (ATA
only), and \*(AqO\*(Aq for an \fBO\fPffline Immediate Test (ATA only). As
soon as a match is found, the test will be started and no additional
matches will be sought for that device and that polling cycle.
.Sp
To run scheduled Selective Self-Tests, use \*(Aqn\*(Aq for \fBn\fPext span,
\*(Aqr\*(Aq to \fBr\fPedo last span, or \*(Aqc\*(Aq to \fBc\fPontinue with
next span or redo last span based on status of last test.
The LBA range is based on the first span from the last test.
See the \fBsmartctl \-t select,[next|redo|cont]\fP options for
further info.
.Sp
Some disks (e.g.\& WD) do not preserve the selective self test log across
power cycles. If state persistence (\*(Aq\-s\*(Aq option) is enabled, the last
test span is preserved by smartd and used if (and only if) the selective
self test log is empty.
.IP \fBMM\fP 4
is the month of the year, expressed with two decimal digits. The
range is from 01 (January) to 12 (December) inclusive. Do \fBnot\fP
use a single decimal digit or the match will always fail!
.IP \fBDD\fP 4
is the day of the month, expressed with two decimal digits. The
range is from 01 to 31 inclusive. Do \fBnot\fP
use a single decimal digit or the match will always fail!
.IP \fBd\fP 4
is the day of the week, expressed with one decimal digit. The
range is from 1 (Monday) to 7 (Sunday) inclusive.
.IP \fBHH\fP 4
is the hour of the day, written with two decimal digits, and given in
hours after midnight. The range is 00 (midnight to just before 1 am)
to 23 (11pm to just before midnight) inclusive. Do \fBnot\fP use a
single decimal digit or the match will always fail!
.RE
.\" The following two lines define a non-existent option.
.\" This resets the margin to the level prior to the '.RS ... .RE' block.
.TP
.B \&
If the regular expression contains substrings of the form \fB:NNN\fP
or \fB:NNN-LLL\fP, where NNN and LLL are three decimal digits, staggered
tests are enabled.
Then a test will also be run if all 16 (or 20) characters of the string
\fBT/MM/DD/d/HH:NNN\fP (or \fBT/MM/DD/d/HH:NNN-LLL\fP) match the regular
expression.
This check is done for up to seven \fB:NNN\fP or \fB:NNN-LLL\fP found in
the regular expression.
The time used for the check is adjusted to the past such that tests of
the first drive are not delayed, tests of the second drive are delayed
by NNN hours, tests of the third drive are delayed by 2*NNN hours, and
so on.
.br
If LLL is also specified, delays are limited to LLL hours by calculating
each individual delay as:
.br
\*(Aq((DRIVE_INDEX * NNN) mod (LLL + 1))\*(Aq.
.Sp
Some examples follow. In reading these, keep in mind that in extended
regular expressions a dot \fB\*(Aq.\*(Aq\fP matches any single character, and
a parenthetical expression such as \fB\*(Aq(A|B|C)\*(Aq\fP denotes any one
of the three possibilities \fBA\fP, \fBB\fP, or \fBC\fP.
.Sp
To schedule a short Self-Test between 2\(en3 am every morning, use:
.br
\fB \-s S/../.././02\fP
.br
To schedule a long Self-Test between 4\(en5 am every Sunday morning, use:
.br
\fB \-s L/../../7/04\fP
.br
To enable staggered tests with delays in three hour steps, use:
.br
\fB \-s L/../../7/04:003\fP
.br
To enable staggered tests with delays 0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8,
0, ... hours, use:
.br
\fB \-s L/../../7/04:003-010\fP
.br
To enable staggered tests with delays 0, 1, 2, ..., 9, 10, 0, ... hours,
use:
.br
\fB \-s L/../../7/04:001-010\fP
.br
To schedule a long Self-Test between 10\(en11 pm on the first and
fifteenth day of each month, use:
.br
\fB \-s L/../(01|15)/./22\fP
.br
To schedule an Offline Immediate test after every midnight, 6 am,
noon, and 6 pm, plus a Short Self-Test daily at 1\(en2 am and a Long
Self-Test every Saturday at 3\(en4 am, use:
.br
\fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP
.br
To enable staggered Long Self-Tests with delays in three hour steps,
use:
.br
\fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03:003)\fP
.br
If Long Self-Tests of a large disks take longer than the system uptime,
a full disk test can be performed by several Selective Self-Tests.
To setup a full test of a 1 TB disk within 20 days (one 50 GB span
each day), run this command once:
.nf
smartctl \-t select,0\-99999999 /dev/sda
.fi
To run the next test spans on Monday\(enFriday between 12\(en13 am, run smartd
with this directive:
.br
\fB \-s n/../../[1\-5]/12\fP
.Sp
Scheduled tests are run immediately following the regularly-scheduled
device polling, if the current local date, time, and test type, match
\fBREGEXP\fP. By default the regularly-scheduled device polling
occurs every thirty minutes after starting \fBsmartd\fP. Take caution
if you use the \*(Aq\-i\*(Aq option to make this polling interval more than
sixty minutes: the poll times may fail to coincide with any of the
testing times that you have specified with \fBREGEXP\fP. In this case
the test will be run following the next device polling.
.Sp
Before running an offline or self-test, \fBsmartd\fP checks to be sure
that a self-test is not already running. If a self-test \fBis\fP
already running, then this running self test will \fBnot\fP be
interrupted to begin another test.
.Sp
\fBsmartd\fP will not attempt to run \fBany\fP type of test if another
test was already started or run in the same hour.
.Sp
To avoid performance problems during system boot, \fBsmartd\fP will
not attempt to run any scheduled tests following the very first
device polling (unless \*(Aq\-q onecheck\*(Aq is specified).
.Sp
Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG.