读取故障磁盘的 SMART 结果

读取故障磁盘的 SMART 结果

我最近开始遇到戴尔笔记本电脑的问题,如果能提供任何关于下一步如何解决的建议,我将不胜感激。下面是部分 dmesg 日志,显示了我遇到的错误。

我的笔记本电脑有 6 GB RAM 和 1 TB 传统硬盘(无 SSD),运行 Ubuntu 12.10 Quantal。我时不时(可能每周 1-2 次)注意到我的电脑无法按预期运行,因此,就像我们在 Windows 世界中所做的那样,我在执行几个初始故障排除步骤后重新启动。

奇怪的是,在启动时,我的启动屏幕会报告 fsck 错误并提示我继续修复;我会回答是,它会修复,然后我会启动、登录并继续。

现在情况似乎变得更糟了。我的根分区一直以只读方式挂载,所以当我似乎成功启动并登录后,我实际上无能为力。

我现在已通过 PXE 启动进入实时 CD 环境,以便排除硬盘故障。以下是我的观察结果。

首先,根分区是加密的;当我正常启动时,系统会提示我输入密码进行解密;之后,/dev/sda5 可以作为 /dev/mapper/ubuntu-root 之类的文件访问,并且可以挂载。

# file -sL /dev/sda5
/dev/sda5: LUKS encrypted file, ver 1 ...

我的 /boot 分区是 /dev/sda1,格式为 ext2:

# fsck -N /dev/sda1
fsck from util-linux 2.20.1
[/sbin/fsck.ext2 (1) -- /dev/sda1] fsck.ext2 /dev/sda1 

我可以从实时 CD 环境手动解密我的根分区:

# cryptsetup luksOpen /dev/sda5 ubuntu-root
Enter passphrase for /dev/sda5:

之后,我以为我可以运行 e2fsck,但这次显然不行:

# e2fsck /dev/mapper/ubuntu-root

我发现页。

按照这些步骤,我为 /dev/ubuntu/root 运行了 lvmdiskscan、lvdisplay 和 vgdisplay。我无法按照说明挂载 /dev/ubuntu/root,因为 /dev/ubuntu 中没有 root。

我运行了 lvscan 并得到:

# lvscan
inactive          '/dev/ubuntu/root' [925.32 GiB] inherit
ACTIVE            '/dev/ubuntu/swap_1' [5.91 GiB] inherit

# modprobe dm-mod
# vgchange -ay
device-mapper: create ioctl on ubuntu-root failed: Device or resource busy
1 logical volume(s) in volume group "ubuntu" now active

我不知道 LVM 是混合的一部分;以前,我正在解密然后尝试将 /dev/mapper/ubuntu-root 直接挂载到某个地方,比如 /mnt/mountpoint。

我想我也尝试过 mount -o remount,rw 来尝试将其挂载为只读。当我这样做时,我观察到 e2fsck 会报告分区上的错误。

这次,我的启动器没有显示列出的驱动器,所以我无法单击它并“弹出”它;它确实有 /dev/sda1,但我并不担心。

编辑:我重新启动并返回到实时 CD 环境。这次,我使用启动器图标解密驱动器,然后卸载。当我运行 e2fsck 时,它现在显示为干净的。

编辑:现在运行 lvscan 会给我:

# lvscan
ACTIVE            '/dev/ubuntu/root' [925.32 GiB] inherit
ACTIVE            '/dev/ubuntu/swap_1' [5.91 GiB] inherit

我意识到了一件事。我不太清楚根分区是如何加密的,但感觉就像在 LVM /dev/sda5 设备之上的 LUKS。如果是这样,那么我直接在 /dev/mapper/ubuntu-root 上运行 e2fsck 是否安全?

我觉得我应该在 ubuntu-root 上运行某种 LVM 检查器,并且应该在 LVM 卷组或逻辑卷上运行 e2fsck,而 LVM 卷组或逻辑卷最终不应该是 /dev/ubuntu/root。/dev/mapper/ubuntu-root 和 /dev/ubuntu/root 都是 /dev/dm-1 的符号链接。但是,根据,我在 /dev/ubuntu/root 上运行 e2fsck 应该没有问题。

我已经至少两次重新启动进入实时 CD 环境,并且在我的根分区上运行时,e2fsck 始终得到干净的报告。接下来,我将尝试返回常规环境,看看它是否仍然以只读方式挂载。

