Tengo un servidor con tres unidades idénticas de 3 TB SATA / 600: /dev/sda
, /dev/sdb
, /dev/sdc
. Las unidades están particionadas, utilizando GPT con tres particiones cada una:
- 1 MB: partición reservada para el cargador de arranque
- 1 GB: RAID1 / dev / md0 (ext2 (/ boot))
- 3 TB: RAID1 / dev / md1 (volumen cifrado (LVM (grupo de volúmenes (Swap, /, / etc, / home ...))))
Una de las tres unidades es un repuesto dinámico y las otras dos están activas en los conjuntos RAID. Funciona bien y puedo arrancar después de desconectar cualquier HDD. Quiero usar smartd (parte de smartmontools) para monitorear el estado de las unidades e informar errores a syslog (que monitorizo usando logcheck ). Este servidor debe tener la mayor disponibilidad posible, pero es aceptable que el rendimiento disminuya durante las pruebas.
Aquí está la salida de smartctl -a /dev/sda
:
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: WDC WD30EZRX-00MMMB0
Serial Number: WD-WMAWZ0412093
LU WWN Device Id: 5 0014ee 2b19fbdcd
Firmware Version: 80.00A80
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Fri Sep 27 15:37:25 2013 CEST
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: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
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: (50280) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
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: ( 255) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x3035) 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 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 148 148 021 Pre-fail Always - 9575
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 95
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 820
10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 93
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 65
193 Load_Cycle_Count 0x0032 196 196 000 Old_age Always - 12824
194 Temperature_Celsius 0x0022 119 116 000 Old_age Always - 33
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0
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 Short offline Completed without error 00% 787 -
# 2 Extended offline Completed without error 00% 727 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
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.
Parece que las pruebas fuera de línea son compatibles. Cuando emito smartctl -o on
, smartctl -c
muestra que Offline data collection status
se ha establecido en (0x82)
. Si emito smartctl -o off
el mismo valor se convierte (0x02)
.
He creado smartd para poner en marcha con el servidor mediante el establecimiento start_smartd=yes
de /etc/default/smartmontools
. ¿Cómo recomendaría que configure smartd editando /etc/smartd.conf
para este servidor? Describa cada parámetro que usa y por qué lo usa de la manera que lo hace.
Agregaré mi configuración actual como respuesta. Siéntase libre de usarlo como base y mejorarlo en su propia respuesta. ¡Una mejor descripción usando la misma configuración también sería una mejora!