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 / 问题

问题[hard-disk](unix)

Martin Hope
QF0
Asked: 2024-11-29 00:35:07 +0800 CST

dd 是将图像写入驱动器的最佳方式吗?

  • 6

我正在使用此管道将图像文件写入驱动器$drive:

wget -o logfile -O - https://route/to/image.gz | \
         gunzip -c | \
         dd of="$drive" bs=4M conv=fdatasync 2>/dev/null

logfile是为了跟踪进度而创建的。

我对此有一种不祥的预感,无法说服自己这是万无一失的。图像本身总是 4MB 的倍数,所以这不是问题,但dd可能会造成问题(例如,请参阅此U&L 答案)。

是我太偏执了吗,或者有更好的方法可以做到这一点?

编辑

根据评论(感谢),我对head -c和dd bs=1将图像写入驱动器进行了基准测试。TL;DR:dd在这个应用程序中基本上毫无意义。远程服务器上的图像通过 gzip 压缩到大约 46M,因此dd与一起使用bs=1,所以这对来说可能有点不公平dd。使用检索图像wget,动态压缩,然后使用head -c或写入驱动器dd bs=1:

选项 1:

# time wget -o logfile -O - https://path/to/foo.img.gz | \
       gunzip -c | \
       dd of=/dev/sda bs=1 conv=fdatasync 2>/dev/null
    real    1m55.665s
    user    0m32.323s
    sys     2m20.841s

选项 2:

# time wget -o logfile -O - https://path/to/foo.img.gz | \
       gunzip -c | \
       cat > /dev/sda 2>/dev/null
    real    0m7.419s
    user    0m0.646s
    sys     0m0.507s

通过获取驱动器的前 48159047 个字节md5sum对这两个选项进行了测试sha256sum,并且都给出了正确的预压缩md5sum,并sha256sum在服务器上找到了:

# time head -c 48159047 /dev/sda | md5sum
b3df12b61df3121ad112f825cc6fe8b7  -

real    0m0.222s
user    0m0.075s
sys     0m0.049s

# time dd status=none if=/dev/sda bs=1 count=48159047 | md5sum
b3df12b61df3121ad112f825cc6fe8b7  -

real    1m31.627s
user    0m49.218s
sys     1m45.406s

结果sha256sum大致相同: 的实际时间约为 0.25 秒head -c, 的实际时间约为 1 分 32 秒dd。

hard-disk
  • 1 个回答
  • 80 Views
Martin Hope
Matthias Ronge
Asked: 2024-11-28 21:08:03 +0800 CST

根分区没有 fstab,这是怎么回事?

  • 6

我没有设置,只是维护的系统(Debian 10 / Buster):

root@host:~# df -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/p100p1502lp1  4.0T  3.2T  667G  83% /
none                24G     0   24G   0% /sys/fs/cgroup
none                24G     0   24G   0% /dev
tmpfs               24G     0   24G   0% /dev/shm
tmpfs               24G  2.5G   22G  11% /run
tmpfs              5.0M     0  5.0M   0% /run/lock
none                24G     0   24G   0% /run/shm

但:

root@host:~# cat /etc/fstab
proc  /proc       proc    defaults    0    0
none  /dev/pts    devpts  rw,gid=5,mode=620    0    0
none  /run/shm    tmpfs   defaults    0    0

为什么有一个根分区,但却没有它的条目/etc/fstab/?

hard-disk
  • 2 个回答
  • 104 Views
Martin Hope
quixotrykd
Asked: 2024-07-04 13:40:57 +0800 CST

Raid 0+1 失败案例 VS. Raid 1+0

  • 8

我听说 RAID 1+0 比 RAID 0+1 更易于发生故障,因为辅助驱动器故障比 RAID 1+0 更容易导致 RAID 0+1 中的数据丢失。

RAID 0+1 示例

在上图中,如果“磁盘 1”发生故障,其他哪些磁盘故障会导致数据丢失?我读到的内容似乎表明“组 2”中任何驱动器的丢失都会导致数据丢失,但我不清楚这背后的原因。如果我们丢失了“磁盘 5”,为什么会导致数据丢失?在我看来,有足够的信息来恢复完整的数据状态 - 例如,将“磁盘 4”+“磁盘 2”+“磁盘 3”组合起来,应该具有继续正常运行而不会丢失数据所需的所有信息。

那么为什么“磁盘1”和“磁盘5”丢失会导致数据丢失呢?

提前致谢!

hard-disk
  • 1 个回答
  • 437 Views