我从 2012 年新买的这台笔记本电脑就开始用了,所以它还比较新,但硬盘本身可能也接近使用寿命的终点了。

编辑:这是我使用硬盘启动时看到的 dmesg 输出。这是否意味着我的硬盘出现物理故障?我可以运行什么程序来确认或修复,还是该出去买一个替代品了?

[    2.311573] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    2.311686] sd 0:0:0:0: [sda] Write Protect is off
[    2.311691] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.311724] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.356501]  sda: sda1 sda2 < sda5 >
[    2.357377] sd 0:0:0:0: [sda] Attached SCSI disk
...
[   51.070290] sd 0:0:0:0: [sda] Unhandled sense code
[   51.070292] sd 0:0:0:0: [sda]  
[   51.070294] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   51.070296] sd 0:0:0:0: [sda]  
[   51.070297] Sense Key : Medium Error [current] [descriptor]
[   51.070300] Descriptor sense data with sense descriptors (in hex):
[   51.070302]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
[   51.070310]         44 69 fa 00 
[   51.070314] sd 0:0:0:0: [sda]  
[   51.070317] Add. Sense: Unrecovered read error - auto reallocate failed
[   51.070319] sd 0:0:0:0: [sda] CDB: 
[   51.070320] Read(10): 28 00 44 69 fa 00 00 00 08 00
[   51.070327] end_request: I/O error, dev sda, sector 1147795968
[   51.070352] ata1: EH complete
[   81.970261] ata1.00: exception Emask 0x0 SAct 0x7fffffff SErr 0x0 action 0x6 frozen
[   81.970273] ata1.00: failed command: READ FPDMA QUEUED
[   81.970286] ata1.00: cmd 60/08:00:f0:c1:c7/00:00:2b:00:00/40 tag 0 ncq 4096 in
[   81.970286]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970292] ata1.00: status: { DRDY }
[   81.970297] ata1.00: failed command: READ FPDMA QUEUED
[   81.970316] ata1.00: cmd 60/08:08:08:c1:c7/00:00:2b:00:00/40 tag 1 ncq 4096 in
[   81.970316]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970318] ata1.00: status: { DRDY }
[   81.970319] ata1.00: failed command: READ FPDMA QUEUED
[   81.970323] ata1.00: cmd 60/08:10:00:fa:69/00:00:44:00:00/40 tag 2 ncq 4096 in
[   81.970323]          res 40/00:00:00:fa:69/00:00:44:00:00/40 Emask 0x4 (timeout)
[   81.970325] ata1.00: status: { DRDY }
[   81.970326] ata1.00: failed command: READ FPDMA QUEUED
[   81.970330] ata1.00: cmd 60/08:18:10:c1:c7/00:00:2b:00:00/40 tag 3 ncq 4096 in
[   81.970330]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970332] ata1.00: status: { DRDY }
[   81.970333] ata1.00: failed command: READ FPDMA QUEUED
[   81.970337] ata1.00: cmd 60/08:20:18:c1:c7/00:00:2b:00:00/40 tag 4 ncq 4096 in
[   81.970337]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970339] ata1.00: status: { DRDY }
[   81.970340] ata1.00: failed command: READ FPDMA QUEUED
[   81.970344] ata1.00: cmd 60/08:28:20:c1:c7/00:00:2b:00:00/40 tag 5 ncq 4096 in
[   81.970344]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970346] ata1.00: status: { DRDY }
...
[   81.970512] ata1.00: failed command: READ FPDMA QUEUED
[   81.970516] ata1.00: cmd 60/08:f0:e8:c1:c7/00:00:2b:00:00/40 tag 30 ncq 4096 in
[   81.970516]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[   81.970518] ata1.00: status: { DRDY }
[   81.970521] ata1: hard resetting link
[   82.298073] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[   82.304897] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[   82.311832] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[   82.312023] ata1.00: configured for UDMA/133
[   82.326050] ata1.00: device reported invalid CHS sector 0
[   82.326060] ata1.00: device reported invalid CHS sector 0
[   82.326066] ata1.00: device reported invalid CHS sector 0
[   82.326070] ata1.00: device reported invalid CHS sector 0
[   82.326074] ata1.00: device reported invalid CHS sector 0
...
[   82.326149] ata1.00: device reported invalid CHS sector 0
[   82.326151] ata1.00: device reported invalid CHS sector 0
[   82.334045] sd 0:0:0:0: [sda]  
[   82.334055] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   82.334060] sd 0:0:0:0: [sda]  
[   82.334064] Sense Key : Aborted Command [current] [descriptor]
[   82.334072] Descriptor sense data with sense descriptors (in hex):
[   82.334076]         72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
[   82.334100]         00 00 00 00 
[   82.334110] sd 0:0:0:0: [sda]  
[   82.334122] Add. Sense: No additional sense information
[   82.334124] sd 0:0:0:0: [sda] CDB: 
[   82.334125] Read(10): 28 00 2b c7 c1 f0 00 00 08 00
[   82.334133] end_request: I/O error, dev sda, sector 734511600
[   82.334151] sd 0:0:0:0: [sda]  
[   82.334153] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   82.334154] sd 0:0:0:0: [sda]  
[   82.334155] Sense Key : Aborted Command [current] [descriptor]
[   82.334157] Descriptor sense data with sense descriptors (in hex):
[   82.334158]         72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
[   82.334166]         00 00 00 00 
[   82.334169] sd 0:0:0:0: [sda]  
[   82.334171] Add. Sense: No additional sense information
[   82.334173] sd 0:0:0:0: [sda] CDB: 
[   82.334174] Read(10): 28 00 2b c7 c1 08 00 00 08 00
[   82.334180] end_request: I/O error, dev sda, sector 734511368
[   82.334187] sd 0:0:0:0: [sda]  
...
[   82.335602] Sense Key : Aborted Command [current] [descriptor]
[   82.335605] Descriptor sense data with sense descriptors (in hex):
[   82.335606]         72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
[   82.335619]         00 00 00 00 
[   82.335624] sd 0:0:0:0: [sda]  
[   82.335627] Add. Sense: No additional sense information
[   82.335630] sd 0:0:0:0: [sda] CDB: 
[   82.335631] Read(10): 28 00 2b c7 c1 e8 00 00 08 00
[   82.335641] end_request: I/O error, dev sda, sector 734511592
[   82.335649] ata1: EH complete
[  142.882970] ata1.00: exception Emask 0x0 SAct 0x1ffff SErr 0x0 action 0x6 frozen
[  142.882983] ata1.00: failed command: READ FPDMA QUEUED
[  142.882996] ata1.00: cmd 60/08:00:40:41:4d/00:00:37:00:00/40 tag 0 ncq 4096 in
[  142.882996]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  142.883002] ata1.00: status: { DRDY }
[  142.883007] ata1.00: failed command: READ FPDMA QUEUED
[  142.883018] ata1.00: cmd 60/08:08:00:fa:69/00:00:44:00:00/40 tag 1 ncq 4096 in
[  142.883018]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  142.883023] ata1.00: status: { DRDY }
[  142.883027] ata1.00: failed command: READ FPDMA QUEUED
[  142.883038] ata1.00: cmd 60/08:10:90:c8:48/00:00:26:00:00/40 tag 2 ncq 4096 in
[  142.883038]          res 40/00:00:00:fa:69/00:00:44:00:00/40 Emask 0x4 (timeout)
[  142.883043] ata1.00: status: { DRDY }
...
[  142.883283] ata1.00: status: { DRDY }
[  142.883288] ata1.00: failed command: WRITE FPDMA QUEUED
[  142.883298] ata1.00: cmd 61/58:78:e0:f5:08/00:00:00:00:00/40 tag 15 ncq 45056 out
[  142.883298]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  142.883303] ata1.00: status: { DRDY }
[  142.883308] ata1.00: failed command: WRITE FPDMA QUEUED
[  142.883318] ata1.00: cmd 61/40:80:a8:30:4f/00:00:28:00:00/40 tag 16 ncq 32768 out
[  142.883318]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  142.883323] ata1.00: status: { DRDY }
[  142.883333] ata1: hard resetting link
[  143.202862] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[  143.209830] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[  143.217063] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[  143.217251] ata1.00: configured for UDMA/133
[  143.230840] ata1.00: device reported invalid CHS sector 0
[  143.230848] ata1.00: device reported invalid CHS sector 0
[  143.230852] ata1.00: device reported invalid CHS sector 0
[  143.230866] ata1.00: device reported invalid CHS sector 0
...
[  143.232581] sd 0:0:0:0: [sda]  
[  143.232583] Add. Sense: No additional sense information
[  143.232584] sd 0:0:0:0: [sda] CDB: 
[  143.232585] Write(10): 2a 00 28 4f 30 a8 00 00 40 00
[  143.232591] end_request: I/O error, dev sda, sector 676278440
[  143.232597] Buffer I/O error on device dm-1, logical block 84471317
[  143.232599] Buffer I/O error on device dm-1, logical block 84471318
[  143.232601] Buffer I/O error on device dm-1, logical block 84471319
[  143.232602] Buffer I/O error on device dm-1, logical block 84471320
[  143.232604] Buffer I/O error on device dm-1, logical block 84471321
[  143.232606] Buffer I/O error on device dm-1, logical block 84471322
[  143.232607] Buffer I/O error on device dm-1, logical block 84471323
[  143.232609] Buffer I/O error on device dm-1, logical block 84471324
[  143.232611] EXT4-fs warning (device dm-1): ext4_end_bio:250: I/O error writing to inode 19529846 (offset 0 size 32768 starting block 84471317)
[  143.232615] ata1: EH complete
[  143.256074] JBD2: Spotted dirty metadata buffer (dev = dm-1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
[  143.256155] journal commit I/O error
[  143.256165] journal commit I/O error
[  143.256612] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #20054519: comm zeitgeist-datah: reading directory lblock 0
[  143.256618] EXT4-fs (dm-1): Remounting filesystem read-only
[  143.268860] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #26214788: comm nautilus: reading directory lblock 0
[  143.268862] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #19529818: comm compiz: reading directory lblock 0
[  143.270777] EXT4-fs error (device dm-1): ext4_journal_start_sb:370: Detected aborted journal
[  143.270821] EXT4-fs error (device dm-1): ext4_journal_start_sb:370: Detected aborted journal
[  143.232609] Buffer I/O error on device dm-1, logical block 84471324
[  143.232611] EXT4-fs warning (device dm-1): ext4_end_bio:250: I/O error writing to inode 19529846 (offset 0 size 32768 starting block 84471317)
[  143.232615] ata1: EH complete
[  143.256074] JBD2: Spotted dirty metadata buffer (dev = dm-1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
[  143.256155] journal commit I/O error
[  143.256165] journal commit I/O error
[  143.256612] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #20054519: comm zeitgeist-datah: reading directory lblock 0
[  143.256618] EXT4-fs (dm-1): Remounting filesystem read-only
[  143.268860] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #26214788: comm nautilus: reading directory lblock 0
[  143.268862] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #19529818: comm compiz: reading directory lblock 0
[  143.270777] EXT4-fs error (device dm-1): ext4_journal_start_sb:370: Detected aborted journal
[  143.270821] EXT4-fs error (device dm-1): ext4_journal_start_sb:370: Detected aborted journal
[  143.270826] EXT4-fs error (device dm-1): ext4_journal_start_sb:370: Detected aborted journal
[  195.831825] ata1.00: exception Emask 0x0 SAct 0x3fff SErr 0x0 action 0x6 frozen
[  195.831835] ata1.00: failed command: READ FPDMA QUEUED
[  195.831844] ata1.00: cmd 60/60:00:20:5e:ce/00:00:36:00:00/40 tag 0 ncq 49152 in
[  195.831844]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  195.831848] ata1.00: status: { DRDY }
[  195.831852] ata1.00: failed command: READ FPDMA QUEUED
[  195.831859] ata1.00: cmd 60/90:08:e8:f6:de/00:00:36:00:00/40 tag 1 ncq 73728 in
[  195.831859]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[  195.831862] ata1.00: status: { DRDY }
...
[  196.196650] Add. Sense: No additional sense information
[  196.196653] sd 0:0:0:0: [sda] CDB: 
[  196.196655] Read(10): 28 00 36 d7 9c 98 00 00 20 00
[  196.196666] end_request: I/O error, dev sda, sector 920099992
[  196.196694] ata1: EH complete
[  196.219147] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #28970197: comm ubuntuone-launc: reading directory lblock 0
[  196.226652] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #29229096: comm kworker/u:5: reading directory lblock 0
[  196.226698] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #19529749: comm zeitgeist-datah: reading directory lblock 0
[  196.227074] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #30411827: comm compiz: reading directory lblock 0
[  196.227132] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #20185725: comm gnome-settings-: reading directory lblock 0
[  196.227199] EXT4-fs error (device dm-1): ext4_find_entry:1209: inode #19529825: comm nautilus: reading directory lblock 0
[  196.250118] JBD2: Detected IO errors while flushing file data on dm-1-8

编辑:现在所有主要数据都已传输完毕,我想尝试使用虚拟机以方便使用,这样就不必重建它了。当 rsync 报告错误然后自动再次尝试传输损坏的文件时,我感到很惊喜:

rsync: read errors mapping "/media/ubuntu/423e7378-a121-c057-63ab-224c92293d6b/opt/vmware/vm2/vm2-s016.vmdk": Input/output error (5)
...
WARNING: vmware/vm2/vm2-s016.vmdk failed verification -- update discarded (will try again).
vmware/vm2/vm2-s016.vmdk
  1218576384  57%    7.66MB/s    0:01:56  
...
ERROR: vmware/Win7VPN/Win7-s016.vmdk failed verification -- update discarded.
...
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]

