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 / 问题 / 703733
Accepted
Stephen Boston
Stephen Boston
Asked: 2022-05-25 14:47:05 +0800 CST2022-05-25 14:47:05 +0800 CST 2022-05-25 14:47:05 +0800 CST

ssd 不会挂载:坏超级块但没有坏块:写入错误

  • 772

刚刚注意到我正在使用 SDD 作为 SSD。已更正

我需要帮助解释这种情况。/dev/sda是备份的数据磁盘并具有可重现的数据,因此这不是系统关键,但我想避免恢复/重建数据的工作,其中一些将非常耗时

是否可以恢复/修复?

如果有怎么办?如果我擦除磁盘以重新使用它的可靠性是什么?

摘要(详细报告如下):

  • 不会安装:坏超级块
  • badblocks 没有发现坏块
  • smartctl 没有报错
  • fsck 无法设置超级块标志
  • fdisk 显示干净的分区
  • dmesg 显示写入错误
  • parted 显示 792 GB 可用 1 TB 驱动器

挂载 ssd 失败,如下所示:

 [stephen@meer ~]$ sudo mount /dev/sda1 /mnt/sda
 mount: /mnt/sda: can't read superblock on /dev/sda1.
        dmesg(1) may have more information after failed mount system call.
 [stephen@meer ~]$ 
 

但 badblocks 没有发现坏块

 [root@meer stephen]# badblocks -v /dev/sda1              
 Checking blocks 0 to 976760831
 Checking for bad blocks (read-only test): done                                                 
 Pass completed, 0 bad blocks found. (0/0/0 errors)

但是 smartctl 没有发现错误

 [root@meer stephen]# smartctl -a /dev/sda 
 smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.17.9-arch1-1] (local build)
 Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
 
 === START OF INFORMATION SECTION ===
 Model Family:     WD Blue / Red / Green SSDs
 Device Model:     WDC  WDS100T2B0A-00SM50
 Serial Number:    213159800516
 LU WWN Device Id: 5 001b44 8bc4fdc6e
 Firmware Version: 415020WD
 User Capacity:    1,000,204,886,016 bytes [1.00 TB]
 Sector Size:      512 bytes logical/physical
 Rotation Rate:    Solid State Device
 Form Factor:      2.5 inches
 TRIM Command:     Available, deterministic, zeroed
 Device is:        In smartctl database 7.3/5319
 ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
 SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 1.5 Gb/s)
 Local Time is:    Tue May 24 16:06:23 2022 PDT
 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:           (0x11) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    No 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:   (  10) minutes.
 
 SMART Attributes Data Structure revision number: 4
 Vendor Specific SMART Attributes with Thresholds:
 ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
   5 Reallocated_Sector_Ct   0x0032   100   100   ---    Old_age   Always       -       124
   9 Power_On_Hours          0x0032   100   100   ---    Old_age   Always       -       1470
  12 Power_Cycle_Count       0x0032   100   100   ---    Old_age   Always       -       134
 165 Block_Erase_Count       0x0032   100   100   ---    Old_age   Always       -       4312400063
 166 Minimum_PE_Cycles_TLC   0x0032   100   100   ---    Old_age   Always       -       1
 167 Max_Bad_Blocks_per_Die  0x0032   100   100   ---    Old_age   Always       -       65
 168 Maximum_PE_Cycles_TLC   0x0032   100   100   ---    Old_age   Always       -       14
 169 Total_Bad_Blocks        0x0032   100   100   ---    Old_age   Always       -       630
 170 Grown_Bad_Blocks        0x0032   100   100   ---    Old_age   Always       -       124
 171 Program_Fail_Count      0x0032   100   100   ---    Old_age   Always       -       128
 172 Erase_Fail_Count        0x0032   100   100   ---    Old_age   Always       -       0
 173 Average_PE_Cycles_TLC   0x0032   100   100   ---    Old_age   Always       -       2
 174 Unexpected_Power_Loss   0x0032   100   100   ---    Old_age   Always       -       90
 184 End-to-End_Error        0x0032   100   100   ---    Old_age   Always       -       0
 187 Reported_Uncorrect      0x0032   100   100   ---    Old_age   Always       -       0
 188 Command_Timeout         0x0032   100   100   ---    Old_age   Always       -       64
 194 Temperature_Celsius     0x0022   070   053   ---    Old_age   Always       -       30 (Min/Max 18/53)
 199 UDMA_CRC_Error_Count    0x0032   100   100   ---    Old_age   Always       -       0
 230 Media_Wearout_Indicator 0x0032   001   001   ---    Old_age   Always       -       0x002600140026
 232 Available_Reservd_Space 0x0033   097   097   004    Pre-fail  Always       -       97
 233 NAND_GB_Written_TLC     0x0032   100   100   ---    Old_age   Always       -       2703
 234 NAND_GB_Written_SLC     0x0032   100   100   ---    Old_age   Always       -       2842
 241 Host_Writes_GiB         0x0030   253   253   ---    Old_age   Offline      -       466
 242 Host_Reads_GiB          0x0030   253   253   ---    Old_age   Offline      -       622
 244 Temp_Throttle_Status    0x0032   000   100   ---    Old_age   Always       -       0
 
 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 without error       00%      1470         -
 
 Selective Self-tests/Logging not supported
 
 

