View previous topic :: View next topic |
Author |
Message |
AngrySeaBone n00b
Joined: 13 Nov 2020 Posts: 20 Location: Between the mountains and the lake
|
Posted: Tue Jan 19, 2021 12:33 pm Post subject: [SOLVED] BTRFS fs errors - inode errors |
|
|
Hi, after tryng to resize my disk partitions with gparted, I found out it was impossiblie since there were problems with the root filesystem (in this case BTRFS)
So I ran Code: | doas btrfs check --force /dev/sdb3 |
and got this output
Code: | Checking filesystem on /dev/sdb3
UUID: 70d7509e-f79e-44e6-8a75-1abda8b675f7
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
root 5 inode 16216777 errors 100, file extent discount
Found file extent holes:
start: 0, len: 8192
root 5 inode 16258163 errors 100, file extent discount
Found file extent holes:
start: 4096, len: 8192
start: 16384, len: 12288
start: 32768, len: 12288
start: 49152, len: 12288
start: 65536, len: 12288
root 5 inode 16258174 errors 100, file extent discount
Found file extent holes:
start: 0, len: 8192
root 5 inode 16258175 errors 100, file extent discount
Found file extent holes:
start: 4096, len: 4096
root 5 inode 16258181 errors 100, file extent discount
Found file extent holes:
start: 0, len: 8192
root 5 inode 16258182 errors 100, file extent discount
Found file extent holes:
start: 4096, len: 8192
start: 16384, len: 16384
ERROR: errors found in fs roots
found 107690979328 bytes used, error(s) found
total csum bytes: 103370060
total tree bytes: 1432059904
total fs tree bytes: 1222967296
total extent tree bytes: 79904768
btree space waste bytes: 368308102
file data blocks allocated: 108411437056
referenced 102585704448 |
I'm not very experienced with btrfs since it's the first time using it. But as far as I can understand, I have MANY errors...
Now the problem is, it's my OS disk, so, I can't just wipe it out and reinstall the entire system. Is there a way to fix this problem without losing my data?
UPDATE: Running the same command for a second time it gives me a different output
Code: | Checking filesystem on /dev/sdb3
UUID: 70d7509e-f79e-44e6-8a75-1abda8b675f7
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
root 5 inode 16216777 errors 100, file extent discount
Found file extent holes:
start: 0, len: 8192
ERROR: errors found in fs roots
found 107692236800 bytes used, error(s) found
total csum bytes: 103371264
total tree bytes: 1432092672
total fs tree bytes: 1222967296
total extent tree bytes: 79937536
btree space waste bytes: 368328119
file data blocks allocated: 108412686336
referenced 102586728448 |
UPDATE 2: After running it several other times, I get only the second output
UPDATE 3: Ok so it turned out that a chromium cache file caused all those troubles. I found it by using this command
Code: | find / -inum 16216777 -print |
Then I deleted that EVIL file and now i get this output
Code: | Checking filesystem on /dev/sdb3
UUID: 70d7509e-f79e-44e6-8a75-1abda8b675f7
[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 107703480320 bytes used, no error found
total csum bytes: 103382080
total tree bytes: 1432403968
total fs tree bytes: 1223196672
total extent tree bytes: 80019456
btree space waste bytes: 368425340
file data blocks allocated: 108409221120
referenced 102597681152 |
So no errors...yay!
Now I'll try to resize my partitions. I'll keep you updated in case someone will ever get the same problem.
FINAL UPDATE: Ok so now everything is working and the partition is correctly being resized. I think that what caused the problem was a forced shutdown of my computer due to an electrical failure in my house, while having the browser still open, since what I had to delete was a chromium cache file.
Last edited by AngrySeaBone on Tue Jan 19, 2021 1:58 pm; edited 3 times in total |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jan 19, 2021 12:50 pm Post subject: |
|
|
You're forcing fsck to run on a mounted filesystem, so it's giving incorrect results. All of this should be done while it's unmounted and not in use. |
|
Back to top |
|
|
AngrySeaBone n00b
Joined: 13 Nov 2020 Posts: 20 Location: Between the mountains and the lake
|
Posted: Tue Jan 19, 2021 12:54 pm Post subject: |
|
|
Ant P. wrote: | You're forcing fsck to run on a mounted filesystem, so it's giving incorrect results. All of this should be done while it's unmounted and not in use. |
Yeah I know, but on a live USB system it gave me the exact same output. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jan 19, 2021 4:01 pm Post subject: |
|
|
That sounds about right. If it was a forced shutdown then the filesystem is in a mounted state, since it was never unmounted. Running fsck would keep producing errors since it isn't being told to repair anything (and thinks the filesystem is still mounted). Doing a single mount and unmount first would have made the errors go away. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|