Martin Hope
palmasd1
Asked: 2023-11-28 20:40:14 +0800 CST

是否需要更换驱动器?

  • 5

由于 SmartCTL 检查的状态而收到警告FAILED!。

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
- NVM subsystem reliability has been degraded

同事说这是因为驱动器监控不正确,没有什么不好的。

但看起来并非如此。

是否需要更换驱动器?

SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x04
Temperature: 36 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 100%
Data Units Read: 1,688,838,473 [864 TB]
Data Units Written: 1,293,261,847 [662 TB]
Host Read Commands: 5,457,149,587
Host Write Commands: 3,494,810,022
Controller Busy Time: 62,331
Power Cycles: 30
Power On Hours: 19,491
Unsafe Shutdowns: 15
Media and Data Integrity Errors: 0
Error Information Log Entries: 96
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 36 Celsius
Temperature Sensor 2: 48 Celsius

该Percentage Used: 100%字段是否意味着所有可用磁盘资源(估计保证无问题使用)已耗尽,需要更换磁盘?

hard-disk
  • 1 个回答
  • 59 Views
Martin Hope
ChennyStar
Asked: 2023-11-14 01:16:16 +0800 CST

将 HDD 的逻辑扇区大小设置为 4Kn 有什么好处吗?

  • 6

现代 HDD 都是“高级格式”的,例如默认情况下它们报告的逻辑/物理扇区大小为 512/4096。

默认情况下,大多数 Linux 格式化工具使用 4096 字节的块大小(至少这是 Debian/EXT4 上的默认值)。

直到今天,我还认为这是一种优化:Linux/EXT4 将 4K 数据块发送到 HDD,HDD 可以最佳地处理它们,即使其逻辑扇区大小为 512K。

但今天我读到了这篇最近(2021)的文章。该人做了一些 HDD 基准测试,以检查将 HDD 的逻辑扇区大小从 512e 切换到 4Kn 是否会提供更好的性能。他的结论是:

请记住:我的理论是文件系统使用 4k 块,并且所有内容都正确对齐,因此不应该有有意义的差异。

这成立吗?嗯,不。一点也不。(...) 使用 4kb 块...这里有一个非常大的差异。这是单线程基准测试,但在 4kb 块传输上,4k 扇区驱动器始终存在巨大领先优势。(...)

结论:使用 4k 扇区!
就我而言,这里的结论非常清楚。如果您拥有可以处理 4k 扇区的现代操作系统,并且您的驱动器支持以 512 字节或 4k 扇区运行,请在执行其他操作之前将驱动器转换为 4k 本机扇区。然后继续你的方式,让操作系统来处理它。

基本上,他的结论是,与开箱即用的 512e 相比,将 HDD 的逻辑扇区大小切换为 4Kn 后性能得到了相当大的改进:

在此输入图像描述

现在,需要注意的重要一点是:该特定基准测试是单线程的。他还做了一个 4 线程基准测试,结果显示 512e 和 4Kn 之间没有任何显着差异。

因此我的问题是:

  • 仅当您有在驱动器上读/写的单线程进程时,他的结论才成立。Linux有这样的单线程进程吗?
  • 因此,您是否建议将 HDD 的逻辑扇区大小设置为 4Kn ?
hard-disk
  • 2 个回答
  • 199 Views
Martin Hope
GCag
Asked: 2023-07-16 17:27:46 +0800 CST

诊断不可写硬盘

  • 6

我目前正在处理一个硬盘,我无法写入该硬盘,但我不明白其原因。以下是我对这个问题的观察:

  1. 运行只读基准测试效果很好;读取速度和访问时间看起来不错

  2. 运行写入基准测试不会产生结果并且似乎“挂起”

  3. 任何尝试写入磁盘的应用程序或进程都会挂起直至终止,包括尝试格式化磁盘时的 gparted。在格式化尝试期间的某个时刻,出现“写入 /dev/sda 期间出现输入/输出错误”。Buffer I/O logical block <some_number> lost during async write我看到的唯一其他明显的错误消息是有时在关机期间显示的类似内容。

  4. 自检的 Smartctl 输出看起来很好,让我相信这可能不是物理问题

  5. 该命令fdisk -l为受影响的磁盘返回以下输出:

Device         Start        End    Sectors   Size Type
/dev/sda1         63     532542     532480   260M EFI System
/dev/sda2     532543  498340557  497808015 237,4G Microsoft basic data
/dev/sda5  498341888 1953519615 1455177728 693,9G Linux filesystem

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.


GPT PMBR size mismatch (4100491 != 15701758) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
  1. 刚才我确实听到磁盘里传来一些类似刮擦的声音。

