linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
@ 2022-02-04 13:30 Hendrik Friedel
  2022-02-04 13:47 ` Qu Wenruo
  0 siblings, 1 reply; 6+ messages in thread
From: Hendrik Friedel @ 2022-02-04 13:30 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I found some files for which ls -l gave me odd output (??????) instead 
of mtime etc.

So I ran btrfs scrub without errors and then btrfs check with these 
errors:
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
root 5 inode 79886 errors 200, dir isize wrong
root 5 inode 59544488 errors 1, no inode item
         unresolved ref dir 79886 index 199 namelen 11 name global.stat 
filetype 1 errors 5, no dir item, no inode ref
root 5 inode 59544493 errors 1, no inode item
         unresolved ref dir 79886 index 200 namelen 10 name global.tmp 
filetype 1 errors 5, no dir item, no inode ref
         unresolved ref dir 79886 index 203 namelen 11 name global.stat 
filetype 1 errors 5, no dir item, no inode ref
root 5 inode 59544494 errors 1, no inode item
         unresolved ref dir 79886 index 202 namelen 9 name db_0.stat 
filetype 1 errors 5, no dir item, no inode ref
root 5 inode 59544495 errors 1, no inode item
         unresolved ref dir 79886 index 204 namelen 10 name global.tmp 
filetype 1 errors 5, no dir item, no inode ref
ERROR: errors found in fs roots
found 62813446144 bytes used, error(s) found
total csum bytes: 43669376
total tree bytes: 665501696
total fs tree bytes: 329498624
total extent tree bytes: 240975872
btree space waste bytes: 119919077
file data blocks allocated: 4766364479488
  referenced 60131446784

How do I fix these?
I am runing linux 5.13.9 (about to update to 5.16.5).

Best regards,
Hendrik


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

* Re: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
  2022-02-04 13:30 root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item Hendrik Friedel
@ 2022-02-04 13:47 ` Qu Wenruo
  2022-02-04 17:16   ` Re[2]: " Hendrik Friedel
  2022-02-04 17:20   ` Hendrik Friedel
  0 siblings, 2 replies; 6+ messages in thread
From: Qu Wenruo @ 2022-02-04 13:47 UTC (permalink / raw)
  To: Hendrik Friedel, linux-btrfs



On 2022/2/4 21:30, Hendrik Friedel wrote:
> Hello,
>
> I found some files for which ls -l gave me odd output (??????) instead
> of mtime etc.

And have you checked your dmesg to see anything wrong?

My guess is, tree-checker reports something wrong.

>
> So I ran btrfs scrub without errors and then btrfs check with these errors:
> [1/7] checking root items
> [2/7] checking extents
> [3/7] checking free space cache
> [4/7] checking fs roots
> root 5 inode 79886 errors 200, dir isize wrong

This is pretty easy to fix, --repair can handle.

But I guess it's mostly due to the offending dir items.

> root 5 inode 59544488 errors 1, no inode item
>          unresolved ref dir 79886 index 199 namelen 11 name global.stat

No inode item is a weird one, it means the inode 59544488 doesn't have
its inode item at all.


> filetype 1 errors 5, no dir item, no inode ref
> root 5 inode 59544493 errors 1, no inode item

On the other hand, there are some other dir refs which doesn't have dir
item.

 From the inode numbers, it doesn't look like an obvious bitflip:

59544488 = 0x38c93a8
59544493 = 0x38c93ad
59544494 = 0x38c93ae
59544495 = 0x38c93af

And, mind to run "btrfs check --mode=lowmem --readonly" to get a better
user readable output?

Thanks,
Qu

>          unresolved ref dir 79886 index 200 namelen 10 name global.tmp
> filetype 1 errors 5, no dir item, no inode ref
>          unresolved ref dir 79886 index 203 namelen 11 name global.stat
> filetype 1 errors 5, no dir item, no inode ref
> root 5 inode 59544494 errors 1, no inode item
>          unresolved ref dir 79886 index 202 namelen 9 name db_0.stat
> filetype 1 errors 5, no dir item, no inode ref
> root 5 inode 59544495 errors 1, no inode item
>          unresolved ref dir 79886 index 204 namelen 10 name global.tmp
> filetype 1 errors 5, no dir item, no inode ref
> ERROR: errors found in fs roots
> found 62813446144 bytes used, error(s) found
> total csum bytes: 43669376
> total tree bytes: 665501696
> total fs tree bytes: 329498624
> total extent tree bytes: 240975872
> btree space waste bytes: 119919077
> file data blocks allocated: 4766364479488
>   referenced 60131446784
>
> How do I fix these?
> I am runing linux 5.13.9 (about to update to 5.16.5).
>
> Best regards,
> Hendrik
>

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

