All of lore.kernel.org
 help / color / mirror / Atom feed
* external harddisk: bogus corrupt leaf error?
@ 2020-09-21  9:29 Martin Steigerwald
  2020-09-21 10:09 ` Qu Wenruo
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Steigerwald @ 2020-09-21  9:29 UTC (permalink / raw)
  To: linux-btrfs

Hi!

I have an external 500 GB harddisk with BTRFS. On mounting it the kernel 
(5.9-rc5, vanilla, self compiled) reports:

[282409.344208] BTRFS info (device sdc1): enabling auto defrag
[282409.344222] BTRFS info (device sdc1): use zstd compression, level 3
[282409.344225] BTRFS info (device sdc1): disk space caching is enabled
[282409.465837] BTRFS critical (device sdc1): corrupt leaf: root=1 
block=906756096 slot=204, invalid root item size, have 239 expect 439

Note: It has used LZO compression before, but I switched mount option to 
zstd meanwhile.

However, btrfs-progds 5.7 gives:

% btrfs check /dev/sdc1
Opening filesystem to check...
Checking filesystem on /dev/sdc1
UUID: […]
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 249031409664 bytes used, no error found
total csum bytes: 242738928
total tree bytes: 352387072
total fs tree bytes: 67747840
total extent tree bytes: 14565376
btree space waste bytes: 37691414
file data blocks allocated: 1067158315008
 referenced 247077785600


Is this kernel message in error? Or does 'btrfs check' not check for 
this error yet?

Here some more information:

% btrfs filesystem df /mnt/[…]
Data, single: total=444.67GiB, used=231.60GiB
System, DUP: total=64.00MiB, used=80.00KiB
System, single: total=4.00MiB, used=0.00B
Metadata, DUP: total=3.00GiB, used=335.98MiB
Metadata, single: total=8.00MiB, used=0.00B
GlobalReserve, single: total=271.09MiB, used=0.00B
WARNING: Multiple block group profiles detected, see 'man btrfs(5)'.
WARNING:   Metadata: single, dup
WARNING:   System: single, dup

Ah, there is something old I can clean up, it seems:


% merkaba:~> btrfs filesystem usage -T /mnt/amazon
Overall:
    Device size:                 465.76GiB
    Device allocated:            450.81GiB
    Device unallocated:           14.95GiB
    Device missing:                  0.00B
    Used:                        232.26GiB
    Free (estimated):            228.02GiB      (min: 220.55GiB)
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              271.09MiB      (used: 0.00B)
    Multiple profiles:                 yes      (metadata, system)

             Data      Metadata Metadata  System  System               
Id Path      single    single   DUP       single  DUP       Unallocated
-- --------- --------- -------- --------- ------- --------- -----------
 1 /dev/sdc1 444.67GiB  8.00MiB   6.00GiB 4.00MiB 128.00MiB    14.95GiB
-- --------- --------- -------- --------- ------- --------- -----------
   Total     444.67GiB  8.00MiB   3.00GiB 4.00MiB  64.00MiB    14.95GiB
   Used      231.60GiB    0.00B 335.98MiB   0.00B  80.00KiB  

Will run a scrub next to see whether all data can be read.

Device stats are okay:

% btrfs device stats /mnt/amazon
[/dev/sdc1].write_io_errs    0
[/dev/sdc1].read_io_errs     0
[/dev/sdc1].flush_io_errs    0
[/dev/sdc1].corruption_errs  0
[/dev/sdc1].generation_errs  0

Device reports SMART status as: passed.

There are some "Error: ICRC, ABRT 24 sectors at LBA" like errors in 
SMART error log, but they are from a very early time about 290 to 310 
hours of disk power-on lifetime. I believe this may have been me 
disconnecting the device while it was still being written to or 
something, but I will run a long SMART test as well.

Best,
-- 
Martin



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

end of thread, other threads:[~2020-09-22  8:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  9:29 external harddisk: bogus corrupt leaf error? Martin Steigerwald
2020-09-21 10:09 ` Qu Wenruo
2020-09-21 10:30   ` Martin Steigerwald
2020-09-21 11:14     ` Qu Wenruo
2020-09-21 11:46       ` Martin Steigerwald
2020-09-21 22:26         ` Chris Murphy
2020-09-21 23:48         ` Qu Wenruo
2020-09-22  2:14           ` Qu Wenruo
2020-09-22  8:40             ` Martin Steigerwald
2020-09-22  8:44               ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.