异常修复后btrfs还能用吗?

异常修复后btrfs还能用吗?

我的 USB HDD 上有一个损坏的(无法安装的)btrfs 分区。该问题具有与此处描述的相同的错误消息: https://bbs.archlinux.org/viewtopic.php?id=182505

dmesg 输出如下

[   54.371041] BTRFS: device label BackupMobile devid 1 transid 1420 /dev/dm-3
[   54.384764] BTRFS info (device dm-3): disk space caching is enabled
[   54.384767] BTRFS: has skinny extents
[   54.425187] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[   54.431990] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[   54.432025] BTRFS: failed to read tree root on dm-3
[   54.449061] BTRFS: open_ctree failed
[  199.271168] BTRFS info (device dm-3): enabling auto recovery
[  199.271174] BTRFS info (device dm-3): disabling disk space caching
[  199.271178] BTRFS: has skinny extents
[  199.278451] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[  199.279109] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[  199.279119] BTRFS: failed to read tree root on dm-3
[  199.279762] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[  199.280509] BTRFS error (device dm-3): bad tree block start 15489378549331356982 932187635712
[  199.280518] BTRFS: failed to read tree root on dm-3
[  208.294771] BTRFS: checking UUID tree

智能测试顺利通过。

我终于通过使用解决了安装问题btrfs-零日志。然后我可以再次安装该卷。

一天后,我遇到了同样的问题(无法安装,类似的错误消息,现在甚至日志中的堆栈跟踪)。

这次,我的问题似乎通过安装带有恢复选项的分区就“解决”了-o 恢复。现在我可以再次访问我的数据,甚至可以写入磁盘(尽管我没有检查写入/保存数据的完整性)。 Linux 没有抱怨,dmesg 日志现在看起来像这样:

[32382.410416] BTRFS info (device dm-6): disk space caching is enabled
[32382.410420] BTRFS: has skinny extents

我可以多次安装驱动器而不会出现问题(通过 nautilus/GNOME)。

是否保存继续使用该分区?我只想保留快照,否则我已经重新格式化了。尽管仍然通过了 Smart 测试,但我如何确定这不是硬件故障而应归咎于 btrfs?

当前状态下插件和 USB HDD 挂载的完整 dmesg 日志:

[32376.048700] usb 3-4: new high-speed USB device number 9 using xhci_hcd
[32376.177756] usb 3-4: New USB device found, idVendor=152d, idProduct=0539
[32376.177770] usb 3-4: New USB device strings: Mfr=10, Product=11, SerialNumber=5
[32376.177773] usb 3-4: Product: USB3.0 to SATA Bridge
[32376.177775] usb 3-4: Manufacturer: JMicron
[32376.177777] usb 3-4: SerialNumber: XXXXXXXXXXXX
[32376.178348] usb-storage 3-4:1.0: USB Mass Storage device detected
[32376.178434] usb-storage 3-4:1.0: Quirks match for vid 152d pid 0539: 4000000
[32376.178462] scsi host16: usb-storage 3-4:1.0
[32377.688528] scsi 16:0:0:0: Direct-Access     ST2000LM 015-2E8174       0000 PQ: 0 ANSI: 2 CCS
[32377.689259] sd 16:0:0:0: Attached scsi generic sg2 type 0
[32377.699007] sd 16:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[32377.699386] sd 16:0:0:0: [sdc] Write Protect is off
[32377.699390] sd 16:0:0:0: [sdc] Mode Sense: 28 00 00 00
[32377.699661] sd 16:0:0:0: [sdc] No Caching mode page found
[32377.699664] sd 16:0:0:0: [sdc] Assuming drive cache: write through
[32377.717199]  sdc: sdc1
[32377.729514] sd 16:0:0:0: [sdc] Attached SCSI disk
[32382.410416] BTRFS info (device dm-6): disk space caching is enabled
[32382.410420] BTRFS: has skinny extents

编辑:

正如 Shiki 指出的,我做了一次“表面扫描”,这似乎是 btrfs 世界中的 btrfs 擦洗。 btrfs 清理日志显示 72688 个 read_errors 以及 72688 个 un Correctable_errors。那看起来不太好。我检查了其他 btrfs 硬盘,它们的清理日志根本不包含任何错误。

完整日志:

scrub status:1
dc484331-2fb1-49a7-8960-38d0b603bd9f:1
|data_extents_scrubbed:85282
|tree_extents_scrubbed:130262
|data_bytes_scrubbed:5386072064
|tree_bytes_scrubbed:2134212608
|read_errors:72688
|csum_errors:0
|verify_errors:0
|no_csum:0
|csum_discards:0
|super_errors:0
|malloc_errors:0
|uncorrectable_errors:72688
|corrected_errors:0
|last_physical:7553941504
|t_start:1502107169
|t_resumed:0
|duration:62
|canceled:1
|finished:1

相关内容