因此,特别是由于第 6 点,我假设 HDD 中存在物理损坏,但话又说回来,我希望 smartctl 能够指出这一点。不幸的是,我对此类问题缺乏经验,因此,如果有人知道我可以采取任何其他诊断步骤来确认磁盘确实已损坏,我将不胜感激。

\dmesg编辑:根据要求,我在此处添加运行写入基准测试时的输出。基准测试本身停留在第一个样本上,如下所示。

[ 1090.321553] ata5.00: exception Emask 0x0 SAct 0x9801ffff SErr 0x50000 action 0x6 frozen
[ 1090.321562] ata5: SError: { PHYRdyChg CommWake }
[ 1090.321569] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321580] ata5.00: cmd 61/d0:00:40:0d:00/02:00:00:00:00/40 tag 0 ncq dma 368640 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321584] ata5.00: status: { DRDY }
[ 1090.321588] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321598] ata5.00: cmd 61/40:08:10:10:00/05:00:00:00:00/40 tag 1 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321602] ata5.00: status: { DRDY }
[ 1090.321605] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321614] ata5.00: cmd 61/c8:10:50:15:00/02:00:00:00:00/40 tag 2 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321618] ata5.00: status: { DRDY }
[ 1090.321622] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321630] ata5.00: cmd 61/48:18:18:18:00/05:00:00:00:00/40 tag 3 ncq dma 692224 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321634] ata5.00: status: { DRDY }
[ 1090.321638] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321646] ata5.00: cmd 61/c0:20:60:1d:00/02:00:00:00:00/40 tag 4 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321650] ata5.00: status: { DRDY }
[ 1090.321654] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321662] ata5.00: cmd 61/48:28:20:20:00/05:00:00:00:00/40 tag 5 ncq dma 692224 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321666] ata5.00: status: { DRDY }
[ 1090.321670] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321678] ata5.00: cmd 61/c0:30:68:25:00/02:00:00:00:00/40 tag 6 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321682] ata5.00: status: { DRDY }
[ 1090.321686] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321694] ata5.00: cmd 61/40:38:28:28:00/05:00:00:00:00/40 tag 7 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321698] ata5.00: status: { DRDY }
[ 1090.321701] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321710] ata5.00: cmd 61/c0:40:68:2d:00/02:00:00:00:00/40 tag 8 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321714] ata5.00: status: { DRDY }
[ 1090.321717] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321726] ata5.00: cmd 61/40:48:28:30:00/05:00:00:00:00/40 tag 9 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321730] ata5.00: status: { DRDY }
[ 1090.321733] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321742] ata5.00: cmd 61/c8:50:68:35:00/02:00:00:00:00/40 tag 10 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321746] ata5.00: status: { DRDY }
[ 1090.321749] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321758] ata5.00: cmd 61/40:58:30:38:00/05:00:00:00:00/40 tag 11 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321762] ata5.00: status: { DRDY }
[ 1090.321765] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321774] ata5.00: cmd 61/c0:60:70:3d:00/02:00:00:00:00/40 tag 12 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321778] ata5.00: status: { DRDY }
[ 1090.321781] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321790] ata5.00: cmd 61/40:68:30:40:00/05:00:00:00:00/40 tag 13 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321794] ata5.00: status: { DRDY }
[ 1090.321797] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321806] ata5.00: cmd 61/c8:70:70:45:00/02:00:00:00:00/40 tag 14 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321810] ata5.00: status: { DRDY }
[ 1090.321813] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321822] ata5.00: cmd 61/48:78:38:48:00/05:00:00:00:00/40 tag 15 ncq dma 692224 out
                        res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321826] ata5.00: status: { DRDY }
[ 1090.321829] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321838] ata5.00: cmd 61/80:80:80:4d:00/02:00:00:00:00/40 tag 16 ncq dma 327680 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321841] ata5.00: status: { DRDY }
[ 1090.321845] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321854] ata5.00: cmd 61/40:d8:00:00:00/05:00:00:00:00/40 tag 27 ncq dma 688128 out
                        res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321858] ata5.00: status: { DRDY }
[ 1090.321861] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321870] ata5.00: cmd 61/c0:e0:40:05:00/02:00:00:00:00/40 tag 28 ncq dma 360448 out
                        res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321874] ata5.00: status: { DRDY }
