"Longhao.Chen" <longhao.c...@outlook.com> wrote:
> Hello everyone, I use Btrfs as the file system on my laptop.
> Yesterday, I was preparing to backup a snapshot to an external hard
> drive using btrfs send, and the following error occurred:
>
> ERROR: send ioctl failed with -5: Input/Output error

I use btrfs but don't know much about it :( I certainly know nothing
about btrfs send, but the error seems to suggest perhaps an error with
the send rather than with reading the source?
 
> I used btrfs scrub to scan the disk, and the result was:

Why not btrfs check?

> Error summary:    csum=1
> 
> Corrected:      0
> 
> Uncorrectable:  1
> 
> Unverified:     0

OK so that sounds like a hardware problem.

> Afterwards, I booted a LiveCD and ran:
> 
> btrfs check --init-csum-tree
> 
> During the running process, many outputs similar to this appeared:
> 
> root 1380 inode 5006723 errors 2001, no inode item, link count wrong
> unresolved ref dir 1164151 index 1566 namelen 28 name <filename>
> filetype 1 errors 4, no inode ref
> 
> Then I found that the file in the above <filename> had disappeared.
> At this point, I immediately backed up all the existing files and
> then used:
> 
> btrfs check --repair
> 
> btrfs rescue
> 
> in an attempt to recover the lost files, but was unsuccessful.
> 
> The current issues are:
> 
> How do I recover the lost files?

From a backup? I think they're gone from the source. (But what do I
know)
 
> Why does btrfs check --init-csum-tree cause file loss? Is this a bug?

Seems unlikely. Why do you think the command causes the file loss? Why
do you not think the corruption was already there? And did you read the
DANGEROUS description in the docs?

> LiveCD information:
> 
> Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
> Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
> 
> Thank you for your help.

As already suggested, you might do better looking elsewhere for help.
Perhaps the linux-btrfs mailing list?

Reply via email to