|
smartd 데몬을 이용한 HDD Disk 점검 smartd 데몬은 서버에 장착된 하드디스크의 상태를 사전에 감지하여 데이터 손실 위험을 예방하는 도구이다. 사용은 smartctl 이란 명령을 통해 가능하다. 기본적으로 디스크의 전반적인 상태를 확인하는 방법이다. smartctl -a <device_name> [root@alang03 ~]# smartctl -a /dev/sdc smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Device Model: ST31000528AS Serial Number: 9VPA5HSS Firmware Version: CC46 User Capacity: 1,000,204,886,016 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: ATA-8-ACS revision 4 Local Time is: Tue May 22 15:08:19 2012 KST 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: FAILED! Drive failure expected in less than 24 hours. SAVE ALL DATA. See vendor-specific Attribute list for failed Attributes. 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: ( 73) The previous self-test completed having a test element that failed and the test element that failed is not known. Total time to complete Offline data collection: ( 609) 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: ( 1) minutes. Extended self-test routinerecommended polling time: ( 177) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x103f) SCT Status supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 10 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 115 099 006 Pre-fail Always - 86452274 3 Spin_Up_Time 0x0003 095 095 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 94 5 Reallocated_Sector_Ct 0x0033 026 026 036 Pre-fail Always FAILING_NOW 3064 7 Seek_Error_Rate 0x000f 068 060 030 Pre-fail Always - 7295178 9 Power_On_Hours 0x0032 086 086 000 Old_age Always - 12572 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 46 183 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0 184 Unknown_Attribute 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0 188 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 067 059 045 Old_age Always - 33 (Lifetime Min/Max 30/35) 194 Temperature_Celsius 0x0022 033 041 000 Old_age Always - 33 (0 7 0 0) 195 Hardware_ECC_Recovered 0x001a 047 009 000 Old_age Always - 86452274 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 64196876185982 241 Unknown_Attribute 0x0000 100 253 000 Old_age Offline - 2277322949 242 Unknown_Attribute 0x0000 100 253 000 Old_age Offline - 2355915261 *********************************************************************************************** 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: unknown failure 90% 12544 - # 2 Extended offline Completed: unknown failure 90% 12544 - # 3 Extended offline Completed: unknown failure 90% 12544 - 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. 로그내용 중 ****** 로 표시된 구간의 정보를 통해 분석이 가능하다. 위 로그 상태를 보면 해당 디스크에 문제가 있다는 내용이다. SMART overall-health self-assessment test result: FAILED! Drive failure expected in less than 24 hours. SAVE ALL DATA. See vendor-specific Attribute list for failed Attributes. 위 내용을 보면 자체 테스트에서 문제가 발생했으니, 데이터를 빨리 백업하란 얘기가 나온다. 만일 전체 내용 중 문제가 있는 부분만 확인하고자 한다면 아래 명령을 통해 가능하다. [root@alang03 ~]# smartctl -q errorsonly -H -l selftest -l error /dev/sdc ---------------------------------------------------------------------------------------------- SMART overall-health self-assessment test result: FAILED! Drive failure expected in less than 24 hours. SAVE ALL DATA. Failed Attributes: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 5 Reallocated_Sector_Ct 0x0033 026 026 036 Pre-fail Always FAILING_NOW 3064 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed: unknown failure 90% 12544 - # 2 Extended offline Completed: unknown failure 90% 12544 - # 3 Extended offline Completed: unknown failure 90% 12544 - ------------------------------------------------------------------------------------------------ 정상적인 상황에서는 위 명령을 실행하면 아무런 메세지가 나타나지 않는다. 만일 위 명령을 수행했을때 어떤 메세지가 나온다면, 한번쯤 해당 디스크 상태를 의심해 봐야 한다. 문제 로그 중 "Reallocated_Sector_Ct"의 내용은 섹터에 문제가 발생하여 스페어 영역으로 3064개의 섹터를 옮겼다는 의미이다. 이렇게 문제가 발생하면..점점 디스크 오류가 잦아지다가, 언젠가는 디스크 인식이 안되는등의 문제가 발생할 수 있다. 사전에 백업을 하거나 다른 디스크로 교체하는 것을 권장한다. SMART 속성값의 의미에 대해 살펴보자.. Raw_Read_Error_Rate 디스크 표면으로 부터 데이터를 읽는 과정에서 문제가 있을때(주로 물리적인 충격으로 유발) 정상적인 디스크라면 0 값이겠지만..어느정도의 충격은 있을 수 있기 때문에 굳이 0이 아니더라도 크게 염려하진 않아도 될듯.. Sping_up_Time 플레터 회전에 제로 rpm 에서 최대 rpm에 도달하는 평균 시간 Start_Stop_Count 플레터가 회전하고 정지한 횟수 Reallocated_Sector_Ct 섹터에 문제가 생겨서 스페어 영역의 스페어 영역으로 섹터 이동 정상적인 경우 0 Seek_Error_Rate 탐색오류율, 정상적인 경우 0 Power_On_Hours 하드디스크에 전원이 인가된 시간 Spin_Retry_Count 최대 rpm에 도달하기 위해서 회전을 시도하는 횟수 정상적인 경우 0 Power_Cycle_Count 전원 on/off 횟수 Power-Off_retract_Count 헤드가 플레터에서 벗어나는 횟수 Load_Cycle_Count 헤드가 플레터위로 진입한 횟수 Temperature_Celsius 하드디스크 온도 Reallocated_Event_Count 스페어 영역으로 대체된 섹터로 부터 데이터를 읽어간 횟수 Current_Pending_Sector 불안전한 섹터로 스페어 영역 섹터로 remap을 준비중이러나 읽는 과정에 문제가 생긴 섹터 준 배드섹터로 정상적인 경우 0 Offline_Uncorrectable 읽기/쓰기 에 문제가 ㅂ생긴 섹터, 즉 디스크 표면이 손상됨. 배드섹터 정상적인 경우 0 UDMA_CRC_Error_Count 하드디스크 인터페이스를 통해 데이터 전송과정에 발생한 CRC 오류 횟수 정상적인 경우 0 Multi_Zone_Error_Rate 섹터에 쓰기과정에 발생한 에러가 검출된 횟수 |

슈퍼아이피
13-12-26 21:45
0개
12회
TIP
리눅스 smartd 데몬을 이용한 HDD Disk 점검
댓글목록
등록된 댓글이 없습니다.