You are not logged in.

#1 2018-03-05 22:30:28

andrzej1_1
Member
Registered: 2017-09-07
Posts: 50

Broken BTRFS partion

I was using btfs filesystem for a year and today /home partition started to mount as read-only, therefore system is unusable. I checked dmesg and there is an error:

[   21.270761] BTRFS error (device sda5): parent transid verify failed on 90389446656 wanted 125589 found 124829
[   21.270774] BTRFS: error (device sda5) in __btrfs_free_extent:6983: errno=-5 IO failure
[   21.270777] BTRFS info (device sda5): forced readonly
[   21.270780] BTRFS: error (device sda5) in btrfs_run_delayed_refs:3076: errno=-5 IO failure
[   21.279792] BTRFS error (device sda5): parent transid verify failed on 90389446656 wanted 125589 found 124829
[   21.279802] BTRFS: error (device sda5) in __btrfs_free_extent:6983: errno=-5 IO failure
[   21.279806] BTRFS: error (device sda5) in btrfs_run_delayed_refs:3076: errno=-5 IO failure
[   21.280013] BTRFS error (device sda5): pending csums is 589824

I tried two things:
1) btrfs-zero-log - did not help
2) btrfs check - crashing with segfault:

Starting program: /usr/bin/btrfs check --force /dev/sda5
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Checking filesystem on /dev/sda5
UUID: ad[REDACTED]6f
parent transid verify failed on 90389217280 wanted 125589 found 124829
parent transid verify failed on 90389217280 wanted 125589 found 124829
Ignoring transid failure
parent transid verify failed on 90389233664 wanted 125589 found 124829
parent transid verify failed on 90389233664 wanted 125589 found 124829
Ignoring transid failure
parent transid verify failed on 90389250048 wanted 125589 found 124829
parent transid verify failed on 90389250048 wanted 125589 found 124829
Ignoring transid failure
parent transid verify failed on 90389266432 wanted 125589 found 124829
parent transid verify failed on 90389266432 wanted 125589 found 124829
Ignoring transid failure
parent transid verify failed on 90389299200 wanted 125589 found 124829
parent transid verify failed on 90389299200 wanted 125589 found 124829
Ignoring transid failure
parent transid verify failed on 90389315584 wanted 125589 found 124829
parent transid verify failed on 90389315584 wanted 125589 found 124829
Ignoring transid failure

Program received signal SIGSEGV, Segmentation fault.
0x00005555555673fa in ?? ()

I have already backed up my data, but how I can fix partition?

Last edited by andrzej1_1 (2018-03-05 22:40:05)

Offline

#2 2018-03-07 18:43:38

andrzej1_1
Member
Registered: 2017-09-07
Posts: 50

Re: Broken BTRFS partion

Not really a solution, but I switched to ext4. It was not my first problem with btrfs, so I do not recommend anyone to use it.

Offline

#3 2018-03-08 08:03:53

blackout
Member
Registered: 2014-05-21
Posts: 38

Re: Broken BTRFS partion

BTRFS has such a bad reputation because people can't use it.
I use it daily on hundrets of servers and on all my machines, workstations and notebooks.
Also recommend it to my clients and when configured correctly there is so little chance that there is any issue.

The problem you using a filesystem without having a clue about the basic concept of btrfs.
Even without this knowledge you could have resolved the issue by yourself.

you got following error
in __btrfs_free_extent:6983: errno=-5 IO failure

so there was an IO error on the extent

you found btrfs check ->
If you had typed btrfs and tab you would have found following tool
btrfsck
and a man command or
btrfsck --help
would have lead you to the creation of the new extent tree

Long story short

You should have done a backup and then
btrfsck --init-extent-tree

and there has been other topics about this problem  in the forum so you should have searched before posting your problem.

https://bbs.archlinux.org/viewtopic.php?id=233724

It wasn't my intention to sound rude or offending you.
But if you have the motivation to install arch by your own and have to read page after page it probably isn't overcharged to do your basic homework.

Wish you a nice week.

Offline

#4 2018-08-20 19:38:29

dzeta
Member
Registered: 2018-08-20
Posts: 1

Re: Broken BTRFS partion

blackout wrote:

You should have done a backup and then
btrfsck --init-extent-tree

Thank you! This was helpful.
To add one more step - towards the end of rebuilding the extent tree I got some errors about the crc tree, so it may be useful to also try:

btrfs check --init-extent-tree <device>

Offline

Board footer

Powered by FluxBB