smartd.conf.j2 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. # /etc/smartd.conf
  6. # Configuration file for smartd. Use "man smartd.conf" for more information.
  7. # Home page is: http://smartmontools.sourceforge.net
  8. # smartd will re-read the configuration file if it receives a HUP
  9. # signal
  10. # The file gives a list of devices to monitor using smartd, with one
  11. # device per line. Text after a hash (#) is ignored, and you may use
  12. # spaces and tabs for white space. You may use '\' to continue lines.
  13. # You can usually identify which hard disks are on your system by
  14. # looking in /proc/ide and in /proc/scsi.
  15. # The word DEVICESCAN will cause any remaining lines in this
  16. # configuration file to be ignored: it tells smartd to scan for all
  17. # ATA and SCSI devices. DEVICESCAN may be followed by any of the
  18. # Directives listed below, which will be applied to all devices that
  19. # are found. Most users should comment out DEVICESCAN and explicitly
  20. # list the devices that they wish to monitor.
  21. #DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
  22. {% if smartd_disks is defined %}
  23. {% for disk in smartd_disks %}
  24. {{ disk }} -H -l error -l selftest -t -f -m root -M exec /usr/share/smartmontools/smartd-runner -s (S/../.././02|L/../../6/03)
  25. {% endfor %}
  26. {% else %}
  27. DEVICESCAN -H -l error -l selftest -t -f -m root -M exec /usr/share/smartmontools/smartd-runner -s (S/../.././02|L/../../6/03)
  28. {% endif %}
  29. # Alternative setting to ignore temperature and power-on hours reports
  30. # in syslog.
  31. #DEVICESCAN -I 194 -I 231 -I 9
  32. # Alternative setting to report more useful raw temperature in syslog.
  33. #DEVICESCAN -R 194 -R 231 -I 9
  34. # Alternative setting to report raw temperature changes >= 5 Celsius
  35. # and min/max temperatures.
  36. #DEVICESCAN -I 194 -I 231 -I 9 -W 5
  37. # First (primary) ATA/IDE hard disk. Monitor all attributes, enable
  38. # automatic online data collection, automatic Attribute autosave, and
  39. # start a short self-test every day between 2-3am, and a long self test
  40. # Saturdays between 3-4am.
  41. #/dev/hda -a -o on -S on -s (S/../.././02|L/../../6/03)
  42. # Monitor SMART status, ATA Error Log, Self-test log, and track
  43. # changes in all attributes except for attribute 194
  44. #/dev/hdb -H -l error -l selftest -t -I 194
  45. # Monitor all attributes except normalized Temperature (usually 194),
  46. # but track Temperature changes >= 4 Celsius, report Temperatures
  47. # >= 45 Celsius and changes in Raw value of Reallocated_Sector_Ct (5).
  48. # Send mail on SMART failures or when Temperature is >= 55 Celsius.
  49. #/dev/hdc -a -I 194 -W 4,45,55 -R 5 -m admin@example.com
  50. # An ATA disk may appear as a SCSI device to the OS. If a SCSI to
  51. # ATA Translation (SAT) layer is between the OS and the device then
  52. # this can be flagged with the '-d sat' option. This situation may
  53. # become common with SATA disks in SAS and FC environments.
  54. # /dev/sda -a -d sat
  55. # A very silent check. Only report SMART health status if it fails
  56. # But send an email in this case
  57. #/dev/hdc -H -C 0 -U 0 -m admin@example.com
  58. # First two SCSI disks. This will monitor everything that smartd can
  59. # monitor. Start extended self-tests Wednesdays between 6-7pm and
  60. # Sundays between 1-2 am
  61. #/dev/sda -d scsi -s L/../../3/18
  62. #/dev/sdb -d scsi -s L/../../7/01
  63. # Monitor 4 ATA disks connected to a 3ware 6/7/8000 controller which uses
  64. # the 3w-xxxx driver. Start long self-tests Sundays between 1-2, 2-3, 3-4,
  65. # and 4-5 am.
  66. # NOTE: starting with the Linux 2.6 kernel series, the /dev/sdX interface
  67. # is DEPRECATED. Use the /dev/tweN character device interface instead.
  68. # For example /dev/twe0, /dev/twe1, and so on.
  69. #/dev/sdc -d 3ware,0 -a -s L/../../7/01
  70. #/dev/sdc -d 3ware,1 -a -s L/../../7/02
  71. #/dev/sdc -d 3ware,2 -a -s L/../../7/03
  72. #/dev/sdc -d 3ware,3 -a -s L/../../7/04
  73. # Monitor 2 ATA disks connected to a 3ware 9000 controller which
  74. # uses the 3w-9xxx driver (Linux, FreeBSD). Start long self-tests Tuesdays
  75. # between 1-2 and 3-4 am.
  76. #/dev/twa0 -d 3ware,0 -a -s L/../../2/01
  77. #/dev/twa0 -d 3ware,1 -a -s L/../../2/03
  78. # Monitor 2 SATA (not SAS) disks connected to a 3ware 9000 controller which
  79. # uses the 3w-sas driver (Linux, FreeBSD). Start long self-tests Tuesdays
  80. # between 1-2 and 3-4 am.
  81. #/dev/twl0 -d 3ware,0 -a -s L/../../2/01
  82. #/dev/twa0 -d 3ware,1 -a -s L/../../2/03
  83. # Same as above for Windows. Option '-d 3ware,N' is not necessary,
  84. # disk (port) number is specified in device name.
  85. # NOTE: On Windows, DEVICESCAN works also for 3ware controllers.
  86. #/dev/hdc,0 -a -s L/../../2/01
  87. #/dev/hdc,1 -a -s L/../../2/03
  88. #
  89. # Monitor 2 disks connected to the first HP SmartArray controller which
  90. # uses the cciss driver. Start long tests on Sunday nights and short
  91. # self-tests every night and send errors to root
  92. #/dev/cciss/c0d0 -d cciss,0 -a -s (L/../../7/02|S/../.././02) -m root
  93. #/dev/cciss/c0d0 -d cciss,1 -a -s (L/../../7/03|S/../.././03) -m root
  94. # Monitor 3 ATA disks directly connected to a HighPoint RocketRAID. Start long
  95. # self-tests Sundays between 1-2, 2-3, and 3-4 am.
  96. #/dev/sdd -d hpt,1/1 -a -s L/../../7/01
  97. #/dev/sdd -d hpt,1/2 -a -s L/../../7/02
  98. #/dev/sdd -d hpt,1/3 -a -s L/../../7/03
  99. # Monitor 2 ATA disks connected to the same PMPort which connected to the
  100. # HighPoint RocketRAID. Start long self-tests Tuesdays between 1-2 and 3-4 am
  101. #/dev/sdd -d hpt,1/4/1 -a -s L/../../2/01
  102. #/dev/sdd -d hpt,1/4/2 -a -s L/../../2/03
  103. # HERE IS A LIST OF DIRECTIVES FOR THIS CONFIGURATION FILE.
  104. # PLEASE SEE THE smartd.conf MAN PAGE FOR DETAILS
  105. #
  106. # -d TYPE Set the device type: ata, scsi, marvell, removable, 3ware,N, hpt,L/M/N
  107. # -T TYPE set the tolerance to one of: normal, permissive
  108. # -o VAL Enable/disable automatic offline tests (on/off)
  109. # -S VAL Enable/disable attribute autosave (on/off)
  110. # -n MODE No check. MODE is one of: never, sleep, standby, idle
  111. # -H Monitor SMART Health Status, report if failed
  112. # -l TYPE Monitor SMART log. Type is one of: error, selftest
  113. # -f Monitor for failure of any 'Usage' Attributes
  114. # -m ADD Send warning email to ADD for -H, -l error, -l selftest, and -f
  115. # -M TYPE Modify email warning behavior (see man page)
  116. # -s REGE Start self-test when type/date matches regular expression (see man page)
  117. # -p Report changes in 'Prefailure' Normalized Attributes
  118. # -u Report changes in 'Usage' Normalized Attributes
  119. # -t Equivalent to -p and -u Directives
  120. # -r ID Also report Raw values of Attribute ID with -p, -u or -t
  121. # -R ID Track changes in Attribute ID Raw value with -p, -u or -t
  122. # -i ID Ignore Attribute ID for -f Directive
  123. # -I ID Ignore Attribute ID for -p, -u or -t Directive
  124. # -C ID Report if Current Pending Sector count non-zero
  125. # -U ID Report if Offline Uncorrectable count non-zero
  126. # -W D,I,C Monitor Temperature D)ifference, I)nformal limit, C)ritical limit
  127. # -v N,ST Modifies labeling of Attribute N (see man page)
  128. # -a Default: equivalent to -H -f -t -l error -l selftest -C 197 -U 198
  129. # -F TYPE Use firmware bug workaround. Type is one of: none, samsung
  130. # -P TYPE Drive-specific presets: use, ignore, show, showall
  131. # # Comment: text after a hash sign is ignored
  132. # \ Line continuation character
  133. # Attribute ID is a decimal integer 1 <= ID <= 255
  134. # except for -C and -U, where ID = 0 turns them off.
  135. # All but -d, -m and -M Directives are only implemented for ATA devices
  136. #
  137. # If the test string DEVICESCAN is the first uncommented text
  138. # then smartd will scan for devices /dev/hd[a-l] and /dev/sd[a-z]
  139. # DEVICESCAN may be followed by any desired Directives.