损失不大。

我现在已经通过 Ubuntu 13.10 live CD 环境安装了 Smartmontools,以便使用页面作为指南:

# apt-get install smartmontools
# smartctl --info /dev/sda
# smartctl --capabilities /dev/sda

在运行任何测试之前,健康状况看起来已经通过:

# smartctl --health /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

由于我挽救了我想要的所有数据,硬盘没有被使用,所以我决定采用前台(俘虏)模式。

# smartctl --captive --test=short /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in captive mode".
Drive command "Execute SMART Short self-test routine immediately in captive mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Tue Dec 30 14:10:54 2014

两分钟后,我看到了结果:

# smartctl --log=selftest /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short captive       Completed: read failure       90%      4535         890139008
# 2  Short offline       Completed without error       00%         0         -

下一个测试:

# smartctl --captive --test=long /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in captive mode".
Drive command "Execute SMART Extended self-test routine immediately in captive mode" successful.
Testing has begun.
Please wait 221 minutes for test to complete.
Test will complete after Tue Dec 30 17:55:17 2014

三个小时后我可以发布结果。

我引用的页面上也提到了这个命令。

# smartctl --all /dev/sda

它似乎一次性打印了所有感兴趣的内容。它似乎可能打断了我的长测试,所以我发送了重新运行的命令。我不清楚它在测试已经运行时是否没有效果,或者它是否从头开始重新启动测试。

编辑:我运行了扩展测试。221 分钟后,我查看了日志。看起来它由于某种原因没有运行完成。

# smartctl --log=selftest /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Offline             Interrupted (host reset)      90%      4535         -
# 2  Extended captive    Self-test routine in progress 90%      4535         -
# 3  Offline             Interrupted (host reset)      90%      4535         -
# 4  Extended captive    Self-test routine in progress 90%      4535         -
# 5  Offline             Interrupted (host reset)      90%      4535         -
# 6  Extended captive    Self-test routine in progress 90%      4535         -
# 7  Short captive       Completed: read failure       90%      4535         890139008
# 8  Short offline       Completed without error       00%         0         -

如果能够以某种方式监控测试运行而不会中断它,那就太好了。我不知道我是否做了什么导致它中断;它已经在这里待了四个小时了。

我现在尝试了传送测试,但这并不能让我知道运行需要多长时间:

# smartctl --captive --test=conveyance /dev/sda
smartctl 6.2 2013-04-20 r3812 [i686-linux-3.11.0-12-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Conveyance Self-test functions not supported

Sending command: "Execute SMART Conveyance self-test routine immediately in captive mode".
Drive command "Execute SMART Conveyance self-test routine immediately in captive mode" successful.
Testing has begun.

所有这些信息都说明了我的磁盘的什么问题?它还能挽救吗?我可以重新格式化或检查坏扇区吗?也许可以做些标记以避免使用损坏的区域吗?

过去,我只是将磁盘放在一边并换上一个新的,但这次我更好奇,想更好地了解输出以知道还能做些什么。

另外,有人对短测试和长测试的运行频率有什么建议吗?那么输送测试或其他测试呢?这些测试应该在何时/多久运行一次?

谢谢!

相关内容