| 183 | == 3.3. S.M.A.R.T and such == |
| 184 | |
| 185 | Disks' SMART can be monitored trough an SCSI generic device. |
| 186 | |
| 187 | You need to make sure SCSI generic device driver is loaded (and will be loaded at boot). On Debian based system, simply run: |
| 188 | {{{ |
| 189 | modprobe sg |
| 190 | echo sg >> /etc/modules |
| 191 | }}} |
| 192 | |
| 193 | You can now try to run smartctl against one of the scsi generic devices (you will have to figure out by yourself which one to use): |
| 194 | {{{ |
| 195 | server:~# smartctl -a /dev/sg1 |
| 196 | smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen |
| 197 | Home page is http://smartmontools.sourceforge.net/ |
| 198 | |
| 199 | Device: SEAGATE ST3600057SS Version: ES64 |
| 200 | Serial number: 6SL0D4C3 |
| 201 | Device type: disk |
| 202 | Transport protocol: SAS |
| 203 | Local Time is: Wed Feb 22 23:57:28 2012 CET |
| 204 | Device supports SMART and is Enabled |
| 205 | Temperature Warning Disabled or Not Supported |
| 206 | SMART Health Status: OK |
| 207 | |
| 208 | Current Drive Temperature: 32 C |
| 209 | Drive Trip Temperature: 68 C |
| 210 | |
| 211 | [...] |
| 212 | }}} |
| 213 | |
| 214 | You can now edit '''/etc/smartd.conf''' and comment the "DEVICESCAN" line and add specific configuration for each drive, like the example below: |
| 215 | {{{ |
| 216 | # Monitor LSI's disk SMART through SCSI generic |
| 217 | /dev/sg1 -d removable -a -s L/../../3/02 |
| 218 | /dev/sg2 -d removable -a -s L/../../3/03 |
| 219 | }}} |
| 220 | |
| 221 | Restart smartd and check syslog... |
| 222 | {{{ |
| 223 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg1, opened |
| 224 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg1, is SMART capable. Adding to "monitor" list. |
| 225 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg2, opened |
| 226 | Feb 23 00:00:01 server smartd[29653]: Device: /dev/sg2, is SMART capable. Adding to "monitor" list. |
| 227 | Feb 23 00:00:01 server smartd[29653]: Monitoring 0 ATA and 2 SCSI devices |
| 228 | }}} |
| 229 | |