AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题

问题[ssd](unix)

Martin Hope
elbarna
Asked: 2025-04-07 06:12:49 +0800 CST

如何在 NetBSD 上使用 blkdiscard 时防止数据丢失

  • 5

在 Linux 上,此命令

fstrim -av

我将删除所有未使用的块(这在虚拟机磁盘上尤其重要,在 SSD 上也有必要,以便保留/获得更长的持续时间)。NetBSD 有一个类似的命令,名为blkdiscard

此命令将擦除整个磁盘,因此它将变得无法使用(如果我错了,请纠正我)

blkdiscard -v /dev/rwd...

我看到有一个标志,它在某些字节(或 MB)之后开始丢弃

blkdiscard -v -f 256m -m 128m /dev/rwd0c

假设我的分区使用 6GB 的数据,为了安全丢弃(我的数据仍然保留),这是正确的命令吗?

blkdiscard -v -f 6000m -m 128m /dev/rwd0c
ssd
  • 1 个回答
  • 34 Views
Martin Hope
T. Pluess
Asked: 2024-07-09 15:02:11 +0800 CST

清除 SCSI 日志页面

  • 5

我正在使用几个 SAS SSD。不久前,我对其中一个启动了“后台长测试”,不幸的是,发生了停电,因此测试中断。电源恢复后,我重新运行后台长测试,这次成功了。但是,现在我的 SCSI LOG PAGE 中出现了如下令人讨厌的条目(自检日志中的条目 #3)

SMART Self-test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background long   Completed                   -   48721                 - [-   -    -]
# 2  Background long   Completed                   -   48253                 - [-   -    -]
# 3  Background long   Self test in progress ...   8   48251                 - [-   -    -]

这显然是一个错误的条目,并且让我非常恼火,因为这个测试肯定是由于断电而中止的。我知道使用 sg_utils 包可以操纵某些日志页面。例如,sg_logs -R /dev/sda可以重置读取/写入了多少 GB 的统计计数器。所以我想知道是否也可以以某种方式清除自检日志?根据 sg_utils 手册,我认为可以,但我还不明白如何清除。我只是想清除这个自检日志,因为它在查看磁盘时让我很烦 - 我定期运行测试,并且不时滚动浏览测试结果,然后这个结果总是有些突出。我是否可以通过 FORMAT UNIT 命令清除所有这些?

ssd
  • 1 个回答
  • 29 Views
Martin Hope
ndx
Asked: 2024-06-15 22:39:44 +0800 CST

ATA 错误数增加/ SSD 故障?

  • 6
该问题已从 Server Fault迁移,因为它可以在 Unix & Linux Stack Exchange 上找到答案。4 天前迁移 。

因此,由于桌面上“固定”磁盘布局的限制而感到烦恼,前几天我决定将我的/和迁移/home到基于 LVM 的配置。在此过程的一部分中,我从通过 grub 启动的实时 CD 将数据 rsync 迁移到新的逻辑卷(基本上使用rsync -avxHAWX --numeric-ids --progress ...)。在执行此操作时,我最终遇到了类似于 的 rsync 错误failed verification update discarded。由于这主要与浏览器缓存等非必要文件有关,并且之前磁盘没有问题,所以我没有多想,不幸的是没有保留确切的错误消息。

成功完成迁移后(除了前面提到的问题)rsync 出现的错误开始困扰我,我想也许是磁盘有故障,我想在使用它来存储我真正想要保留的数据之前确定是否是这种情况。

查看系统日志,我注意到以下情况:

Jun 15 11:36:33 master smartd[1434]: Device: /dev/sdb [SAT], ATA error count increased from 7 to 1351

我认为这看起来有点奇怪,而且还有一个显着的增长,但我真的不知道如何解释它。

简单的 fsck 最初报告没有问题,但在后续运行中最终出现了问题,There are xx inodes containing multiply-claimed blocks到目前为止似乎可以修复。在此期间,出现如下条目

Jun 15 15:19:33 master kernel: [13390.589630] blk_update_request: I/O error, dev sdb, sector 158304840 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jun 15 15:19:33 master kernel: [13390.589636] Buffer I/O error on dev sdb2, logical block 6987849, async page read
Jun 15 15:19:34 master kernel: [13390.773634] sd 1:0:0:0: [sdb] tag#27 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
Jun 15 15:19:34 master kernel: [13390.773638] sd 1:0:0:0: [sdb] tag#27 Sense Key : Medium Error [current] 
Jun 15 15:19:34 master kernel: [13390.773641] sd 1:0:0:0: [sdb] tag#27 Add. Sense: Unrecovered read error - auto reallocate failed
Jun 15 15:19:34 master kernel: [13390.773644] sd 1:0:0:0: [sdb] tag#27 CDB: Read(10) 28 00 09 6f 8a 88 00 00 08 00
Jun 15 15:19:34 master kernel: [13390.773646] blk_update_request: I/O error, dev sdb, sector 158304904 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

出现在 syslog 中,但在文件系统修复后似乎已经停止。但是,ATA 错误计数似乎继续增加:

Jun 15 15:36:33 master smartd[1434]: Device: /dev/sdb [SAT], ATA error count increased from 4549 to 4623

值得一提的是,作为迁移的一部分,我添加了一些新磁盘,移动了一些 SATA 电缆,并使用了一条旧 SATA 电缆。我目前没有新电缆来替换旧电缆,但计划在未来几天购买一些。

该磁盘是大约两年半前新购买的,因此根据当地标准已经超出保修范围,而且考虑到从欧洲运输的成本,可能不值得进行工厂 RMA。

此时我并不真正相信磁盘的状态,但我很好奇它发生了什么,欢迎对原因和/或解决方案提出任何想法。

我在下面提供了来自 smartctl 和 hdparm 的信息,但与 syslog 条目一样,我真的不知道如何确切地解释它。如果需要任何其他信息,请告诉我。

问候。

信息

系统

$ uname -a
Linux master 5.15.0-107-generic #117~20.04.1-Ubuntu SMP Tue Apr 30 10:35:57 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:    20.04
Codename:   focal

磁盘

hdparm

$ sudo hdparm -I /dev/sdb

/dev/sdb:

ATA device, with non-removable media
    Model Number:       Samsung SSD 870 EVO 500GB               
    Serial Number:      XXXXXXXXXXXXX     
    Firmware Revision:  XXXXXXXXXXXXX
    Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
    Used: unknown (minor revision code 0x005e) 
    Supported: 11 8 7 6 5 
    Likely used: 11
Configuration:
    Logical     max current
    cylinders   16383   16383
    heads       16  16
    sectors/track   63  63
    --
    CHS current addressable sectors:    16514064
    LBA    user addressable sectors:   268435455
    LBA48  user addressable sectors:   976773168
    Logical  Sector size:                   512 bytes
    Physical Sector size:                   512 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:      476940 MBytes
    device size with M = 1000*1000:      500107 MBytes (500 GB)
    cache/buffer size  = unknown
    Form Factor: 2.5 inch
    Nominal Media Rotation Rate: Solid State Device
Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, no device specific minimum
    R/W multiple sector transfer: Max = 1   Current = 1
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
         Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4 
         Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
    Enabled Supported:
       *    SMART feature set
            Security Mode feature set
       *    Power Management feature set
       *    Write cache
       *    Look-ahead
       *    Host Protected Area feature set
       *    WRITE_BUFFER command
       *    READ_BUFFER command
       *    NOP cmd
       *    DOWNLOAD_MICROCODE
            SET_MAX security extension
       *    48-bit Address feature set
       *    Device Configuration Overlay feature set
       *    Mandatory FLUSH_CACHE
       *    FLUSH_CACHE_EXT
       *    SMART error logging
       *    SMART self-test
       *    General Purpose Logging feature set
       *    WRITE_{DMA|MULTIPLE}_FUA_EXT
       *    64-bit World wide name
            Write-Read-Verify feature set
       *    WRITE_UNCORRECTABLE_EXT command
       *    {READ,WRITE}_DMA_EXT_GPL commands
       *    Segmented DOWNLOAD_MICROCODE
       *    Gen1 signaling speed (1.5Gb/s)
       *    Gen2 signaling speed (3.0Gb/s)
       *    Gen3 signaling speed (6.0Gb/s)
       *    Native Command Queueing (NCQ)
       *    Phy event counters
       *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
       *    DMA Setup Auto-Activate optimization
            Device-initiated interface power management
       *    Asynchronous notification (eg. media change)
       *    Software settings preservation
            Device Sleep (DEVSLP)
            unknown 78[10]
       *    SMART Command Transport (SCT) feature set
       *    SCT Write Same (AC2)
       *    SCT Error Recovery Control (AC3)
       *    SCT Features Control (AC4)
       *    SCT Data Tables (AC5)
       *    reserved 69[4]
       *    DOWNLOAD MICROCODE DMA command
       *    SET MAX SETPASSWORD/UNLOCK DMA commands
       *    WRITE BUFFER DMA command
       *    READ BUFFER DMA command
       *    Data Set Management TRIM supported (limit 8 blocks)
       *    Deterministic read ZEROs after TRIM
Security: 
    Master password revision code = 65534
        supported
    not enabled
    not locked
        frozen
    not expired: security count
        supported: enhanced erase
    4min for SECURITY ERASE UNIT. 8min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5002538f31447d6e
    NAA     : 5
    IEEE OUI    : 002538
    Unique ID   : f31447d6e
Device Sleep:
    DEVSLP Exit Timeout (DETO): 50 ms (drive)
    Minimum DEVSLP Assertion Time (MDAT): 30 ms (drive)
Checksum: correct

智能控制-i

$ sudo smartctl -i /dev/sdb
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-107-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 870 EVO 500GB
Serial Number:    XXXXXXXXXXXXX
LU WWN Device Id: XXXXXXXXXXXXX
Firmware Version: XXXXXXXXXXXXX
User Capacity:    500.107.862.016 bytes [500 GB]
Sector Size:      512 bytes logical/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:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Jun 15 15:57:00 2024 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

smartctl-H

$ sudo smartctl -H /dev/sdb
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-107-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

smartctl-x

$ sudo smartctl -x /dev/sdb
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-107-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 870 EVO 500GB
Serial Number:    XXXXXXXXXXXXX
LU WWN Device Id: XXXXXXXXXXXXX
Firmware Version: XXXXXXXXXXXXX
User Capacity:    500.107.862.016 bytes [500 GB]
Sector Size:      512 bytes logical/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:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Jun 15 15:59:45 2024 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: 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:        (    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:    (  85) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  5 Reallocated_Sector_Ct   PO--CK   092   092   010    -    38
  9 Power_On_Hours          -O--CK   098   098   000    -    9906
 12 Power_Cycle_Count       -O--CK   098   098   000    -    1110
177 Wear_Leveling_Count     PO--C-   099   099   000    -    21
179 Used_Rsvd_Blk_Cnt_Tot   PO--C-   092   092   010    -    38
181 Program_Fail_Cnt_Total  -O--CK   100   100   010    -    0
182 Erase_Fail_Count_Total  -O--CK   100   100   010    -    0
183 Runtime_Bad_Block       PO--C-   092   092   010    -    38
187 Reported_Uncorrect      -O--CK   099   099   000    -    4623
190 Airflow_Temperature_Cel -O--CK   077   059   000    -    23
195 Hardware_ECC_Recovered  -O-RC-   199   199   000    -    4623
199 UDMA_CRC_Error_Count    -OSRCK   100   100   000    -    0
235 Unknown_Attribute       -O--C-   099   099   000    -    17
241 Total_LBAs_Written      -O--CK   099   099   000    -    14662157986
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      1  Comprehensive SMART error log
0x03       GPL     R/O      1  Ext. Comprehensive SMART error log
0x04       GPL,SL  R/O      8  Device Statistics log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters log
0x13       GPL     R/O      1  SATA NCQ Send and Receive log
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa1           SL  VS      16  Device vendor specific log
0xa5           SL  VS      16  Device vendor specific log
0xce           SL  VS      16  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
Device Error Count: 4623 (device log contains only the most recent 4 errors)
    CR     = Command Register
    FEATR  = Features Register
    COUNT  = Count (was: Sector Count) Register
    LBA_48 = Upper bytes of LBA High/Mid/Low Registers ]  ATA-8
    LH     = LBA High (was: Cylinder High) Register    ]   LBA
    LM     = LBA Mid (was: Cylinder Low) Register      ] Register
    LL     = LBA Low (was: Sector Number) Register     ]
    DV     = Device (was: Device/Head) Register
    DC     = Device Control Register
    ER     = Error register
    ST     = Status register
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 4623 [2] occurred at disk power-on lifetime: 9906 hours (412 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 51 00 f0 00 00 20 01 a7 80 40 00  Error: UNC at LBA = 0x2001a780 = 536979328

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  60 00 08 00 f0 00 00 20 01 a7 80 40 1e     05:33:19.963  READ FPDMA QUEUED
  47 00 00 00 01 00 00 00 00 06 30 40 1d     05:33:19.963  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 30 40 1d     05:33:19.963  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 00 40 1d     05:33:19.963  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 08 30 40 1d     05:33:19.963  READ LOG DMA EXT

Error 4622 [1] occurred at disk power-on lifetime: 9906 hours (412 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 51 00 e8 00 00 20 01 a7 80 40 00  Error: UNC at LBA = 0x2001a780 = 536979328

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  60 00 08 00 e8 00 00 20 01 a7 80 40 1d     05:33:19.791  READ FPDMA QUEUED
  47 00 00 00 01 00 00 00 00 06 30 40 0e     05:33:19.791  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 30 40 0e     05:33:19.791  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 00 40 0e     05:33:19.791  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 08 30 40 0e     05:33:19.791  READ LOG DMA EXT

Error 4621 [0] occurred at disk power-on lifetime: 9906 hours (412 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 51 00 70 00 00 09 6f 96 48 40 00  Error: UNC at LBA = 0x096f9648 = 158307912

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  60 00 08 00 70 00 00 09 6f 96 48 40 0e     05:33:19.527  READ FPDMA QUEUED
  47 00 00 00 01 00 00 00 00 06 30 40 0b     05:33:19.527  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 30 40 0b     05:33:19.527  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 00 00 40 0b     05:33:19.527  READ LOG DMA EXT
  47 00 00 00 01 00 00 00 00 08 30 40 0b     05:33:19.527  READ LOG DMA EXT

Error 4620 [3] occurred at disk power-on lifetime: 9906 hours (412 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER -- ST COUNT  LBA_48  LH LM LL DV DC
  -- -- -- == -- == == == -- -- -- -- --
  40 -- 51 00 58 00 00 09 6f 84 c8 40 00  Error: WP at LBA = 0x096f84c8 = 158303432

  Commands leading to the command that caused the error were:
  CR FEATR COUNT  LBA_48  LH LM LL DV DC  Powered_Up_Time  Command/Feature_Name
  -- == -- == -- == == == -- -- -- -- --  ---------------  --------------------
  61 00 08 00 58 00 00 09 6f 84 c8 40 0b     05:33:19.351  WRITE FPDMA QUEUED
  61 00 08 00 50 00 00 09 6f 84 48 40 0a     05:33:19.351  WRITE FPDMA QUEUED
  61 00 08 00 48 00 00 09 6f 7f 08 40 09     05:33:19.351  WRITE FPDMA QUEUED
  61 00 08 00 40 00 00 09 6f 7e c8 40 08     05:33:19.351  WRITE FPDMA QUEUED
  61 00 08 00 38 00 00 09 6f 7e 88 40 07     05:33:19.351  WRITE FPDMA QUEUED

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      9906         -
# 2  Extended offline    Completed: read failure       90%      6147         119371776
# 3  Extended offline    Completed: read failure       90%      6132         119371776
# 4  Extended offline    Completed: read failure       90%      6132         119371776
# 5  Extended offline    Completed: read failure       90%      6125         119371776
# 6  Short offline       Completed without error       00%      6125         -
# 7  Short offline       Completed without error       00%      6125         -

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
  256        0    65535  Read_scanning was never started
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.

SCT Status Version:                  3
SCT Version (vendor specific):       256 (0x0100)
Device State:                        Active (0)
Current Temperature:                    23 Celsius
Power Cycle Min/Max Temperature:     20/36 Celsius
Lifetime    Min/Max Temperature:     13/41 Celsius
Specified Max Operating Temperature:    70 Celsius
Under/Over Temperature Limit Count:   0/0
SMART Status:                        0xc24f (PASSED)

SCT Temperature History Version:     2
Temperature Sampling Period:         10 minutes
Temperature Logging Interval:        10 minutes
Min/Max recommended Temperature:      0/70 Celsius
Min/Max Temperature Limit:            0/70 Celsius
Temperature History Size (Index):    128 (59)

Index    Estimated Time   Temperature Celsius
  60    2024-06-14 18:40    22  ***
  61    2024-06-14 18:50    23  ****
  62    2024-06-14 19:00    24  *****
  63    2024-06-14 19:10    23  ****
 ...    ..(  3 skipped).    ..  ****
  67    2024-06-14 19:50    23  ****
  68    2024-06-14 20:00    24  *****
  69    2024-06-14 20:10    23  ****
  70    2024-06-14 20:20    23  ****
  71    2024-06-14 20:30    24  *****
  72    2024-06-14 20:40    23  ****
  73    2024-06-14 20:50    23  ****
  74    2024-06-14 21:00    24  *****
  75    2024-06-14 21:10    23  ****
  76    2024-06-14 21:20    24  *****
  77    2024-06-14 21:30    24  *****
  78    2024-06-14 21:40    23  ****
  79    2024-06-14 21:50    24  *****
  80    2024-06-14 22:00    23  ****
  81    2024-06-14 22:10    24  *****
  82    2024-06-14 22:20    25  ******
  83    2024-06-14 22:30    24  *****
  84    2024-06-14 22:40    30  ***********
  85    2024-06-14 22:50    25  ******
  86    2024-06-14 23:00    26  *******
  87    2024-06-14 23:10    24  *****
  88    2024-06-14 23:20    24  *****
  89    2024-06-14 23:30    24  *****
  90    2024-06-14 23:40    25  ******
  91    2024-06-14 23:50    24  *****
  92    2024-06-15 00:00    24  *****
  93    2024-06-15 00:10    24  *****
  94    2024-06-15 00:20    25  ******
  95    2024-06-15 00:30    24  *****
 ...    ..( 17 skipped).    ..  *****
 113    2024-06-15 03:30    24  *****
 114    2024-06-15 03:40    23  ****
 115    2024-06-15 03:50    24  *****
 116    2024-06-15 04:00    24  *****
 117    2024-06-15 04:10    23  ****
 118    2024-06-15 04:20    24  *****
 ...    ..(  5 skipped).    ..  *****
 124    2024-06-15 05:20    24  *****
 125    2024-06-15 05:30    26  *******
 126    2024-06-15 05:40    24  *****
 127    2024-06-15 05:50    23  ****
   0    2024-06-15 06:00    25  ******
   1    2024-06-15 06:10    24  *****
   2    2024-06-15 06:20    24  *****
   3    2024-06-15 06:30    25  ******
   4    2024-06-15 06:40    25  ******
   5    2024-06-15 06:50    23  ****
 ...    ..(  2 skipped).    ..  ****
   8    2024-06-15 07:20    23  ****
   9    2024-06-15 07:30    25  ******
  10    2024-06-15 07:40    25  ******
  11    2024-06-15 07:50    23  ****
  12    2024-06-15 08:00    23  ****
  13    2024-06-15 08:10    25  ******
  14    2024-06-15 08:20    33  **************
  15    2024-06-15 08:30    34  ***************
  16    2024-06-15 08:40    24  *****
  17    2024-06-15 08:50    23  ****
  18    2024-06-15 09:00    25  ******
  19    2024-06-15 09:10    23  ****
  20    2024-06-15 09:20    24  *****
  21    2024-06-15 09:30     ?  -
  22    2024-06-15 09:40     ?  -
  23    2024-06-15 09:50    21  **
  24    2024-06-15 10:00    22  ***
  25    2024-06-15 10:10    22  ***
  26    2024-06-15 10:20    23  ****
  27    2024-06-15 10:30    22  ***
 ...    ..(  4 skipped).    ..  ***
  32    2024-06-15 11:20    22  ***
  33    2024-06-15 11:30    23  ****
  34    2024-06-15 11:40    22  ***
 ...    ..(  5 skipped).    ..  ***
  40    2024-06-15 12:40    22  ***
  41    2024-06-15 12:50    28  *********
  42    2024-06-15 13:00    36  *****************
  43    2024-06-15 13:10    32  *************
  44    2024-06-15 13:20    32  *************
  45    2024-06-15 13:30    23  ****
  46    2024-06-15 13:40    32  *************
  47    2024-06-15 13:50    32  *************
  48    2024-06-15 14:00    33  **************
  49    2024-06-15 14:10    32  *************
  50    2024-06-15 14:20    33  **************
  51    2024-06-15 14:30    33  **************
  52    2024-06-15 14:40    23  ****
  53    2024-06-15 14:50    23  ****
  54    2024-06-15 15:00    24  *****
  55    2024-06-15 15:10    23  ****
 ...    ..(  3 skipped).    ..  ****
  59    2024-06-15 15:50    23  ****

SCT Error Recovery Control:
           Read: Disabled
          Write: Disabled

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 1) ==
0x01  0x008  4            1110  ---  Lifetime Power-On Resets
0x01  0x010  4            9906  ---  Power-on Hours
0x01  0x018  6     14662157986  ---  Logical Sectors Written
0x01  0x020  6       162802561  ---  Number of Write Commands
0x01  0x028  6     10406868695  ---  Logical Sectors Read
0x01  0x030  6       263456207  ---  Number of Read Commands
0x01  0x038  6         3403000  ---  Date and Time TimeStamp
0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
0x04  0x008  4            4623  ---  Number of Reported Uncorrectable Errors
0x04  0x010  4               1  ---  Resets Between Cmd Acceptance and Completion
0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
0x05  0x008  1              23  ---  Current Temperature
0x05  0x020  1              41  ---  Highest Temperature
0x05  0x028  1              13  ---  Lowest Temperature
0x05  0x058  1              70  ---  Specified Maximum Operating Temperature
0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
0x06  0x008  4            2521  ---  Number of Hardware Resets
0x06  0x010  4               0  ---  Number of ASR Events
0x06  0x018  4               0  ---  Number of Interface CRC Errors
0x07  =====  =               =  ===  == Solid State Device Statistics (rev 1) ==
0x07  0x008  1               0  N--  Percentage Used Endurance Indicator
                                |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  2            0  Command failed due to ICRC error
0x0002  2            0  R_ERR response for data FIS
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0005  2            0  R_ERR response for non-data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
0x0008  2            0  Device-to-host non-data FIS retries
0x0009  2           14  Transition from drive PhyRdy to drive PhyNRdy
0x000a  2           14  Device-to-host register FISes sent due to a COMRESET
0x000b  2            0  CRC errors within host-to-device FIS
0x000d  2            0  Non-CRC errors within host-to-device FIS
0x000f  2            0  R_ERR response for host-to-device data FIS, CRC
0x0010  2            0  R_ERR response for host-to-device data FIS, non-CRC
0x0012  2            0  R_ERR response for host-to-device non-data FIS, CRC
0x0013  2            0  R_ERR response for host-to-device non-data FIS, non-CRC
ssd
  • 1 个回答
  • 57 Views
Martin Hope
Jason C
Asked: 2024-02-19 23:03:14 +0800 CST

在最新的 Debian/Ubuntu 上启用 TRIM 的正确方法

  • 6

过去,在 Linux 上正确启用 SSD 的 TRIM 需要两个步骤:

  1. 运行fstrim一次,处理迄今为止所有“未修剪”的块,然后
  2. discard在fstab中设置标志(以便修剪将继续)。

我有点落后于时代了。现在,我看到有关较新 Linux 发行版中包含的fstrim.timer服务的信息,并且我看到有关使用fstrim.timer、fstrim和的组合的冲突信息。discard

我的问题是,在现代 Linux(撰写本文时为现代)上,在 SSD 上启用 TRIM 的首选方法是什么?是否只是启用fstrim.timer并让它做它的事情?discard不再需要使用该标志了吗?

如果重要的话,我对 Ubuntu >= 22 (Jammy) 和 Debian >= 10 (Buster) 特别感兴趣。

ssd
  • 1 个回答
  • 426 Views
Martin Hope
vinc17
Asked: 2023-09-11 20:58:13 +0800 CST

SSD:“坏块”/“e2fsck -c”与重新分配/重新映射的扇区

  • 5

该badblocks实用程序允许用户查找设备上的坏块,并e2fsck -c允许将此类坏块添加到坏块索引节点,以便它们不会用于实际数据。但对于 SSD,众所周知,坏扇区通常会由驱动器透明地重新分配(重新映射)(但是,仅当发生写入时)。那么,在 SSD 上使用badblocks/有意义吗?e2fsck -c

我想

  • badblocks单独获取有关 SSD 健康状况的信息是有意义的,例如通过考虑坏块总数(我不知道 smartmontools 是否可以做同样的事情......也许经过长时间的测试,但我还smartctl没有smartctl -t long'没有看到任何明确的文档);
  • 不应该使用它e2fsck -c(它将坏块添加到坏块索引节点),因为由于可能的重新分配,关联的数字(逻辑地址?)可能会变得过时。

但这些实用程序的手册页中没有任何关于 SSD 情况的警告。所以我想知道...

ssd
  • 1 个回答
  • 15 Views
Martin Hope
vcr
Asked: 2023-06-21 19:21:17 +0800 CST

无法创建 NVMe 共享命名空间并将其附加到主控制器和辅助控制器

  • 5

我尝试在 Samsung PM1735 NVMe SSD 上创建一个命名空间,然后将其附加到主控制器 (0x41) 和辅助控制器 (0x1),但它仅附加到主控制器(我在 Ubuntu 20.04 上运行):

sudo nvme create-ns /dev/nvme0 -s 26214400 -c 26214400 -b 4096
sudo nvme attach-ns /dev/nvme0 --namespace-id=1 --controllers=0x41,0x1
NVMe status: NS_IS_PRIVATE: The namespace is private and is already attached to one controller(0x2119)

看起来命名空间是私有的,我需要创建一个共享命名空间。然后我在 nvme ns-create 命令帮助中找到了这个共享选项:

-m, --nmic
Namespace multipath and sharing capabilities.

问题是它不起作用:

sudo nvme create-ns /dev/nvme0 -s 26214400 -c 26214400 -b 4096 -m
create-ns: option requires an argument -- 'm'

有谁知道我应该向此选项传递什么参数才能创建共享名称空间,以便我可以将其附加到两个控制器?

ssd
  • 1 个回答
  • 69 Views
Martin Hope
MASL
Asked: 2022-09-29 07:49:07 +0800 CST

没有症状的磁盘问题:了解 dmesg 报告并评估风险

  • 1

我们有一个 10 个节点的 Cassandra 集群,其中 4 个节点显示了一些磁盘错误,如dmesg. 这些报告每小时都会或多或少地出现。

错误中报告的磁盘是 8TB 逻辑卷的一半 - 另一个磁盘似乎没有报告错误。

[Wed Sep 28 12:29:02 2022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: cmd error handler
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Wed Sep 28 12:29:02 2022] sas: ata8: end_device-0:1: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: failed command: READ DMA EXT
[Wed Sep 28 12:29:02 2022] ata7.00: cmd 25/00:08:10:d8:5d/00:00:84:01:00/e0 tag 8 dma 4096 in
         res 51/40:00:10:d8:5d/00:00:84:01:00/e0 Emask 0x9 (media error)
[Wed Sep 28 12:29:02 2022] ata7.00: status: { DRDY ERR }
[Wed Sep 28 12:29:02 2022] ata7.00: error: { UNC }
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: configured for UDMA/133
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] CDB: Read(16) 88 00 00 00 00 01 84 5d d8 10 00 00 00 08 00 00
[Wed Sep 28 12:29:02 2022] blk_update_request: I/O error, dev sda, sector 6515709968
[Wed Sep 28 12:29:02 2022] ata7: EH complete
[Wed Sep 28 12:29:02 2022] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 1 tries: 1
[Wed Sep 28 12:29:02 2022] ata7.00: Enabling discard_zeroes_data

Aniostat -xdct 1 100显示了 R/W 速率和平均队列大小的非常合理的数字:

grep "^sda" iostat-xdct | awk '{n+=1; r+=$6; w+=$7; qsz+=$9; qmx=qmx<$9?$9:qmx; qmi=qmi>$9?$9:qmi}END{printf("%.3f\t%.3f\t%.3f\t\t[%.3f , %.3f]\n",r/n,w/n,qsz/n,qmi,qmx)}'

818.239 6.939   0.038           [0.000 , 0.890]

根据我们所有通常的指标,该系统运行良好。但是,我担心这可能会在最意想不到的时候导致致命的系统错误。

我不知道报告的错误是什么意思。我更不知道如何评估保持系统这样运行所涉及的风险。我应该立即更换磁盘吗?

我将在此处粘贴 smartctl -a /dev/sda 的输出:

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-693.21.1.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Samsung SSD 870 EVO 4TB
Serial Number:    S6BBNJ0R700321V
LU WWN Device Id: 5 002538 f31706f50
Firmware Version: SVT01B6Q
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Size:      512 bytes logical/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(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA >3.2 (0x1ff), 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Sep 28 12:58:46 2022 EDT
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:        (    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:    ( 320) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   068   068   010    Pre-fail  Always       -       1510
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       9429
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       6
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       11
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   068   068   010    Pre-fail  Always       -       1510
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   068   068   010    Pre-fail  Always       -       1510
187 Reported_Uncorrect      0x0032   099   099   000    Old_age   Always       -       8242
190 Airflow_Temperature_Cel 0x0032   068   056   000    Old_age   Always       -       32
195 Hardware_ECC_Recovered  0x001a   199   199   000    Old_age   Always       -       8242
199 UDMA_CRC_Error_Count    0x003e   100   100   000    Old_age   Always       -       0
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       4
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       35415578583

SMART Error Log Version: 1
ATA Error Count: 8242 (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 8242 occurred at disk power-on lifetime: 9429 hours (392 days + 21 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
  -- -- -- -- -- -- --
  40 51 08 10 d8 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8241 occurred at disk power-on lifetime: 9428 hours (392 days + 20 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
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8240 occurred at disk power-on lifetime: 9427 hours (392 days + 19 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
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8239 occurred at disk power-on lifetime: 9427 hours (392 days + 19 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
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

Error 8238 occurred at disk power-on lifetime: 9426 hours (392 days + 18 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
  -- -- -- -- -- -- --
  40 51 08 e8 d7 5d e0  Error:

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------

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
  256        0    65535  Read_scanning was never started
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.
hard-disk ssd
  • 1 个回答
  • 42 Views
Martin Hope
kiler129
Asked: 2022-09-17 17:51:26 +0800 CST

SMART 测试在几次运行后自行修复

  • 1

我发现了一些奇怪的东西:

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%      8003         -
# 2  Extended offline    Completed: read failure       90%      8001         5907400
# 3  Extended offline    Completed: read failure       90%      8001         5907400
# 4  Extended offline    Completed: read failure       90%      8001         5907400
# 5  Extended offline    Completed: read failure       90%      8001         5907400
# 6  Short offline       Completed: read failure       80%      8001         5907400
# 7  Short offline       Completed: read failure       80%      8000         5907400
# 8  Extended offline    Completed without error       00%         1         -

我让驱动器抛出大量 ATA 错误,数据不可读。我决定对它进行 RMA,所以我运行了hdparm安全擦除程序并shred在它上面扔了一个。由于这是一个小型(500GB 三星 EVO)固态硬盘,因此运行速度相对较快。我跑了另一个smartctl -t short......它“修复”了自己。

该驱动器仍然具有ATA Error Count: 207以下属性:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   075   075   010    Pre-fail  Always       -       123
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       8004
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       27
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       4
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   075   075   010    Pre-fail  Always       -       123
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   075   075   010    Pre-fail  Always       -       123
187 Reported_Uncorrect      0x0032   099   099   000    Old_age   Always       -       207
190 Airflow_Temperature_Cel 0x0032   060   051   000    Old_age   Always       -       40
195 Hardware_ECC_Recovered  0x001a   199   199   000    Old_age   Always       -       207
199 UDMA_CRC_Error_Count    0x003e   099   099   000    Old_age   Always       -       1
235 Unknown_Attribute       0x0012   099   099   000    Old_age   Always       -       12
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       3737223587

是什么导致 SMART 测试突然“修复”自身?我不认为驱动器可以再信任了?但是,我怀疑三星现在是否会对其进行 RMA,因为它没有通过测试...

ssd smartctl
  • 1 个回答
  • 30 Views
Martin Hope
Stephen Boston
Asked: 2022-05-30 05:25:37 +0800 CST

新 SSD 上的 smartctl Power_Cycle_Count

  • 0

在我的系统上进行一次电源循环和一次 smartctl 长时间测试后,我的三星 EVO 1T SSD :

 ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

...

 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       6

...
 

那是VALUE:099关于什么的?考虑到自动化的 QA 周期,我希望肯定会少于 10 个。这是二手盘吗?或者 ...

ssd smartctl
  • 1 个回答
  • 47 Views
Martin Hope
AKG
Asked: 2022-01-30 09:46:09 +0800 CST

Unable to access "MyDevice" An operation is already pending 安装 SSD 时出现错误消息

  • 1

我的外部 SSD 过去常常无缝安装,直到最近发生事件。此后,SSD 被系统识别,但在尝试挂载时,显示以下错误消息:“无法访问“MyDevice”操作已挂起”。fdisk -l输出

Device      Start        End    Sectors  Size Type
/dev/sdb1      34     262177     262144  128M Microsoft reserved
/dev/sdb2  264192 5860532223 5860268032  2,7T Microsoft basic data

Partition 1 does not start on physical sector boundary.

事件是tar -zvcf由于未知原因中断了对 SSD 上存档的持续压缩操作。

一些可能有用的背景信息:我有一台带有 Ubuntu 18.04 的联想 X280。

有没有办法解决这个问题或更好地诊断它,以便安装再次工作?

编辑:

dmesg输出以下内容:

[ 4062.536004] sd 1:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 4062.536011] sd 1:0:0:0: [sdb] tag#0 Sense Key : Illegal Request [current] 
[ 4062.536016] sd 1:0:0:0: [sdb] tag#0 Add. Sense: Invalid field in cdb
[ 4062.536021] sd 1:0:0:0: [sdb] tag#0 CDB: Read(16) 88 00 00 00 00 00 00 07 52 f9 00 00 00 01 00 00
[ 4062.536026] print_req_error: critical target error, dev sdb, sector 479993
[ 4062.536036] Buffer I/O error on dev sdb2, logical block 215801, async page read
data-recovery ssd
  • 1 个回答
  • 649 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve