root@Gugeosigan:~# smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [armv7l-linux-5.4.268-269] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, http://www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Blue
Device Model: WDC WD20EZRZ-00Z5HB0
Serial Number: WD-WCC4M2SPCEN1
LU WWN Device Id: 5 0014ee 265352101
Firmware Version: 80.00A80
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Mar 19 13:58:27 2024 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: 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: (25500) 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: ( 258) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x7035) 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 175 171 021 Pre-fail Always - 4225
4 Start_Stop_Count 0x0032 064 064 000 Old_age Always - 36095
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 087 087 000 Old_age Always - 9770
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 2175
192 Power-Off_Retract_Count 0x0032 199 199 000 Old_age Always - 1135
193 Load_Cycle_Count 0x0032 093 093 000 Old_age Always - 322003
194 Temperature_Celsius 0x0022 112 095 000 Old_age Always - 35
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 - 8
200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0
SMART Error Log Version: 1
ATA Error Count: 50 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 50 occurred at disk power-on lifetime: 7107 hours (296 days + 3 hours)
When the command that caused the error occurred, the device was doing SMART Offline or Self-test.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
04 61 10 00 00 00 e0 Device Fault; Error: ABRT
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c6 00 10 00 00 00 e0 08 00:18:47.062 SET MULTIPLE MODE
91 00 3f 00 00 00 ef 08 00:18:37.013 INITIALIZE DEVICE PARAMETERS [OBS-6]
10 00 00 00 00 00 e0 08 00:18:26.965 RECALIBRATE [OBS-4]
ef 03 46 00 00 00 e0 00 00:18:26.482 SET FEATURES [Set transfer mode]
ef 03 0c 00 00 00 e0 00 00:18:26.312 SET FEATURES [Set transfer mode]
Error 49 occurred at disk power-on lifetime: 7107 hours (296 days + 3 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
04 61 3f 00 00 00 ef
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
91 00 3f 00 00 00 ef 08 00:18:37.013 INITIALIZE DEVICE PARAMETERS [OBS-6]
10 00 00 00 00 00 e0 08 00:18:26.965 RECALIBRATE [OBS-4]
ef 03 46 00 00 00 e0 00 00:18:26.482 SET FEATURES [Set transfer mode]
ef 03 0c 00 00 00 e0 00 00:18:26.312 SET FEATURES [Set transfer mode]
ec ff 01 01 00 00 a0 00 00:18:24.784 IDENTIFY DEVICE
Error 48 occurred at disk power-on lifetime: 7107 hours (296 days + 3 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
04 61 00 00 00 00 e0 Device Fault; Error: ABRT
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
10 00 00 00 00 00 e0 08 00:18:26.965 RECALIBRATE [OBS-4]
ef 03 46 00 00 00 e0 00 00:18:26.482 SET FEATURES [Set transfer mode]
ef 03 0c 00 00 00 e0 00 00:18:26.312 SET FEATURES [Set transfer mode]
ec ff 01 01 00 00 a0 00 00:18:24.784 IDENTIFY DEVICE
a1 ff 01 01 00 00 a0 00 00:18:24.382 IDENTIFY PACKET DEVICE
Error 47 occurred at disk power-on lifetime: 7107 hours (296 days + 3 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
04 61 46 00 00 00 e0 Device Fault; Error: ABRT
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
ef 03 46 00 00 00 e0 00 00:18:26.482 SET FEATURES [Set transfer mode]
ef 03 0c 00 00 00 e0 00 00:18:26.312 SET FEATURES [Set transfer mode]
ec ff 01 01 00 00 a0 00 00:18:24.784 IDENTIFY DEVICE
a1 ff 01 01 00 00 a0 00 00:18:24.382 IDENTIFY PACKET DEVICE
ec 00 00 00 00 00 a0 08 00:17:31.345 IDENTIFY DEVICE
Error 46 occurred at disk power-on lifetime: 7107 hours (296 days + 3 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
04 61 0c 00 00 00 e0 Device Fault; Error: ABRT
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
ef 03 0c 00 00 00 e0 00 00:18:26.312 SET FEATURES [Set transfer mode]
ec ff 01 01 00 00 a0 00 00:18:24.784 IDENTIFY DEVICE
a1 ff 01 01 00 00 a0 00 00:18:24.382 IDENTIFY PACKET DEVICE
ec 00 00 00 00 00 a0 08 00:17:31.345 IDENTIFY DEVICE
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
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.
root@Gugeosigan:~#
--------------------------------------------------------------------------------------------------------
♧ 리눅스에서는 윈도우에서 사용하는 scandisk 유틸리티와 같은
물리적인 수준에서 배드블록을 검사하기 위해 badblocks 명령어를 사용한다.
그리고 fsck 명령어를 사용해 논리적인 수준에서 파일시스템의 오류를 검사할 수도 있다.
■ badblocks - 장치의 배드블럭을 검색
badblocks [ -b 블록크기 ] [ -o 출력파일 ] [ -v ] [ -w ] |
◈ [ 옵션 ]
옵 션 | 설 명 |
-b 블록크기 | 블록크기를 바이트 수로 나타냄 (기본값 : 1024 bytes) |
-o 파일명 | 지정한 파일에 배드 블록의 리스트 기록 |
-v | 자세한 출력 모드 |
-e 최대블록개수 | 점검을 멈출 최대 블록 개수 (0이면 지정된 범위 까지 점검) |
-p num_passes | 지정된 숫자 만큼 디스크 스캔 반복. |
-w | 읽기/쓰기 모드 에서 배드블록을 검사 (-n 옵션과 함께 사용 X, 상호 배타적임) |
-n | 비-파괴 읽고/쓰기 모드 ( -w옵션과 함께 사용 X, 상호 배타적임) |
-s | 검사 진행 과정 표시 |
badblocks 명령의 일반적인 사용 예: | ||||
▶ -v 옵션 : 자세한 정보 출력과 함께 기본적인 사용
▶ 비-파괴 모드로 배드블록을 검사.
비-파괴(non-destructive) 읽고/쓰기 검사는 매우 느리지만 디바이스에 저장된 데이터의 손실 없이 검사할 수 있는 가장 좋은 방법이다. ▶ 읽기/쓰기 모드 검사. ( 경고 : 데이터가 파괴될 수 있음 )
▶ 다수의 배드블록 검사 수행
|
■ fcsk - 리눅스 파일시스템을 검사
♧ fsck 명령어는 특정 파일시스템 유형에 사용되는 검사 유틸리티의 프론트엔드 역할을 수행.
fsck [ -AVRTNP ] [ -s ] [ -t 파일시스템유형 ] [ 파일시스템옵션 ] 파일시스템 [ ... ] |
◈ [ 옵션 ]
옵 션 | 설 명 |
-A | /etc/fstab 파일에 표시된 모든 파일시스템을 한 번 씩 모두 점검. |
-R | -A 플래그와 같이 사용될 때 루트 파일시스템은 제외 |
-T | 시작할 때 버전정보를 출력하지 않음 |
-V | 자세한 출력 수행 |
-N | 실행하지는 말고 어떤 작업을 할 것인지만 보여줌. |
fsck 명령의 일반적인 사용 예: | ||
▶ 파일시스템 검사 (-TV : 자세한 출력 및 버전 출력 방지 옵션)
▷ 검사 수행 도중 문제가 발생하면, 문제를 수정할 것인지 사용자에게 물어보는데 -y옵션을 추가하여 모든 질문에 대해 yes로 답변하도록 할 수 있다.
|
출처: https://devanix.tistory.com/242 [┗System∑Sec†ion┛:티스토리]
'IT' 카테고리의 다른 글
gnu 메뉴 아래 유튜브 대신 이미지 (0) | 2024.03.29 |
---|---|
USB-HDD 마운트 (0) | 2024.03.19 |
그누보드 사용법 (0) | 2024.03.17 |
글래어 vs 논글래어 (0) | 2024.03.04 |
네이벙 不 드래그 해제 (0) | 2024.02.23 |