Linux系统下如何查看硬盘剩余使用寿命?

1、使用smartclt命令查看硬盘的smart信息,如以下范例:

smartctl -a /dev/sdb

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.14.0-49.15.x86_64] (local build)

Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Device Model:     SAMSUNG MZ7LH480HAHQ-00005

Serial Number:     S45PNA0M540908

LU WWN Device Id:    5 002538 e001d842c

Firmware Version:    HXT7404Q

User Capacity:      480,103,981,056 bytes [480 GB]

Sector Sizes:      512 bytes logical, 4096 bytes physical

Rotation Rate:      Solid State Device

Form Factor:      2.5 inches

Device is:        Not in smartctl database [for details use: -P showall]

ATA Version is:     Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5

SATA Version is:    SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:      Tue Oct 19 16:03:51 2021 CST

SMART support is:    Available - device has SMART capability.

SMART support is:    Enabled

=== START OF READ SMART DATA SECTION ===

SMART Status not supported: ATA return descriptor not supported by controller firmware

SMART overall-health self-assessment test result: PASSED

Warning: This result is based on an Attribute check.

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:            (    0) seconds.

Offline data collection

capabilities:             (0x53) SMART execute Offline immediate.

                         Auto Offline data collection on/off support.

                   Suspend Offline collection upon new

                   command.

                   No 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:    (  35) minutes.

SCT capabilities:         (0x003d)  SCT Status supported.

              SCT Error Recovery Control supported.

              SCT Feature Control supported.

              SCT Data Table supported.

1

 

SMART Error Log Version: 1

No Errors Logged

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.

smartctl -a /dev/sdc

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.14.0-49.15.x86_64] (local build)

Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Device Model:     SAMSUNG MZ7LH480HAHQ-00005

Serial Number:     S45PNA2MC20956

LU WWN Device Id:   5 002538 e19c1c198

Firmware Version:   HXT7404Q

User Capacity:     480,103,981,056 bytes [480 GB]

Sector Sizes:     512 bytes logical, 4096 bytes physical

Rotation Rate:     Solid State Device

Form Factor:      2.5 inches

Device is:        Not in smartctl database [for details use: -P showall]

ATA Version is:     Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5

SATA Version is:    SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:     Tue Oct 19 16:03:51 2021 CST

SMART support is:   Available - device has SMART capability.

SMART support is:   Enabled

=== START OF READ SMART DATA SECTION ===

SMART Status not supported: ATA return descriptor not supported by controller firmware

SMART overall-health self-assessment test result: PASSED

Warning: This result is based on an Attribute check.

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:            (    0) seconds.

Offline data collection

capabilities:                 (0x53) SMART execute Offline immediate.

                  Auto Offline data collection on/off support.

                  Suspend Offline collection upon new

                  command.

                  No 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:    (  35) minutes.

SCT capabilities:         (0x003d)  SCT Status supported.

                SCT Error Recovery Control supported.

                SCT Feature Control supported.

                SCT Data Table supported.

2

 

SMART Error Log Version: 1

No Errors Logged

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.

2、三星的硬盘根据smart信息中的177项判断硬盘的剩余寿命,如以下信息:

(1)序列号为:S45PNA0M540908的sdb硬盘,177项的VALUE和WORST都是86,说明硬盘的寿命剩余86%

Vendor Specific SMART Attributes with Thresholds:

3

 

(2)序列号为:S45PNA2MC20956的sdc硬盘,177项的VALUE和WORST都是92,说明硬盘的寿命剩余92%

Vendor Specific SMART Attributes with Thresholds:

4

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

技术瘾君子1573

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值