Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* Unable to mount, corrupt leaf
@ 2019-05-28 18:39 Cesar Strauss
  2019-05-28 18:54 ` Hugo Mills
  2019-05-28 18:56 ` Hans van Kranenburg
  0 siblings, 2 replies; 4+ messages in thread
From: Cesar Strauss @ 2019-05-28 18:39 UTC (permalink / raw)
  To: linux-btrfs

Hello,

After a BTRFS partition becoming read-only under use, it cannot be 
mounted anymore.

The output is:

# mount /dev/sdb5 /mnt/disk1
mount: /mnt/disk1: wrong fs type, bad option, bad superblock on 
/dev/sdb5, missing codepage or helper program, or other error.

Kernel output:
[ 2042.106654] BTRFS info (device sdb5): disk space caching is enabled
[ 2042.799537] BTRFS critical (device sdb5): corrupt leaf: root=2 
block=199940210688 slot=31, unexpected item end, have 268450090 expect 14634
[ 2042.807879] BTRFS critical (device sdb5): corrupt leaf: root=2 
block=199940210688 slot=31, unexpected item end, have 268450090 expect 14634
[ 2042.807947] BTRFS error (device sdb5): failed to read block groups: -5
[ 2042.832362] BTRFS error (device sdb5): open_ctree failed

# btrfs check /dev/sdb5
Opening filesystem to check...
incorrect offsets 14634 268450090
incorrect offsets 14634 268450090
incorrect offsets 14634 268450090
incorrect offsets 14634 268450090
ERROR: cannot open file system

Giving -s and -b options to "btrfs check" made no difference.

The usebackuproot mount option made no difference.

"btrfs restore" was successful in recovering most of the files, except 
for a couple instances of "Error copying data".

System information:

OS: Arch Linux

$ uname -a
Linux rescue 5.1.4-arch1-1-ARCH #1 SMP PREEMPT Wed May 22 08:06:56 UTC 
2019 x86_64 GNU/Linux

$ btrfs --version
btrfs-progs v5.1

I have since updated the kernel, with no difference:

$ uname -a
Linux rescue 5.1.5-arch1-2-ARCH #1 SMP PREEMPT Mon May 27 03:37:39 UTC 
2019 x86_64 GNU/Linux

Before making any recovery attempts, or even restoring from backup, I 
would like to ask for the best option to proceed.

Thanks,

Cesar

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-28 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-28 18:39 Unable to mount, corrupt leaf Cesar Strauss
2019-05-28 18:54 ` Hugo Mills
2019-05-28 19:25   ` Cesar Strauss
2019-05-28 18:56 ` Hans van Kranenburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox