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
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1534506
Accepted
keith
keith
Asked: 2024-12-03 13:14:45 +0800 CST2024-12-03 13:14:45 +0800 CST 2024-12-03 13:14:45 +0800 CST

我的两个硬盘都坏了吗?这没有道理

  • 772

背景故事……我从旧的 dns-323 磁盘阵列中取出了 2 个 seagate 32000641AS 驱动器……我将它们放入我的 dell Precision T5600 中,因为 dns-323 太旧了,管理起来很麻烦。然后我在它们上面创建了两个单独的 XFS fs 并挂载了它们。我用来替换这些磁盘的是较小的 500G 驱动器……我将数据从它们复制到 300G usb 加密拇指驱动器上。放入 seagate 后,我将数据复制回来……我使用一个进行本地备份,另一个运行 virtualbox VM,但两个驱动器都有来自 usb 的相同数据。

我今天在两个驱动器的系统日志中注意到了这一点。

smartd[809]: Device: /dev/sda [SAT], 19 Currently unreadable (pending) sectors
smartd[809]: Device: /dev/sda [SAT], 19 Offline uncorrectable sectors
smartd[809]: Device: /dev/sda [SAT], 19 Currently unreadable (pending) sectors
smartd[809]: Device: /dev/sda [SAT], 19 Offline uncorrectable sectors

但是,没有性能问题。另外,当我从 USB 驱动器复制数据时,1 DIR 不会复制回来...它一直给我一个 I/O 错误...我不需要它所以我没有把它复制回来。

这是我在两个驱动器上都遇到完全相同的错误的原因吗?还是巧合?

所以我在 /dev/sdb1 上执行了 mkfs.ext4

我现在正在跑步 badblocks -s -v -n -f /dev/sda

Checking for bad blocks in non-destructive read-write mode
From block 0 to 1953514583
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern:   1.43% done, 36:36 elapsed. (0/0/0 errors)

到目前为止还没有出现坏块错误,但是后来我在系统日志中发现了这个

smartd[809]: Device: /dev/sda [SAT], 19 Currently unreadable (pending) sectors
smartd[809]: Device: /dev/sda [SAT], 19 Offline uncorrectable sectors
smartd[809]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 116 to 117
smartd[809]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 68 to 67
smartd[809]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 32 to 33
smartd[809]: Device: /dev/sdb [SAT], 35 Currently unreadable (pending) sectors
smartd[809]: Device: /dev/sdb [SAT], 35 Offline uncorrectable sectors
smartd[809]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 116 to 113
smartd[809]: Device: /dev/sdb [SAT], SMART Usage Attribute: 195 Hardware_ECC_Recovered changed from 35 to 49
disk-management
  • 2 2 个回答
  • 633 Views

2 个回答

  • Voted
  1. Best Answer
    Calum McConnell
    2024-12-03T13:35:19+08:002024-12-03T13:35:19+08:00

    是的!

    SMART 数据由硬盘固件本身生成;您实际上不可能在那里得到误报。如果智能数据显示您的两个驱动器上都有坏块,那么它们就是坏块。一些小块的旋转锈蚀已经变坏,并且无法修复它们。这是一个缓慢的过程;这是因为它们在之前的家中老化而发生的。数字一开始完全相同这一事实很有趣,但并不令人震惊;这些驱动器来自同一制造批次,因此具有非常相似的属性。如果您想确定,可以尝试查看固件更新;坏固件可能会导致设备错误地检测到错误。但是,可能的解释很简单;两个驱动器上都有坏块。

    现在,这不是世界末日;您丢失了一些数据(在驱动器上),驱动器可能会丢失更多数据,或者直接发生故障。但您可以继续使用它们,前提是所述数据也转移到另一个可能良好的驱动器上。根据您的 RAID 设置,当一个块出现故障时,它应该保留两个副本。不要将两个老化的驱动器合并为一个,因为当它们出现故障时,它们会一起出现。并xfs_scrub定期对 RAID 数据进行运行(或您喜欢的任何文件系统),以检测更多坏块。

    • 6
  2. heynnema
    2024-12-04T03:47:09+08:002024-12-04T03:47:09+08:00

    首先,您的数据:

    smartd[809]: Device: /dev/sda [SAT], 19 Currently unreadable (pending) sectors
    smartd[809]: Device: /dev/sda [SAT], 19 Offline uncorrectable sectors
    smartd[809]: Device: /dev/sda [SAT], 19 Currently unreadable (pending) sectors
    smartd[809]: Device: /dev/sda [SAT], 19 Offline uncorrectable sectors
    

    它看起来不像您的两个 Seagate 32000641AS 驱动器,而是您的启动驱动器 SDA。无论哪种情况,由于它们是 Seagate 2G 驱动器,因此它们应该格式化为 GPT,而不是 MBR 格式。

    关于:

    badblocks -s -v -n -f /dev/sda
    

    如果你看一下,man badblocks你会看到 badblocks 表示不要直接运行......

           For this reason, it is strongly recommended that users not run badblocks
           directly, but rather use the -c option of the e2fsck and mke2fs programs.
    

    解决磁盘坏块的正确方法是:

    sudo e2fsck -fccky /dev/sdXX# 其中 sdXX 是您要测试的驱动器

    -k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

    -fccky 参数...

       -f    Force checking even if the file system seems clean.
    
       -c    This option causes e2fsck to use badblocks(8) program to do
             a read-only scan of the device in order to find any bad blocks.
             If any bad blocks are found, they are added to the bad block
             inode to prevent them from being allocated to a file or direc‐
             tory.  If this option is specified twice, then the bad block scan
             will be done using a non-destructive read-write test.
    
       -k    When combined with the -c option, any existing bad blocks in the
             bad blocks list are preserved, and any new bad blocks found by
             running badblocks(8) will be added to the existing bad blocks
             list.
    
       -y    Assume an answer of `yes' to all questions; allows e2fsck to be
             used non-interactively. This option may not be specified at the
             same time as the -n or -p options.
    
    • 2

相关问题

  • 如何为 Ubuntu 11.04 提供更多空间(安装在 Windows 7 中时(通过 wubi))?[复制]

  • Shift-Delete 后我可以继续播放视频。关闭播放器时是否释放磁盘空间?

  • 相当于 KdirStat 的 Gnome

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve