Dmi*_*iov 10 hard-drive dmesg data-recovery cp
I'm a user of Oracle Virtualbox on Ubuntu. And I used to copy vdi files as a kind of backup. Previously I did this (copying vdi file and then copying it back) many times without any problem.
But today I experienced this error
VirtualBox VMs/win_7$ cp ../../Bkps/win_7.vdi .
cp: error reading ‘../../Bkps/win_7.vdi’: Input/output error
cp: failed to extend ‘./win_7.vdi’: Input/output error
Run Code Online (Sandbox Code Playgroud)
I googled for this a little but from the advices on similar problems I undersood nothing unfortunately. Could anyone suggest how to solve this, please?
The output from the dmesg
is, (and I understand nothing from it)
[ 2347.982876] ata1.00: exception Emask 0x0 SAct 0x1900406f SErr 0x0 action 0x0
[ 2347.982887] ata1.00: irq_stat 0x40000008
[ 2347.982895] ata1.00: failed command: READ FPDMA QUEUED
[ 2347.982908] ata1.00: cmd 60/08:70:d0:da:f4/00:00:2e:00:00/40 tag 14 ncq 4096 in
[ 2347.982908] res 41/40:08:d0:da:f4/00:00:2e:00:00/00 Emask 0x409 (media error) <F>
[ 2347.982915] ata1.00: status: { DRDY ERR }
[ 2347.982919] ata1.00: error: { UNC }
[ 2348.395657] ata1.00: configured for UDMA/133
[ 2348.395727] sd 0:0:0:0: [sda] Unhandled sense code
[ 2348.395733] sd 0:0:0:0: [sda]
[ 2348.395737] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2348.395741] sd 0:0:0:0: [sda]
[ 2348.395745] Sense Key : Medium Error [current] [descriptor]
[ 2348.395752] Descriptor sense data with sense descriptors (in hex):
[ 2348.395764] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 2348.395770] 2e f4 da d0
[ 2348.395772] sd 0:0:0:0: [sda]
[ 2348.395774] Add. Sense: Unrecovered read error - auto reallocate failed
[ 2348.395775] sd 0:0:0:0: [sda] CDB:
[ 2348.395776] Read(10): 28 00 2e f4 da d0 00 00 08 00
[ 2348.395781] end_request: I/O error, dev sda, sector 787798736
[ 2348.395792] ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-5]
[ 2348.395795] ata1: EH complete
[ 2348.395797] ecryptfs_readpage: Error decrypting page; rc = [-5]
[ 2351.264987] ata1.00: exception Emask 0x0 SAct 0x7f80400 SErr 0x0 action 0x0
[ 2351.264998] ata1.00: irq_stat 0x40000008
[ 2351.265005] ata1.00: failed command: READ FPDMA QUEUED
[ 2351.265019] ata1.00: cmd 60/08:50:d0:da:f4/00:00:2e:00:00/40 tag 10 ncq 4096 in
[ 2351.265019] res 41/40:08:d0:da:f4/00:00:2e:00:00/00 Emask 0x409 (media error) <F>
[ 2351.265025] ata1.00: status: { DRDY ERR }
[ 2351.265029] ata1.00: error: { UNC }
[ 2351.403371] ata1.00: configured for UDMA/133
[ 2351.403425] sd 0:0:0:0: [sda] Unhandled sense code
[ 2351.403426] sd 0:0:0:0: [sda]
[ 2351.403428] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2351.403429] sd 0:0:0:0: [sda]
[ 2351.403430] Sense Key : Medium Error [current] [descriptor]
[ 2351.403433] Descriptor sense data with sense descriptors (in hex):
[ 2351.403434] 72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00
[ 2351.403439] 2e f4 da d0
[ 2351.403442] sd 0:0:0:0: [sda]
[ 2351.403444] Add. Sense: Unrecovered read error - auto reallocate failed
[ 2351.403445] sd 0:0:0:0: [sda] CDB:
[ 2351.403446] Read(10): 28 00 2e f4 da d0 00 00 08 00
[ 2351.403451] end_request: I/O error, dev sda, sector 787798736
[ 2351.403463] ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-5]
[ 2351.403466] ecryptfs_readpage: Error decrypting page; rc = [-5]
[ 2351.403470] ata1: EH complete
Run Code Online (Sandbox Code Playgroud)
Any help is greatly appreciated, thank you in advance
小智 8
对我来说,我在尝试复制总大小为 128GB 的磁盘映像时遇到此错误。cp
试图将整个内容加载到内存中以将其重写,这显然行不通,因此必须分块完成。我发现将文件分块的最好方法是通过 ssh 强制它。
scp user@localhost:/path/to/source /path/to/dest
Run Code Online (Sandbox Code Playgroud)
你必须使用user@localhost
; 省略它会恢复到cp
类似的行为。
如果这不是 virtualbox 中的“磁盘”,而是存储 vm 映像的真实物理磁盘,那看起来很糟糕。
/dev/sda 上存在读取错误。通过将磁盘块永远标记为坏块并使用不同的块来代替,
这是一种自动处理。
为此,硬盘需要再读取一次数据,可能要尝试几百次读取。
但是磁盘放弃了这一点:
“添加。感觉:未恢复的读取错误 - 自动重新分配失败”
磁盘上确实存在严重错误 - 目前尚不清楚它们是仅在一个位置,还是扩散,以及它们是否会随着时间的推移而增加。
硬盘可能很快就会出现故障,
例如“就在此时”。
或者下周,或者根本没有。
如果它在e2fsck
测试中没有问题,你仍然不能将它用于任何重要的事情。
一旦e2fsck
确认存在中等错误,最好是更换它。
否则,尽快进行备份,
启动一张 live CD 左右(或找到一种卸载/不挂载的方法/home
),
并检查坏块,例如
sudo e2fsck -c -v /dev/sdXN
考虑到在较大的机械硬盘上,检查坏块可能需要很多时间,从几小时到一两天。这部分是因为程序需要单独检查每个磁盘块,并且也需要单独处理问题。而且,如果磁盘在读取时出错,则在知道存在问题之前会在多个级别上进行大量重试e2fsck
。对于每个磁盘块。
e2fsck
在自动修复模式下运行并让计算机单独一段时间可能是正确的:
sudo e2fsck -p -c -v /dev/sdXN
有关详细信息,请参阅ubuntuforums:随机冻结和 /var/log/messages 中的“未恢复的读取错误”。