[ 1090.321877] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1090.321886] ata5.00: cmd 61/40:f8:00:08:00/05:00:00:00:00/40 tag 31 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1090.321890] ata5.00: status: { DRDY }
[ 1090.321896] ata5: hard resetting link
[ 1090.636674] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1090.646800] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1090.646806] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1090.646811] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1090.651025] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1090.651032] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1090.651036] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1090.652207] ata5.00: configured for UDMA/100
[ 1090.652755] ata5: EH complete
[ 1121.030386] ata5.00: exception Emask 0x0 SAct 0xfcfffc SErr 0x40000 action 0x6 frozen
[ 1121.030399] ata5: SError: { CommWake }
[ 1121.030408] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030425] ata5.00: cmd 61/40:10:00:08:00/05:00:00:00:00/40 tag 2 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030430] ata5.00: status: { DRDY }
[ 1121.030436] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030451] ata5.00: cmd 61/c0:18:40:05:00/02:00:00:00:00/40 tag 3 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030457] ata5.00: status: { DRDY }
[ 1121.030462] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030471] ata5.00: cmd 61/40:20:00:00:00/05:00:00:00:00/40 tag 4 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030475] ata5.00: status: { DRDY }
[ 1121.030479] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030488] ata5.00: cmd 61/80:28:80:4d:00/02:00:00:00:00/40 tag 5 ncq dma 327680 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030491] ata5.00: status: { DRDY }
[ 1121.030495] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030504] ata5.00: cmd 61/48:30:38:48:00/05:00:00:00:00/40 tag 6 ncq dma 692224 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030507] ata5.00: status: { DRDY }
[ 1121.030511] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030520] ata5.00: cmd 61/c8:38:70:45:00/02:00:00:00:00/40 tag 7 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030523] ata5.00: status: { DRDY }
[ 1121.030527] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030535] ata5.00: cmd 61/40:40:30:40:00/05:00:00:00:00/40 tag 8 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030539] ata5.00: status: { DRDY }
[ 1121.030543] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030551] ata5.00: cmd 61/c0:48:70:3d:00/02:00:00:00:00/40 tag 9 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030555] ata5.00: status: { DRDY }
[ 1121.030558] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030568] ata5.00: cmd 61/40:50:30:38:00/05:00:00:00:00/40 tag 10 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030571] ata5.00: status: { DRDY }
[ 1121.030575] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030584] ata5.00: cmd 61/c8:58:68:35:00/02:00:00:00:00/40 tag 11 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030587] ata5.00: status: { DRDY }
[ 1121.030591] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030600] ata5.00: cmd 61/40:60:28:30:00/05:00:00:00:00/40 tag 12 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030603] ata5.00: status: { DRDY }
[ 1121.030607] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030616] ata5.00: cmd 61/c0:68:68:2d:00/02:00:00:00:00/40 tag 13 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030619] ata5.00: status: { DRDY }
[ 1121.030623] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030632] ata5.00: cmd 61/40:70:28:28:00/05:00:00:00:00/40 tag 14 ncq dma 688128 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030635] ata5.00: status: { DRDY }
[ 1121.030639] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030648] ata5.00: cmd 61/c0:78:68:25:00/02:00:00:00:00/40 tag 15 ncq dma 360448 out
                        res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030651] ata5.00: status: { DRDY }
[ 1121.030655] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030664] ata5.00: cmd 61/48:90:20:20:00/05:00:00:00:00/40 tag 18 ncq dma 692224 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030667] ata5.00: status: { DRDY }
[ 1121.030671] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030680] ata5.00: cmd 61/c0:98:60:1d:00/02:00:00:00:00/40 tag 19 ncq dma 360448 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030683] ata5.00: status: { DRDY }
[ 1121.030687] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030696] ata5.00: cmd 61/48:a0:18:18:00/05:00:00:00:00/40 tag 20 ncq dma 692224 out
                        res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030699] ata5.00: status: { DRDY }
[ 1121.030703] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030712] ata5.00: cmd 61/c8:a8:50:15:00/02:00:00:00:00/40 tag 21 ncq dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030715] ata5.00: status: { DRDY }
[ 1121.030719] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030728] ata5.00: cmd 61/40:b0:10:10:00/05:00:00:00:00/40 tag 22 ncq dma 688128 out
                        res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030731] ata5.00: status: { DRDY }
[ 1121.030735] ata5.00: failed command: WRITE FPDMA QUEUED
[ 1121.030743] ata5.00: cmd 61/d0:b8:40:0d:00/02:00:00:00:00/40 tag 23 ncq dma 368640 out
                        res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1121.030747] ata5.00: status: { DRDY }
