On 2018/11/2 上午4:40, Attila Vangel wrote:
> Hi,
> 
> Somehow my btrfs partition got broken. I use Arch, so my kernel is
> quite new (4.18.x).
> I don't remember exactly the sequence of events. At some point it was
> accessible in read-only, but unfortunately I did not take backup
> immediately. dmesg log from that time:
> 
> [ 62.602388] BTRFS warning (device nvme0n1p2): block group
> 103923318784 has wrong amount of free space
> [ 62.602390] BTRFS warning (device nvme0n1p2): failed to load free
> space cache for block group 103923318784, rebuilding it now
> [ 108.039188] BTRFS error (device nvme0n1p2): bad tree block start 0 
> 18812026880
> [ 108.039227] BTRFS: error (device nvme0n1p2) in
> __btrfs_free_extent:7010: errno=-5 IO failure

Normally we shouldn't call __btrfs_free_extent() during mount.
It looks like it's caused by log tree replay.

You could try to mount the fs with -o ro,nologreplay to see if you could
still mount the fs RO without log replay.

If it goes well, at least you could access the files.

> [ 108.039241] BTRFS info (device nvme0n1p2): forced readonly
> [ 108.039250] BTRFS: error (device nvme0n1p2) in
> btrfs_run_delayed_refs:3076: errno=-5 IO failure
> 
> At the next reboot it failed to mount. Problem may have been that at
> some point I booted to another distro with older kernel (4.15.x,
> 4.14.52) and unfortunately attempted some checks/repairs (?) e.g. from
> gparted, and at that time I did not know it could be destructive.>
> Anyway, currently it fails to mount (even with ro and/or recovery),
> btrfs check results in "checksum verify failed" and "bad tree block"
> errors,

Full btrfs check result please.

> btrfs restore resulted in "We have looped trying to restore
> files in" errors for a dozen of paths then exit.

So at least btrfs-restore is working.

This normally means the fs is not completely corrupted, and essential
trees are at least OK.

Still need that "btrfs check" output (along with "btrfs check
--mode=lowmem") to determine what to do.

Thanks,
Qu
> 
> Is there some hope to save data from the filesystem, and if so, how?
> 
> BTW I checked some diagnostics commands regarding my SSD with the nvme
> client and from that it seems there are no hardware problems.
> 
> Your help is highly appreciated.
> 
> Cheers,
> Attila
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to