티스토리 뷰

1. smartmoontools 설치

apt-get install smartmontools

 

2. smartctl 명령어

smartctl [옵션] [장치]

 

3. 디스크 정보 확인

root@daniel-server:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               1.9G     0  1.9G   0% /dev
tmpfs                              383M  1.3M  382M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   91G  9.2G   77G  11% /
tmpfs                              1.9G     0  1.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/loop2                          33M   33M     0 100% /snap/snapd/12704
/dev/loop0                          56M   56M     0 100% /snap/core18/2128
/dev/loop1                          71M   71M     0 100% /snap/lxd/21029
/dev/sda2                          976M  109M  800M  12% /boot
/dev/sda1                          511M  5.3M  506M   2% /boot/efi
tmpfs                              383M     0  383M   0% /run/user/0
/dev/loop3                          56M   56M     0 100% /snap/core18/2284
/dev/loop4                          44M   44M     0 100% /snap/snapd/14549
/dev/loop5                          62M   62M     0 100% /snap/core20/1270
/dev/loop6                          68M   68M     0 100% /snap/lxd/21835



root@daniel-server:~# lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0  55.4M  1 loop /snap/core18/2128
loop1                       7:1    0  70.3M  1 loop /snap/lxd/21029
loop2                       7:2    0  32.3M  1 loop /snap/snapd/12704
loop3                       7:3    0  55.5M  1 loop /snap/core18/2284
loop4                       7:4    0  43.4M  1 loop /snap/snapd/14549
loop5                       7:5    0  61.9M  1 loop /snap/core20/1270
loop6                       7:6    0  67.2M  1 loop /snap/lxd/21835
sda                         8:0    0 186.3G  0 disk
├─sda1                      8:1    0   512M  0 part /boot/efi
├─sda2                      8:2    0     1G  0 part /boot
└─sda3                      8:3    0 184.8G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0  92.4G  0 lvm  /

 

4. 디스크 정보 조회

root@daniel-server:~# smartctl -i /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-96-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Fujitsu MHY BH
Device Model:     FUJITSU MHY2200BH
Serial Number:    K421T8125C1K
LU WWN Device Id: 5 00000e 041731d11
Firmware Version: 0000000C
User Capacity:    200,049,647,616 bytes [200 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 3f
SATA Version is:  SATA 2.5, 1.5 Gb/s
Local Time is:    Wed Jan 26 08:12:04 2022 KST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

 

4. 자가진단 결과 조회

root@daniel-server:~# smartctl -H /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-96-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

test result가 PASSED로 나오면 정상

 

5. SMART 상세 조회

root@daniel-server:~# smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-96-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Fujitsu MHY BH
Device Model:     FUJITSU MHY2200BH
Serial Number:    K421T8125C1K
LU WWN Device Id: 5 00000e 041731d11
Firmware Version: 0000000C
User Capacity:    200,049,647,616 bytes [200 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 3f
SATA Version is:  SATA 2.5, 1.5 Gb/s
Local Time is:    Wed Jan 26 08:14:18 2022 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:  (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:                (  811) 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:        ( 115) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control 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   046    Pre-fail  Always       -       246136
  2 Throughput_Performance  0x0005   100   100   030    Pre-fail  Offline      -       46661632
  3 Spin_Up_Time            0x0003   100   100   025    Pre-fail  Always       -       1
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       2185
  5 Reallocated_Sector_Ct   0x0033   100   100   024    Pre-fail  Always       -       0 (2000 0)
  7 Seek_Error_Rate         0x000f   100   100   047    Pre-fail  Always       -       308
  8 Seek_Time_Performance   0x0005   100   100   019    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   079   079   000    Old_age   Always       -       10649
 10 Spin_Retry_Count        0x0013   100   100   020    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1225
192 Power-Off_Retract_Count 0x0032   098   098   000    Old_age   Always       -       610
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       27608
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       35 (Min/Max 14/60)
195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       11
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0 (0 6852)
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   253   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x000f   100   100   060    Pre-fail  Always       -       31286
203 Run_Out_Cancel          0x0002   100   100   000    Old_age   Always       -       2628609114258
240 Transfer_Error_Rate     0x003e   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 1
        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 1 occurred at disk power-on lifetime: 3132 hours (130 days + 12 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
  -- -- -- -- -- -- --
  84 51 00 da ab 02 e0  Error: ICRC, ABRT at LBA = 0x0002abda = 175066

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  35 00 80 5b ab 02 e0 00      01:03:04.028  WRITE DMA EXT
  35 00 80 db aa 02 e0 00      01:03:04.026  WRITE DMA EXT
  35 00 80 5b aa 02 e0 00      01:03:04.023  WRITE DMA EXT
  35 00 80 db a9 02 e0 00      01:03:04.021  WRITE DMA EXT
  35 00 80 5b a9 02 e0 00      01:03:04.019  WRITE DMA EXT

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.
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함