我正在努力了解如何修复 btrfs 分区上的错误。出于可能与由于完全锁定(我认为是图形问题)而必须关闭计算机几次有关的原因,我突然发现 chrome(稳定版)将不再工作。我能够安装 chrome stable,经过一番挖掘后发现我的~/.config/google-chrome
目录是垃圾(ls ~/.config
在那一行都显示 ?s。)。我尝试删除该目录,但我得到的只是 I/O 错误。
btrfs scrub start -Bd /home/alan
未能完成
ERROR: scrubbing /home/alan failed for device id 1: ret=-1, errno=5 (Input/output error)
scrub device /dev/nvme0n1p4 (id 1) canceled
Scrub started: Wed May 27 09:11:37 2020
Status: aborted
Duration: 0:00:51
Total to scrub: 199.02GiB
Rate: 3.24GiB/s
Error summary: csum=1
Corrected: 0
Uncorrectable: 1
Unverified: 0
但是,如果我运行sudo smartctl -H /dev/nvme0n1
(该设备包含此分区和其他分区),它会将其报告为完全健康。
如果我查看 BTRFS 错误的输出,journalctl
特定组合会频繁出现
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 263
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 174307803136
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 1522483200
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 1423638528
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 1333559296
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 1252245504
BTRFS warning (device nvme0n1p4): checksum error at logical 174610628608 on dev /dev/nvme0n1p4, physical 174610628608: metadata leaf (level 0) in tree 1252245504
BTRFS error (device nvme0n1p4): bdev /dev/nvme0n1p4 errs: wr 0, rd 0, flush 0, corrupt 2, gen 0
BTRFS error (device nvme0n1p4): unable to fixup (regular) error at logical 174610628608 on dev /dev/nvme0n1p4
它尝试用sudo hdparm --read-sector 174610628608 /dev/nvme0n1p4
但这失败了
/dev/nvme0n1p4:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
Device /dev/nvme0n1p4 has non-zero LBA starting offset of 161134592.
Please use an absolute LBA with the /dev/ entry for the raw device, rather than a partition or raid name.
/dev/nvme0n1p4 is probably a partition of /dev/nvme0n1p (?)
The absolute LBA of sector 174610628608 from /dev/nvme0n1p4 should be 174771763200
Aborting.
我还尝试了它在整个设备上提供的其他号码sudo hdparm --read-sector 174771763200 /dev/nvme0n1
,但失败得更简单
/dev/nvme0n1:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
reading sector 174771763200: FAILED: Inappropriate ioctl for device
我该去哪里?完全重新格式化整个分区(对于整个设备来说更糟)将是一个重大干扰,因为该分区还有一个单独的 btrfs 子卷,它是我的 debian 系统的 rootfs。我当然会首先确保我在另一台设备上有备份,但是还有其他方法吗?
添加评论答案...
响应dmesg -T | tail -n 20
:-
[Wed May 27 10:53:11 2020] docker0: port 2(veth79249a8) entered forwarding state
[Wed May 27 10:53:11 2020] docker0: port 2(veth79249a8) entered disabled state
[Wed May 27 10:53:11 2020] eth0: renamed from veth5edb139
[Wed May 27 10:53:11 2020] IPv6: ADDRCONF(NETDEV_CHANGE): veth79249a8: link becomes ready
[Wed May 27 10:53:11 2020] docker0: port 2(veth79249a8) entered blocking state
[Wed May 27 10:53:11 2020] docker0: port 2(veth79249a8) entered forwarding state
[Wed May 27 10:53:11 2020] eth0: renamed from veth3e5602d
[Wed May 27 10:53:11 2020] IPv6: ADDRCONF(NETDEV_CHANGE): veth91ddda7: link becomes ready
[Wed May 27 10:53:11 2020] docker0: port 1(veth91ddda7) entered blocking state
[Wed May 27 10:53:11 2020] docker0: port 1(veth91ddda7) entered forwarding state
[Wed May 27 10:53:16 2020] rfkill: input handler enabled
[Wed May 27 10:53:16 2020] systemd-journald[405]: File /var/log/journal/e76b13bb9e67491ca8c1ce766232fa75/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[Wed May 27 10:53:18 2020] rfkill: input handler disabled
[Wed May 27 15:07:42 2020] BTRFS error (device nvme0n1p4): bad tree block start, want 174610628608 have 0
[Wed May 27 15:49:36 2020] ThreadPoolForeg[57126]: segfault at 312d1a400010 ip 000055daf8b8c542 sp 00007fc0c2cd6f90 error 4 in chrome[55daf6e12000+7a42000]
[Wed May 27 15:49:36 2020] Code: 8b 7c 0a 10 41 f6 c7 01 0f 84 81 00 00 00 4c 8b 54 0a 08 4d 89 fe 49 81 e6 00 00 fc ff 44 89 f9 c0 e9 02 bb 01 00 00 00 d3 e3 <4d> 8b 46 10 44 89 f9 c1 e9 07 81 e1 ff 07 00 00 41 8b 04 88 89 c7
[Wed May 27 15:58:01 2020] chrome[56261]: segfault at 25a517607ac0 ip 000055dafd7fb6ce sp 00007ffcd366ec10 error 4 in chrome[55daf6e12000+7a42000]
[Wed May 27 15:58:01 2020] Code: 0f 0b cc cc cc cc cc cc cc cc cc cc 55 48 89 e5 41 57 41 56 53 50 49 89 fe 48 8b 5f 28 48 c7 47 28 00 00 00 00 48 85 db 74 10 <48> 8b 3b 48 85 ff 75 5d 48 89 df e8 d2 45 92 f9 49 8b 5e 20 48 85
[Wed May 27 17:23:01 2020] Chrome_IOThread[6934]: segfault at 1841cd6f82c8 ip 000055587adb8a5e sp 00007fece6cc7990 error 6 in chrome[55587aa9f000+7a42000]
[Wed May 27 17:23:01 2020] Code: 00 00 4d 39 ee 0f 84 83 03 00 00 4c 89 f8 4c 31 f0 48 f7 d0 49 89 45 00 4d 39 ee 0f 84 d2 03 00 00 4c 89 f8 4c 31 e8 48 f7 d0 <49> 89 46 08 4d 85 ed 0f 85 05 ff ff ff c7 45 c0 03 00 00 00 4c 89