[ 1121.030753] ata5: hard resetting link
[ 1121.345937] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1121.358873] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1121.358880] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1121.358884] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1121.363203] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1121.363209] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1121.363214] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1121.364412] ata5.00: configured for UDMA/100
[ 1121.364968] ata5: EH complete
[ 1209.075840] INFO: task gnome-disks:8463 blocked for more than 120 seconds.
[ 1209.075852]       Tainted: P           OE     5.4.0-153-generic #170-Ubuntu
[ 1209.075854] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1209.075858] gnome-disks     D    0  8463   2344 0x00004000
[ 1209.075863] Call Trace:
[ 1209.075878]  __schedule+0x2e3/0x740
[ 1209.075885]  schedule+0x42/0xb0
[ 1209.075891]  io_schedule+0x16/0x40
[ 1209.075899]  __blkdev_direct_IO+0x353/0x450
[ 1209.075906]  ? check_preempt_curr+0x4e/0x90
[ 1209.075911]  blkdev_direct_IO+0x4d/0x70
[ 1209.075919]  generic_file_direct_write+0x9c/0x170
[ 1209.075926]  __generic_file_write_iter+0xbc/0x1d0
[ 1209.075931]  blkdev_write_iter+0xb8/0x160
[ 1209.075940]  new_sync_write+0x125/0x1c0
[ 1209.075949]  __vfs_write+0x29/0x40
[ 1209.075952]  vfs_write+0xb9/0x1a0
[ 1209.075957]  ksys_write+0x67/0xe0
[ 1209.075962]  __x64_sys_write+0x1a/0x20
[ 1209.075975]  do_syscall_64+0x57/0x190
[ 1209.075980]  entry_SYSCALL_64_after_hwframe+0x5c/0xc1
[ 1209.075984] RIP: 0033:0x7efc3d2f132f
[ 1209.075992] Code: Bad RIP value.
[ 1209.075995] RSP: 002b:00007efc32dc59a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
[ 1209.075999] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efc3d2f132f
[ 1209.076002] RDX: 0000000000a00000 RSI: 00007efc313c4000 RDI: 000000000000000b
[ 1209.076004] RBP: 000055a1a5d5d010 R08: 0000000000000000 R09: 0000000000000423
[ 1209.076005] R10: 00007ffdf2cc2090 R11: 0000000000000293 R12: 000000000000000b
[ 1209.076007] R13: 00007efc313c4000 R14: 0000000000001000 R15: 00007efc32dc5a50
[ 1213.183836] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x40000 action 0x6 frozen
[ 1213.183845] ata5: SError: { CommWake }
[ 1213.183852] ata5.00: failed command: WRITE DMA EXT
[ 1213.183865] ata5.00: cmd 35/00:c8:68:35:00/00:02:00:00:00/e0 tag 17 dma 364544 out
                        res 40/00:ff:ff:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 1213.183869] ata5.00: status: { DRDY }
[ 1213.183876] ata5: hard resetting link
[ 1213.498788] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1213.501523] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1213.501530] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1213.501534] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1213.505634] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 1213.505640] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 1213.505645] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 1213.506879] ata5.00: configured for UDMA/100
[ 1213.507257] ata5: EH complete

基准停留在第一个样本上: 基准停留在第一个样本

hard-disk
  • 1 个回答
  • 21 Views
Martin Hope
jameszp
Asked: 2023-07-09 11:04:00 +0800 CST

SMART 错误 (CurrentPendingSector) 和 (OfflineUn CorrectableSector)

  • 6

几个月来我每天都会收到以下错误消息,并且我不知道如何停止接收这些消息。

CurrentPendingSector

This message was generated by the smartd daemon running on:

   host name:  myhost
   DNS domain: [Empty]

The following warning/error was logged by the smartd daemon:

Device: /dev/sda [SAT], 6 Currently unreadable (pending) sectors

Device info:
KingFast, S/N:03112222C0002, FW:U0803A0, 256 GB

For details see host's SYSLOG.

You can also use the smartctl utility for further investigation.
The original message about this issue was sent at Fri Feb  3 19:41:29 2023 PST
Another message will be sent in 24 hours if the problem persists.

OfflineUncorrectableSector

This message was generated by the smartd daemon running on:

   host name:  myhost
   DNS domain: [Empty]

The following warning/error was logged by the smartd daemon:

Device: /dev/sda [SAT], 3 Offline uncorrectable sectors

Device info:
KingFast, S/N:03112222C0002, FW:U0803A0, 256 GB

For details see host's SYSLOG.

