Para que esto funcione tanto la placa base como el disco duro deben tener soporte de SMART, la mayoría lo tienen pero no todos, además es necesario habilitar en la BIOS de la placa base que el soporte para SMART, suponiendo que todo eso este hecho es bastante sencillo, lo primero es instalar las herramientas de monitorización SMART, lo podemos hacer con el siguiente comando:
aptitude install smartmontools
Antes de empezar tenemos que saber cual es nuestro disco duro, la mejor manera es ver las particiones disponibles con "fdisk", como se ve a continuación, en este caso solo hay un disco "/dev/sda" con dos particiones "/dev/sda1" y "/dev/sda2":
servidor:~# fdisk -l
Disk /dev/sda: 320.0 GB, 320071851520 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ea5bb
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38791 311588676 83 Linux
/dev/sda2 38792 38913 979965 82 Linux swap / Solaris
Una vez instalado podemos ver los parámetros de los disco duro con el comando "smartctl", también podremos activar SMART si no lo estuviera para algún disco con el comando "smartctl -s on -a /dev/sda", o ver su estado con "smartctl -a /dev/sda":
servidor:~# smartctl -a /dev/sda
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: SAMSUNG HM320JI
Serial Number: S16LJ10Q712243
Firmware Version: 2SS00_01
User Capacity: 320,071,851,520 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 0
Local Time is: Sun Dec 6 21:30:49 2009 CET
==> WARNING: May need -F samsung or -F samsung2 enabled; see manual for details.
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 121) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 121) minutes.
SCT capabilities: (0x003f) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 100 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0007 252 252 025 Pre-fail Always - 2812
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 17
5 Reallocated_Sector_Ct 0x0033 093 093 010 Pre-fail Always - 68
7 Seek_Error_Rate 0x000f 252 252 051 Pre-fail Always - 0
8 Seek_Time_Performance 0x0024 252 252 015 Old_age Offline - 0
9 Power_On_Hours 0x0032 252 252 000 Old_age Always - 413
10 Spin_Retry_Count 0x0032 252 252 051 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 11
191 G-Sense_Error_Rate 0x0032 252 252 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 4
194 Temperature_Celsius 0x0022 097 082 000 Old_age Always - 47 (Lifetime Min/Max 19/52)
195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 0
196 Reallocated_Event_Count 0x0032 252 252 000 Old_age Always - 0
197 Current_Pending_Sector 0x0012 252 252 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 252 252 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0036 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x000a 100 100 000 Old_age Always - 0
201 Soft_Read_Error_Rate 0x0032 252 252 000 Old_age Always - 0
223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 77
225 Load_Cycle_Count 0x0032 097 097 000 Old_age Always - 33276
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 293 -
SMART Selective Self-Test Log Data Structure Revision Number (0) should be 1
SMART Selective self-test log data structure revision number 0
Warning: ATA Specification requires selective self-test log data structure revision number = 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Completed [00% left] (0-65535)
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Si solo queremos ver la temperatura del disco es muy fácil:
servidor:~# hddtemp /dev/sda
/dev/sda: SAMSUNG HM320JI: 47°C
Ahora habilitaremos el demonio "smartd" para enterarnos si hay algún problema con el disco duro, para ello debemos editar el fichero "/etc/default/smartmontools" y descomentar la línea "start_smartd=yes":
# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
# This is a POSIX shell fragment
# List of devices you want to explicitly enable S.M.A.R.T. for
# Not needed (and not recommended) if the device is monitored by smartd
#enable_smart="/dev/hda /dev/hdb"
# uncomment to start smartd on system startup
start_smartd=yes
# uncomment to pass additional options to smartd on startup
smartd_opts="--interval=1800"
Con esto el demonio podrá arrancar, ya tiene una configuración básica por defecto, pero podremos configurarlo más a nuestro gusto en el fichero " /etc/smartd.conf" para que nos mande por ejemplo un correo si detecta algún problema, el propio fichero esta muy bien auto documentado de modo que dejamos a cada uno la decisión de como personalizar su configuración.
Artículo siguiente:
Guía de instalación de Servidor con Linux Debian Lenny al mínimo (Parte IV: Servidor de ficheros)
Comentarios
Registrarse
#0 Ghost el 06-12-2009 a las 23:31
Excelente guía, es un tema bastante desconocido incluso para muchos usuarios de Linux, y es algo muy útil, sobre todo para cuidar la salud de nuestros componentes. Enhorabuena Alarido!
#1 SoTA el 07-12-2009 a las 15:06
Desguazando Debian paso a paso jeje.
Te lo estás currando mucho tio, norawenas.
Decir que aunque sea mucha letra, es sencillo de hacer y bastante rápido, sobre todo con lo bien explicado que está.
Un saludo.
#2 Zoltelder el 07-12-2009 a las 18:26
hay mucha gente que pregunta como hacer OC en linux. Por aquí puede ser un punto para empezar
#3 Ghost el 07-12-2009 a las 21:49
El problema de Linux es que no conozco ninguna herramienta para probar la estabilidad, de hecho en el curro tengo el Core i7 overclockeado a 3Ghz y como nunca se ha ostiado nose sería estable con un Prime95, OCCT o similar.
Lo único que tengo es lo que ha mostrado cómo hacer Alarido y ya está.
#4 petete el 12-12-2009 a las 22:37
Buen trabajo!!
#5 lily.moon7 el 02-12-2010 a las 15:27
Este trabajo es verdaderamente una guía, me ha sido de gran utilidad, hoy pondré en práctica la tercera parte...
Gracias =)