并且 fsck 失败了:

 [root@meer ~]# e2fsck -cfpv /dev/sda1
 /dev/sda1: recovering journal
 e2fsck: Input/output error while recovering journal of /dev/sda1
 e2fsck: unable to set superblock flags on /dev/sda1
 
 
 /dev/sda1: ********** WARNING: Filesystem still has errors **********
 
 
 
 
 
 May 24 15:38:29 meer kernel: I/O error, dev sda, sector 121899008 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
 May 24 15:38:29 meer kernel: sd 2:0:0:0: [sda] tag#31 CDB: Write(10) 2a 00 07 44 08 00 00 00 08 00
 May 24 15:38:29 meer kernel: sd 2:0:0:0: [sda] tag#31 Add. Sense: Unaligned write command
 May 24 15:38:29 meer kernel: sd 2:0:0:0: [sda] tag#31 Sense Key : Illegal Request [current] 
 May 24 15:38:29 meer kernel: sd 2:0:0:0: [sda] tag#31 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
 May 24 15:38:29 meer kernel: ata3.00: configured for UDMA/33
 May 24 15:38:29 meer kernel: ata3.00: error: { ABRT }
 May 24 15:38:29 meer kernel: ata3.00: status: { DRDY ERR }
 May 24 15:38:29 meer kernel: ata3.00: cmd ca/00:08:00:08:44/00:00:00:00:00/e7 tag 31 dma 4096 out
                                       res 51/04:08:00:08:44/00:00:07:00:00/e7 Emask 0x1 (device error)
 May 24 15:38:29 meer kernel: ata3.00: failed command: WRITE DMA
 May 24 15:38:29 meer kernel: ata3.00: irq_stat 0x40000001
 May 24 15:38:29 meer kernel: ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 May 24 15:38:29 meer kernel: ata3: EH complete
 May 24 15:38:29 meer kernel: ata3.00: configured for UDMA/33
 May 24 15:38:29 meer kernel: ata3.00: error: { ABRT }
 May 24 15:38:29 meer kernel: ata3.00: status: { DRDY ERR }
 May 24 15:38:29 meer kernel: ata3.00: cmd ca/00:08:00:08:44/00:00:00:00:00/e7 tag 6 dma 4096 out
                                       res 51/04:08:00:08:44/00:00:07:00:00/e7 Emask 0x1 (device error)
 May 24 15:38:29 meer kernel: ata3.00: failed command: WRITE DMA
 May 24 15:38:29 meer kernel: ata3.00: irq_stat 0x40000001
 May 24 15:38:29 meer kernel: ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 

fdisk 看到的分区。

 Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
 Disk model: WDC  WDS100T2B0A
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: gpt
 Disk identifier: 3F701164-2CF8-6D48-A94E-478634C140BE
 
 Device     Start        End    Sectors   Size Type
 /dev/sda1   2048 1953523711 1953521664 931.5G Linux filesystem

来自 dmesg

 [ 5292.895300] ata3.00: configured for UDMA/33
 [ 5292.895315] ata3: EH complete
 [ 5293.021851] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
 [ 5293.021859] ata3.00: irq_stat 0x40000001
 [ 5293.021864] ata3.00: failed command: WRITE DMA
 [ 5293.021866] ata3.00: cmd ca/00:08:00:08:44/00:00:00:00:00/e7 tag 18 dma 4096 out
                         res 51/04:08:00:08:44/00:00:07:00:00/e7 Emask 0x1 (device error)
 [ 5293.021874] ata3.00: status: { DRDY ERR }
 [ 5293.021877] ata3.00: error: { ABRT }

分开:

 root@meer stephen]# parted /dev/sda
 GNU Parted 3.5
 Using /dev/sda
 Welcome to GNU Parted! Type 'help' to view a list of commands.
 (parted) print free                                                       
 Model: ATA WDC WDS100T2B0A (scsi)
 Disk /dev/sda: 1000GB
 Sector size (logical/physical): 512B/512B
 Partition Table: gpt
 Disk Flags: 
 
 Number  Start   End     Size    File system  Name  Flags
         17.4kB  1049kB  1031kB  Free Space
  1      1049kB  1000GB  1000GB  ext4
         1000GB  1000GB  729kB   Free Space
 
disk smartctl
  • 1 1 个回答
  • 366 Views

1 个回答

  • Voted
  1. Best Answer
    Matthew Ife
    2022-05-26T01:24:30+08:002022-05-26T01:24:30+08:00

    我不知道你一直在用这个磁盘做什么,但这是疯狂的数字!查看 SSD 一直打开的输出:

    • 1470 小时(61 天)
    • 执行 4312400063 (2.0GiB) 块擦除
    • 163210068006 (76TiB) 媒体写入。

    在 61 天内,每秒写入量恒定为 16MiB。

    我想你有内部 NAND 故障。您可能无法取回您的数据。

    我建议您今后最好的解决方案是使用某种形式的 raid 镜像来缓冲多个磁盘之间的错误。

    理想情况下,尝试在多个磁盘之间分散错误和故障的分布是两个不同年龄和/或不同生产批次的磁盘。

    澄清一下,我认为在很短的时间内异常大量的写入。您需要将其考虑到您使用的存储设置中。

    • 3

相关问题

  • 除了邮件和日志之外,系统是否创建或扩展了任何文件?

  • 磁盘使用量相当于 Windows 任务管理器中的磁盘使用量

  • 如何使 zpool 使用可读字符串引用磁盘?

  • smartmontools - 自动测试是否与运行简短测试相同?

  • 为什么 ZFS 不报告磁盘已降级?

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