* Re[2]: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
  2022-02-04 13:47 ` Qu Wenruo
@ 2022-02-04 17:16   ` Hendrik Friedel
  2022-02-04 17:20   ` Hendrik Friedel
  1 sibling, 0 replies; 6+ messages in thread
From: Hendrik Friedel @ 2022-02-04 17:16 UTC (permalink / raw)
  To: Qu Wenruo, linux-btrfs

Hello Qu,

thanks for your reply.
In dmesg, I see nothing wrong. No unusual messages from btrfs.
>>So I ran btrfs scrub without errors and then btrfs check with these errors:
>>[1/7] checking root items
>>[2/7] checking extents
>>[3/7] checking free space cache
>>[4/7] checking fs roots
>>root 5 inode 79886 errors 200, dir isize wrong
>
>This is pretty easy to fix, --repair can handle.

But what about the rest?

>
>But I guess it's mostly due to the offending dir items.
>
>>root 5 inode 59544488 errors 1, no inode item
>>          unresolved ref dir 79886 index 199 namelen 11 name global.stat
>
>No inode item is a weird one, it means the inode 59544488 doesn't have
>its inode item at all.
>
>
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544493 errors 1, no inode item
>
>On the other hand, there are some other dir refs which doesn't have dir
>item.
>
>From the inode numbers, it doesn't look like an obvious bitflip:
>
>59544488 = 0x38c93a8
>59544493 = 0x38c93ad
>59544494 = 0x38c93ae
>59544495 = 0x38c93af
But three are directly following each other (93,94,95)
>And, mind to run "btrfs check --mode=lowmem --readonly" to get a better
>user readable output?

It is running for 3.5h now. Is that normal? Without lowmem and readonly, 
it was done within minutes.
The Partition is a SSD with 80GB. That should be fast...

Best regards,
Hendrik


>
>
>Thanks,
>Qu
>
>>          unresolved ref dir 79886 index 200 namelen 10 name global.tmp
>>filetype 1 errors 5, no dir item, no inode ref
>>          unresolved ref dir 79886 index 203 namelen 11 name global.stat
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544494 errors 1, no inode item
>>          unresolved ref dir 79886 index 202 namelen 9 name db_0.stat
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544495 errors 1, no inode item
>>          unresolved ref dir 79886 index 204 namelen 10 name global.tmp
>>filetype 1 errors 5, no dir item, no inode ref
>>ERROR: errors found in fs roots
>>found 62813446144 bytes used, error(s) found
>>total csum bytes: 43669376
>>total tree bytes: 665501696
>>total fs tree bytes: 329498624
>>total extent tree bytes: 240975872
>>btree space waste bytes: 119919077
>>file data blocks allocated: 4766364479488
>>   referenced 60131446784
>>
>>How do I fix these?
>>I am runing linux 5.13.9 (about to update to 5.16.5).
>>
>>Best regards,
>>Hendrik
>>


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

* Re[2]: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
  2022-02-04 13:47 ` Qu Wenruo
  2022-02-04 17:16   ` Re[2]: " Hendrik Friedel
@ 2022-02-04 17:20   ` Hendrik Friedel
  2022-02-05  0:11     ` Qu Wenruo
  1 sibling, 1 reply; 6+ messages in thread
From: Hendrik Friedel @ 2022-02-04 17:20 UTC (permalink / raw)
  To: Qu Wenruo, linux-btrfs

Hello again,

I guess it is not normal, that it btrfs check is now running since 
hours... iotop is showing no disk read going on.

Best regards,
Hendrik

------ Originalnachricht ------
Von: "Qu Wenruo" <quwenruo.btrfs@gmx.com>
An: "Hendrik Friedel" <hendrik@friedels.name>; 
linux-btrfs@vger.kernel.org
Gesendet: 04.02.2022 14:47:45
Betreff: Re: root 5 inode xy errors 200, dir isize wrong and root 5 
inode xx errors 1, no inode item

>
>
>On 2022/2/4 21:30, Hendrik Friedel wrote:
>>Hello,
>>
>>I found some files for which ls -l gave me odd output (??????) instead
>>of mtime etc.
>
>And have you checked your dmesg to see anything wrong?
>
>My guess is, tree-checker reports something wrong.
>
>>
>>So I ran btrfs scrub without errors and then btrfs check with these errors:
>>[1/7] checking root items
>>[2/7] checking extents
>>[3/7] checking free space cache
>>[4/7] checking fs roots
>>root 5 inode 79886 errors 200, dir isize wrong
>
>This is pretty easy to fix, --repair can handle.
>
>But I guess it's mostly due to the offending dir items.
>
>>root 5 inode 59544488 errors 1, no inode item
>>          unresolved ref dir 79886 index 199 namelen 11 name global.stat
>
>No inode item is a weird one, it means the inode 59544488 doesn't have
>its inode item at all.
>
>
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544493 errors 1, no inode item
>
>On the other hand, there are some other dir refs which doesn't have dir
>item.
>
>From the inode numbers, it doesn't look like an obvious bitflip:
>
>59544488 = 0x38c93a8
>59544493 = 0x38c93ad
>59544494 = 0x38c93ae
>59544495 = 0x38c93af
>
>And, mind to run "btrfs check --mode=lowmem --readonly" to get a better
>user readable output?
>
>Thanks,
>Qu
>
>>          unresolved ref dir 79886 index 200 namelen 10 name global.tmp
>>filetype 1 errors 5, no dir item, no inode ref
>>          unresolved ref dir 79886 index 203 namelen 11 name global.stat
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544494 errors 1, no inode item
>>          unresolved ref dir 79886 index 202 namelen 9 name db_0.stat
>>filetype 1 errors 5, no dir item, no inode ref
>>root 5 inode 59544495 errors 1, no inode item
>>          unresolved ref dir 79886 index 204 namelen 10 name global.tmp
>>filetype 1 errors 5, no dir item, no inode ref
>>ERROR: errors found in fs roots
>>found 62813446144 bytes used, error(s) found
>>total csum bytes: 43669376
>>total tree bytes: 665501696
>>total fs tree bytes: 329498624
>>total extent tree bytes: 240975872
>>btree space waste bytes: 119919077
>>file data blocks allocated: 4766364479488
>>   referenced 60131446784
>>
>>How do I fix these?
>>I am runing linux 5.13.9 (about to update to 5.16.5).
>>
>>Best regards,
>>Hendrik
>>


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

* Re: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
  2022-02-04 17:20   ` Hendrik Friedel
@ 2022-02-05  0:11     ` Qu Wenruo
  2022-02-05  8:17       ` Re[2]: " Hendrik Friedel
  0 siblings, 1 reply; 6+ messages in thread
From: Qu Wenruo @ 2022-02-05  0:11 UTC (permalink / raw)
  To: Hendrik Friedel, Qu Wenruo, linux-btrfs



On 2022/2/5 01:20, Hendrik Friedel wrote:
> Hello again,
> 
> I guess it is not normal, that it btrfs check is now running since 
> hours... iotop is showing no disk read going on.

OK, new bugs in lowmem mode.

You can safely kill it, as it's really read-only.


For the errors reported, they can all be handled by --repair, but please 
keep in mind that, those offending files may be deleted or moved to 
'lost+found' directory in root 5.

Thanks,
Qu
> 
> Best regards,
> Hendrik
> 
> ------ Originalnachricht ------
> Von: "Qu Wenruo" <quwenruo.btrfs@gmx.com>
> An: "Hendrik Friedel" <hendrik@friedels.name>; linux-btrfs@vger.kernel.org
> Gesendet: 04.02.2022 14:47:45
> Betreff: Re: root 5 inode xy errors 200, dir isize wrong and root 5 
> inode xx errors 1, no inode item
> 
>>
>>
>> On 2022/2/4 21:30, Hendrik Friedel wrote:
>>> Hello,
>>>
>>> I found some files for which ls -l gave me odd output (??????) instead
>>> of mtime etc.
>>
>> And have you checked your dmesg to see anything wrong?
>>
>> My guess is, tree-checker reports something wrong.
>>
>>>
>>> So I ran btrfs scrub without errors and then btrfs check with these 
>>> errors:
>>> [1/7] checking root items
>>> [2/7] checking extents
>>> [3/7] checking free space cache
>>> [4/7] checking fs roots
>>> root 5 inode 79886 errors 200, dir isize wrong
>>
>> This is pretty easy to fix, --repair can handle.
>>
>> But I guess it's mostly due to the offending dir items.
>>
>>> root 5 inode 59544488 errors 1, no inode item
>>>          unresolved ref dir 79886 index 199 namelen 11 name global.stat
>>
>> No inode item is a weird one, it means the inode 59544488 doesn't have
>> its inode item at all.
>>
>>
>>> filetype 1 errors 5, no dir item, no inode ref
>>> root 5 inode 59544493 errors 1, no inode item
>>
>> On the other hand, there are some other dir refs which doesn't have dir
>> item.
>>
>> From the inode numbers, it doesn't look like an obvious bitflip:
>>
>> 59544488 = 0x38c93a8
>> 59544493 = 0x38c93ad
>> 59544494 = 0x38c93ae
>> 59544495 = 0x38c93af
>>
>> And, mind to run "btrfs check --mode=lowmem --readonly" to get a better
>> user readable output?
>>
>> Thanks,
>> Qu
>>
>>>          unresolved ref dir 79886 index 200 namelen 10 name global.tmp
>>> filetype 1 errors 5, no dir item, no inode ref
>>>          unresolved ref dir 79886 index 203 namelen 11 name global.stat
>>> filetype 1 errors 5, no dir item, no inode ref
>>> root 5 inode 59544494 errors 1, no inode item
>>>          unresolved ref dir 79886 index 202 namelen 9 name db_0.stat
>>> filetype 1 errors 5, no dir item, no inode ref
>>> root 5 inode 59544495 errors 1, no inode item
>>>          unresolved ref dir 79886 index 204 namelen 10 name global.tmp
>>> filetype 1 errors 5, no dir item, no inode ref
>>> ERROR: errors found in fs roots
>>> found 62813446144 bytes used, error(s) found
>>> total csum bytes: 43669376
>>> total tree bytes: 665501696
>>> total fs tree bytes: 329498624
>>> total extent tree bytes: 240975872
>>> btree space waste bytes: 119919077
>>> file data blocks allocated: 4766364479488
>>>   referenced 60131446784
>>>
>>> How do I fix these?
>>> I am runing linux 5.13.9 (about to update to 5.16.5).
>>>
>>> Best regards,
>>> Hendrik
>>>
> 


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

* Re[2]: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
  2022-02-05  0:11     ` Qu Wenruo
@ 2022-02-05  8:17       ` Hendrik Friedel
  0 siblings, 0 replies; 6+ messages in thread
From: Hendrik Friedel @ 2022-02-05  8:17 UTC (permalink / raw)
  To: Qu Wenruo, Qu Wenruo, linux-btrfs

Hello Qu,

thanks for your reply.

>>I guess it is not normal, that it btrfs check is now running since hours... iotop is showing no disk read going on.
>
>OK, new bugs in lowmem mode.
Well, I let it run over night, and at last it finished. It was super 
slow though. Must have been more than 5h.

btrfs check --mode=lowmem --readonly /dev/sdd2
Opening filesystem to check...
Checking filesystem on /dev/sdd2
UUID: c217331c-cf0c-49ae-86c7-48a67d1c346b
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
ERROR: root 5 INODE_ITEM[59544488] index 199 name global.stat filetype 1 
missing
ERROR: root 5 INODE_ITEM[59544493] index 200 name global.tmp filetype 1 
missing
ERROR: root 5 INODE_ITEM[59544494] index 202 name db_0.stat filetype 1 
missing
ERROR: root 5 INODE_ITEM[59544493] index 203 name global.stat filetype 1 
missing
ERROR: root 5 INODE_ITEM[59544495] index 204 name global.tmp filetype 1 
missing
ERROR: root 5 DIR INODE [79886] size 0 not equal to 51
ERROR: errors found in fs roots
found 62801883136 bytes used, error(s) found
total csum bytes: 43658820
total tree bytes: 664485888
total fs tree bytes: 329400320
total extent tree bytes: 240205824
btree space waste bytes: 119009827
file data blocks allocated: 4766311215104
referenced 60116828160

>You can safely kill it, as it's really read-only.
>
>
>For the errors reported, they can all be handled by --repair, but please keep in mind that, those offending files may be deleted or moved to 'lost+found' directory in root 5.
>

I did and it seemed to work:
btrfs check --repair  /dev/sdd2
enabling repair mode
Opening filesystem to check...
Checking filesystem on /dev/sdd2
UUID: c217331c-cf0c-49ae-86c7-48a67d1c346b
[1/7] checking root items
Fixed 0 roots.
[2/7] checking extents
No device size related problem found
[3/7] checking free space cache
cache and super generation don't match, space cache will be invalidated
[4/7] checking fs roots
Deleting bad dir index [79886,96,199] root 5
Deleting bad dir index [79886,96,200] root 5
Deleting bad dir index [79886,96,203] root 5
Deleting bad dir index [79886,96,202] root 5
Deleting bad dir index [79886,96,204] root 5
[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 62801883136 bytes used, no error found
total csum bytes: 43658820
total tree bytes: 664485888
total fs tree bytes: 329400320
total extent tree bytes: 240205824
btree space waste bytes: 119009827
file data blocks allocated: 4766311215104
  referenced 60116828160
root@homeserver:/home/henfri# btrfs check --readonly  /dev/sdd2
Opening filesystem to check...
Checking filesystem on /dev/sdd2
UUID: c217331c-cf0c-49ae-86c7-48a67d1c346b
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
cache and super generation don't match, space cache will be invalidated
[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 62801899520 bytes used, no error found
total csum bytes: 43658820
total tree bytes: 664502272
total fs tree bytes: 329400320
total extent tree bytes: 240222208
btree space waste bytes: 119026345
file data blocks allocated: 4766311215104
  referenced 60116828160

Best regards,
Hendrik


>
>Thanks,
>Qu
>>
>>Best regards,
>>Hendrik
>>
>>------ Originalnachricht ------
>>Von: "Qu Wenruo" <quwenruo.btrfs@gmx.com>
>>An: "Hendrik Friedel" <hendrik@friedels.name>; linux-btrfs@vger.kernel.org
>>Gesendet: 04.02.2022 14:47:45
>>Betreff: Re: root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item
>>
>>>
>>>
>>>On 2022/2/4 21:30, Hendrik Friedel wrote:
>>>>Hello,
>>>>
>>>>I found some files for which ls -l gave me odd output (??????) instead
>>>>of mtime etc.
>>>
>>>And have you checked your dmesg to see anything wrong?
>>>
>>>My guess is, tree-checker reports something wrong.
>>>
>>>>
>>>>So I ran btrfs scrub without errors and then btrfs check with these errors:
>>>>[1/7] checking root items
>>>>[2/7] checking extents
>>>>[3/7] checking free space cache
>>>>[4/7] checking fs roots
>>>>root 5 inode 79886 errors 200, dir isize wrong
>>>
>>>This is pretty easy to fix, --repair can handle.
>>>
>>>But I guess it's mostly due to the offending dir items.
>>>
>>>>root 5 inode 59544488 errors 1, no inode item
>>>>          unresolved ref dir 79886 index 199 namelen 11 name global.stat
>>>
>>>No inode item is a weird one, it means the inode 59544488 doesn't have
>>>its inode item at all.
>>>
>>>
>>>>filetype 1 errors 5, no dir item, no inode ref
>>>>root 5 inode 59544493 errors 1, no inode item
>>>
>>>On the other hand, there are some other dir refs which doesn't have dir
>>>item.
>>>
>>>From the inode numbers, it doesn't look like an obvious bitflip:
>>>
>>>59544488 = 0x38c93a8
>>>59544493 = 0x38c93ad
>>>59544494 = 0x38c93ae
>>>59544495 = 0x38c93af
>>>
>>>And, mind to run "btrfs check --mode=lowmem --readonly" to get a better
>>>user readable output?
>>>
>>>Thanks,
>>>Qu
>>>
>>>>          unresolved ref dir 79886 index 200 namelen 10 name global.tmp
>>>>filetype 1 errors 5, no dir item, no inode ref
>>>>          unresolved ref dir 79886 index 203 namelen 11 name global.stat
>>>>filetype 1 errors 5, no dir item, no inode ref
>>>>root 5 inode 59544494 errors 1, no inode item
>>>>          unresolved ref dir 79886 index 202 namelen 9 name db_0.stat
>>>>filetype 1 errors 5, no dir item, no inode ref
>>>>root 5 inode 59544495 errors 1, no inode item
>>>>          unresolved ref dir 79886 index 204 namelen 10 name global.tmp
>>>>filetype 1 errors 5, no dir item, no inode ref
>>>>ERROR: errors found in fs roots
>>>>found 62813446144 bytes used, error(s) found
>>>>total csum bytes: 43669376
>>>>total tree bytes: 665501696
>>>>total fs tree bytes: 329498624
>>>>total extent tree bytes: 240975872
>>>>btree space waste bytes: 119919077
>>>>file data blocks allocated: 4766364479488
>>>>   referenced 60131446784
>>>>
>>>>How do I fix these?
>>>>I am runing linux 5.13.9 (about to update to 5.16.5).
>>>>
>>>>Best regards,
>>>>Hendrik
>>>>
>>
>


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

end of thread, other threads:[~2022-02-05  8:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 13:30 root 5 inode xy errors 200, dir isize wrong and root 5 inode xx errors 1, no inode item Hendrik Friedel
2022-02-04 13:47 ` Qu Wenruo
2022-02-04 17:16   ` Re[2]: " Hendrik Friedel
2022-02-04 17:20   ` Hendrik Friedel
2022-02-05  0:11     ` Qu Wenruo
2022-02-05  8:17       ` Re[2]: " Hendrik Friedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).