| 133 | == 3.3. S.M.A.R.T and such == |
| 134 | |
| 135 | Disks' SMART can be monitored trough an SCSI generic device. |
| 136 | |
| 137 | You need to make sure SCSI generic device driver is loaded (and will be loaded at boot). On Debian based system, simply run: |
| 138 | {{{ |
| 139 | modprobe sg |
| 140 | echo sg >> /etc/modules |
| 141 | }}} |
| 142 | |
| 143 | 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): |
| 144 | {{{ |
| 145 | server:~# smartctl -a /dev/sg1 |
| 146 | smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen |
| 147 | Home page is http://smartmontools.sourceforge.net/ |
| 148 | |
| 149 | Device: SEAGATE ST3600057SS Version: ES64 |
| 150 | Serial number: 6SL0D4C3 |
| 151 | Device type: disk |
| 152 | Transport protocol: SAS |
| 153 | Local Time is: Wed Feb 22 23:57:28 2012 CET |
| 154 | Device supports SMART and is Enabled |
| 155 | Temperature Warning Disabled or Not Supported |
| 156 | SMART Health Status: OK |
| 157 | |
| 158 | Current Drive Temperature: 32 C |
| 159 | Drive Trip Temperature: 68 C |
| 160 | |
| 161 | [...] |
| 162 | }}} |
| 163 | |
| 164 | You can now edit '''/etc/smartd.conf''' and comment the "DEVICESCAN" line and add specific configuration for each drive, like the example below: |
| 165 | {{{ |
| 166 | # Monitor LSI's disk SMART through SCSI generic |
| 167 | /dev/sg1 -d removable -a -s L/../../3/02 |
| 168 | /dev/sg2 -d removable -a -s L/../../3/03 |
| 169 | }}} |
| 170 | |
| 171 | Restart smartd and check syslog... |
| 172 | {{{ |
| 173 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg1, opened |
| 174 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg1, is SMART capable. Adding to "monitor" list. |
| 175 | Feb 23 00:00:00 server smartd[29653]: Device: /dev/sg2, opened |
| 176 | Feb 23 00:00:01 server smartd[29653]: Device: /dev/sg2, is SMART capable. Adding to "monitor" list. |
| 177 | Feb 23 00:00:01 server smartd[29653]: Monitoring 0 ATA and 2 SCSI devices |
| 178 | }}} |