You can also use the smartctl utility for further investigation.
The original message about this issue was sent at Fri Feb  3 19:41:29 2023 PST
Another message will be sent in 24 hours if the problem persists.

smartctl -a /dev/sda

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.19.0-46-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     KingFast
Serial Number:    03112222C0002
Firmware Version: U0803A0
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Jul  8 15:44:59 2023 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:  (0x02) Offline data collection activity
                    was completed without error.
                    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:        (  120) 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:            (0x0002) Does not save 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       6
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       3335
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       440
160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       3
161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       86
163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       26
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       79004
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       481
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       6
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       114
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       5050
169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       98
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       6
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       88
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       35
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       3
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       6
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       3
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       86
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       168900
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       815543
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       191939

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  Short offline       Completed without error       00%      3329         -
# 2  Short offline       Completed without error       00%      3325         -
# 3  Short offline       Completed without error       00%      3321         -
# 4  Short offline       Completed without error       00%      3313         -
# 5  Short offline       Completed without error       00%      3309         -
# 6  Short offline       Completed without error       00%      3306         -
# 7  Extended offline    Completed without error       00%      3250         -
# 8  Extended offline    Completed without error       00%      3232         -
# 9  Extended offline    Completed without error       00%      3229         -
#10  Extended offline    Completed without error       00%       976         -
#11  Extended offline    Completed without error       00%       968         -

Selective Self-tests/Logging not supported

我试图忽略with中的197和198错误/etc/smartd.conf

/dev/sda -d removable -n standby -H -l error -l selftest -f -t -I 197 -I 198 -s (S/../.././(01|09|17)|L/../../3/11) -m root -M exec /usr/share/smartmontools/smartd-runner

无济于事。

LBA_of_first_error我在自检部分也没有看到任何内容。

对我来说,这似乎SMART overall-health self-assessment test result: PASSED 是健康的,并且自检没有返回任何错误。我目前的理解是磁盘看起来很健康,但仍然错误地发送这些消息。

我缺少什么吗?

该/dev/sda驱动器是 KingFast 256 GB SSD,我不确定这是否相关,因为我在网上找不到该特定驱动器或制造商的任何信息。

我怎样才能停止接收这些消息,但仍然对驱动器上的其他真正问题进行智能监控?如果此错误消息确实表明驱动器存在问题,我将如何解决该问题?

谢谢!

编辑:

运行后smartctl -t long /dev/sda,我有

smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.19.0-46-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     KingFast
Serial Number:    03112222C0002
Firmware Version: U0803A0
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jul  9 10:05:33 2023 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:  (0x03) Offline data collection activity
                    is in progress.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      ( 241) Self-test routine in progress...
                    10% of test remaining.
Total time to complete Offline 
data collection:        (  600) 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:            (0x0002) Does not save 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       6
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       3341
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       441
160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       3
161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       86
163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       26
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       79553
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       482
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       6
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       115
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       5050
169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       98
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       6
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       88
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       46
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       3
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       6
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       3
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       86
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       170468
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       815560
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       193199

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  Short offline       Completed without error       00%      3337         -
# 2  Short offline       Completed without error       00%      3329         -
# 3  Short offline       Completed without error       00%      3325         -
# 4  Short offline       Completed without error       00%      3321         -
# 5  Short offline       Completed without error       00%      3313         -
# 6  Short offline       Completed without error       00%      3309         -
# 7  Short offline       Completed without error       00%      3306         -
# 8  Extended offline    Completed without error       00%      3250         -
# 9  Extended offline    Completed without error       00%      3232         -
#10  Extended offline    Completed without error       00%      3229         -
#11  Extended offline    Completed without error       00%       976         -
#12  Extended offline    Completed without error       00%       968         -

Selective Self-tests/Logging not supported

#12 扩展离线测试Completed without error,所以我不太确定我应该从这里做什么。

编辑#2:

我还运行了以下命令,我相信这表明驱动器没有错误:

badblocks -sv /dev/sda
Checking blocks 0 to 250059095
Checking for bad blocks (read-only test): done                                                 
Pass completed, 0 bad blocks found. (0/0/0 errors)
dd if=/dev/sda of=/dev/null bs=64K conv=noerror
3907173+1 records in
3907173+1 records out
256060514304 bytes (256 GB, 238 GiB) copied, 485.648 s, 527 MB/s
hard-disk
  • 1 个回答
  • 43 Views
Martin Hope
sgbrown
Asked: 2023-06-10 20:20:04 +0800 CST

Smartctl 是否需要文件系统来运行测试,我的驱动器是否可以?

  • 5

我有一个全新的驱动器,我想在使用前对其进行测试。刚刚安装它,没有格式化/分区,也没有在它上面创建文件系统。 我做的第一件事是检查 smartctl 统计数据,然后开始一个长期的俘虏测试。

等待所需的 12 小时后,我注意到测试被中断,并记录了一个错误。我又开始了两次测试,每次启动测试时都会立即记录错误。请参阅下面的 smartctl 统计信息:

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-150-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     ST8000NM017B-2TJ103
Serial Number:    WWZ2AFQF
LU WWN Device Id: 5 000c50 0e71315e1
Firmware Version: SN01
User Capacity:    8,001,563,222,016 bytes [8.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Jun 10 08:08:32 2023 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:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (  41) The self-test routine was interrupted
                                        by the host with a hard or soft reset.
Total time to complete Offline
data collection:                (  567) 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:        (   1) minutes.
Extended self-test routine
recommended polling time:        ( 702) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x70bd) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
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   044    Pre-fail  Always       -       9402
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       1
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   100   253   045    Pre-fail  Always       -       21867
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       17
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       1
 18 Unknown_Attribute       0x000b   100   100   050    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   253   000    Old_age   Always       -       12885098499
190 Airflow_Temperature_Cel 0x0022   067   066   000    Old_age   Always       -       33 (Min/Max 24/34)
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       1
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       39
194 Temperature_Celsius     0x0022   033   040   000    Old_age   Always       -       33 (0 24 0 0 0)
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   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       0 (137 91 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       0
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       9402

SMART Error Log Version: 1
ATA Error Count: 3
        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 3 occurred at disk power-on lifetime: 17 hours (0 days + 17 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 51 00 00 00 00 00  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  00 00 00 00 00 00 00 ff      17:21:46.602  NOP [Abort queued commands]
  b0 d4 00 82 4f c2 00 00      17:20:45.112  SMART EXECUTE OFF-LINE IMMEDIATE
  b0 d0 01 00 4f c2 00 00      17:20:45.112  SMART READ DATA
  ec 00 01 00 00 00 00 00      17:20:45.105  IDENTIFY DEVICE
  ec 00 01 00 00 00 00 00      17:20:45.104  IDENTIFY DEVICE
Error 2 occurred at disk power-on lifetime: 17 hours (0 days + 17 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 51 00 00 00 00 00  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  00 00 00 00 00 00 00 ff      17:15:48.188  NOP [Abort queued commands]
  b0 d4 00 82 4f c2 00 00      17:14:46.401  SMART EXECUTE OFF-LINE IMMEDIATE
  b0 d0 01 00 4f c2 00 00      17:14:46.400  SMART READ DATA
  ec 00 01 00 00 00 00 00      17:14:46.392  IDENTIFY DEVICE
  ec 00 01 00 00 00 00 00      17:14:46.391  IDENTIFY DEVICE

Error 1 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
  When the command that caused the error occurred, the device was in an unknown state.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 51 00 00 00 00 00  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  00 00 00 00 00 00 00 ff      00:08:36.002  NOP [Abort queued commands]
  b0 d4 00 82 4f c2 00 00      00:07:34.853  SMART EXECUTE OFF-LINE IMMEDIATE
  b0 d0 01 00 4f c2 00 00      00:07:34.814  SMART READ DATA
  ec 00 01 00 00 00 00 00      00:07:34.806  IDENTIFY DEVICE
  ec 00 01 00 00 00 00 00      00:07:34.805  IDENTIFY DEVICE

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended captive    Interrupted (host reset)      90%        17         -
# 2  Extended captive    Interrupted (host reset)      90%        17         -
# 3  Extended captive    Interrupted (host reset)      90%         0         -

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 的格式,如果这些值只是编码......

Smartctl 不需要格式化的驱动器/带有文件系统的驱动器才能正常运行,对吗?这是意想不到的结果?如果是这样,在 RMA 之前我还应该运行其他测试吗?提前谢谢你的帮助!

hard-disk
  • 1 个回答
  • 25 Views
Martin Hope
Kokizzu
Asked: 2023-06-06 15:14:06 +0800 CST

禁止坏磁盘发送垃圾邮件 dmesg/journalctl

  • 5

是否可以使用命令行禁用磁盘?我收到这样的垃圾邮件:

[2245922.091035] ata3: EH complete
[2245922.150696] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[2245922.150701] ata3.00: irq_stat 0x40000001
[2245922.150703] ata3.00: failed command: FLUSH CACHE EXT
[2245922.150704] ata3.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 18
                          res 71/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error)
[2245922.150708] ata3.00: status: { DRDY DF ERR }
[2245922.150709] ata3.00: error: { ABRT }
[2245922.151027] ata3.00: configured for UDMA/33
[2245922.151030] ata3.00: device reported invalid CHS sector 0
[2245922.151034] ata3: EH complete
[2245922.238686] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[2245922.238692] ata3.00: irq_stat 0x40000001
[2245922.238696] ata3.00: failed command: FLUSH CACHE EXT
[2245922.238697] ata3.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 24
                          res 71/04:00:00:00:00/00:00:00:00:00/a0 Emask 0x1 (device error)
[2245922.238701] ata3.00: status: { DRDY DF ERR }
[2245922.238702] ata3.00: error: { ABRT }
[2245922.239043] ata3.00: configured for UDMA/33
[2245922.239047] ata3.00: device reported invalid CHS sector 0
[2245922.239053] sd 2:0:0:0: [sdd] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[2245922.239056] sd 2:0:0:0: [sdd] tag#24 Sense Key : Illegal Request [current]
[2245922.239058] sd 2:0:0:0: [sdd] tag#24 Add. Sense: Unaligned write command
[2245922.239060] sd 2:0:0:0: [sdd] tag#24 CDB: Synchronize Cache(10) 35 00 00 00 00 00 00 00 00 00
[2245922.239063] I/O error, dev sdd, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 3

有问题的磁盘未安装并已从中删除/etc/fstab

sdd             8:48   0 223.6G  0 disk
├─sdd1          8:49   0   1.9G  0 part
├─sdd2          8:50   0     1K  0 part
└─sdd5          8:53   0 221.7G  0 part

# 256GB GALAX SSD
#UUID=48c76170-0392-44ce-a8c6-f790673c8f32 /media/asd/galax250 ext4 noatime,user 0 0

还没有重新启动,因为我还在使用电脑。它使一切都有点滞后。

影驰固态硬盘

hard-disk
  • 1 个回答
  • 22 Views
Martin Hope
iago
Asked: 2023-05-30 12:18:26 +0800 CST

外部硬盘驱动器成为文件系统类型错误的只读文件系统

  • 5

我有一个带有 ext4 文件系统的 Toshiba HDD,直到昨天我一直在广泛使用它。突然变成了只读文件系统,运行时fdisk -l显示类型为HPFS/NTFS/exFAT.

读取文件系统突然变成只读;如何调试这个?,我尝试过dmesg,并且在它显示的其他行中(如那里的答案中所建议的那样)

  367.274847] EXT4-fs error (device sdb1): ext4_validate_block_bitmap:390: comm nextcloud: bg 7398: bad block bitmap checksum
[  367.285558] Aborting journal on device sdb1-8.
[  367.297425] EXT4-fs (sdb1): Remounting filesystem read-only
[  513.153456] EXT4-fs (sdb1): error count since last fsck: 5
[  513.153491] EXT4-fs (sdb1): initial error at time 1685397473: ext4_validate_block_bitmap:390
[  513.153509] EXT4-fs (sdb1): last error at time 1685418194: ext4_validate_block_bitmap:390

确实,我可能上次工作时没有完全卸载它。

我该如何解决这个问题?

更新

的输出sudo smartctl -a /dev/sdb是

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-23-amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MQ04UBF... (USB 3.0)
Device Model:     TOSHIBA MQ04UBF100
Serial Number:    Z0IKT0JIT
LU WWN Device Id: 0 000000 000000000
Firmware Version: JU003U
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Zoned Device:     Device managed zones
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.3, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue May 30 16:22:45 2023 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
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:        (  120) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    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:    ( 175) 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     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       2455
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       5725
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   093   093   000    Old_age   Always       -       2976
 10 Spin_Retry_Count        0x0033   214   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       960
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       17
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       120
193 Load_Cycle_Count        0x0032   099   099   000    Old_age   Always       -       13534
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       26 (Min/Max 15/57)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   253   000    Old_age   Always       -       0
220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       0
222 Loaded_Hours            0x0032   100   100   000    Old_age   Always       -       182
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       280
240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       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  Short offline       Completed without error       00%      1003         -

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.


的输出fdisk -l

Disk /dev/sdb: 931.51 GiB, 1000204883968 bytes, 1953525164 sectors
Disk model: External USB 3.0
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: dos
Disk identifier: 0x558ebb3c

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1  *     2048 1953522863 1953520816 931.5G  7 HPFS/NTFS/exFAT
hard-disk
  • 1 个回答
  • 46 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