Page 1 of 1

BTRFS error parent transid verify failed

Posted: 12 Oct 2021, 19:42
by Spaniard
Hello,

I have 14 instances of the following error when I run dmesg

BTRFS error (device dm-0): parent transid verify failed on 811548672 wanted 37188 found 37194

I do not know any way of starting the system with the device dm-0 unmounted, so I do not dare to run btrfs-zero-log because I do not know if it is safe running it onto a mounted partition.

The unit cannot be unmounted because a lot of system processes have open files on it.

Please, can you advise what to do to clean the error and recover the volume to a healthy status?

Thank you very much

Re: BTRFS error parent transid verify failed

Posted: 12 Oct 2021, 20:39
by Spaniard
I have run btrfs scrub as read only.... no errors

Code: Select all

Scrub started:    Tue Oct 12 12:52:28 2021
Status:           finished
Duration:         0:38:04
Total to scrub:   393.02GiB
Rate:             174.48MiB/s
Error summary:    no errors found

Re: BTRFS error parent transid verify failed

Posted: 12 Oct 2021, 22:14
by TMnorah
hi!It is possible that your btrfs file system is damaged, please refer to the following link method to repair :viewtopic.php?f=75&t=2349&p=12735&hilit=redis#p12735

Re: BTRFS error parent transid verify failed

Posted: 14 Oct 2021, 17:46
by Spaniard
Thank for your reply.

I can access the shares and the web. This is a F5-221 v4.2.08P1.10

This guide is useless because, as I said before, the main problem is that running the command "umount /mnt/md0" gives this result

Code: Select all

umount: /mnt/md0: target is busy.
Using a external keyboard and monitor, is there a way to make the bootloader not to mount the volumes so I could run the "btfrs check" command?

Thank you very much.

Re: BTRFS error parent transid verify failed

Posted: 14 Oct 2021, 18:44
by TMSupport
Restart the device, stop all application services, and then follow the link to repair.

Re: BTRFS error parent transid verify failed

Posted: 15 Oct 2021, 19:11
by Spaniard
Hello,
I managed to stop all services and unmount the unit executing
fuser -km /mnt/md0

Then I followed the guide and btrfs check /dev/mapper/vg0-lv0

Code: Select all

Opening filesystem to check...
Checking filesystem on /dev/dm-0
UUID: 4c70363f-977c-430c-9f86-27e962112093
[1/7] checking root items
root item for root 498, current bytenr 811548672, current gen 37188, current level 1, new bytenr 816578560, new gen 37193, new level 1
Found 1 roots with an outdated root item.
Please run a filesystem check with the option --repair to fix them.
Then btrfs check --repair /dev/dm-0

Code: Select all

enabling repair mode
WARNING:

	Do not use --repair unless you are advised to do so by a developer
	or an experienced user, and then only after having accepted that no
	fsck can successfully repair all types of filesystem corruption. Eg.
	some software or hardware bugs can fatally damage a volume.
	The operation will start in 10 seconds.
	Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting repair.
Opening filesystem to check...
Checking filesystem on /dev/dm-0
UUID: 4c70363f-977c-430c-9f86-27e962112093
[1/7] checking root items
fixing root item for root 498, current bytenr 811548672, current gen 37188, current level 1, new bytenr 816578560, new gen 37193, new level 1
Fixed 1 roots.
[2/7] checking extents
No device size related problem found
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups
found 417320194048 bytes used, no error found
total csum bytes: 407002980
total tree bytes: 549142528
total fs tree bytes: 96223232
total extent tree bytes: 8847360
btree space waste bytes: 55895996
file data blocks allocated: 784949907456
 referenced 469114204160
Then I ran again btrfs check and no errors were found, so I rebooted.

Now I get qgroup generation mismatch ERROR and Mismatch generation and generation_v2 warning from dmesg:

Code: Select all

[   49.929880] BTRFS: device fsid 4c70363f-977c-430c-9f86-27e962112093 devid 1 transid 37393 /dev/mapper/vg0-lv0
[   49.932302] BTRFS info (device dm-0): metadata ratio 50
[   49.933324] BTRFS info (device dm-0): using free space tree
[   49.934308] BTRFS info (device dm-0): has skinny extents
[   50.775558] BTRFS error (device dm-0): qgroup generation mismatch, marked as inconsistent
[   50.879812] BTRFS info (device dm-0): checking UUID tree
[   50.981096] BTRFS info (device dm-0): new size for /dev/mapper/vg0-lv0 is 996696653824
[   51.014525] BTRFS warning (device dm-0): mismatching generation and generation_v2 found in root item. This root was probably mounted with an older kernel. Resetting all new fields.
Please, how can I fix these problems so I am sure I am using a consistent volume?

Re: BTRFS error parent transid verify failed

Posted: 15 Oct 2021, 23:17
by TMAY
Hello, it may be that the kernel has not been upgraded completely after upgrading the system, causing the root mismatch. You can remount the file system or reinstall the system to update the kernel to the latest

Re: BTRFS error parent transid verify failed

Posted: 17 Oct 2021, 03:22
by Spaniard
TMAY wrote: 15 Oct 2021, 23:17 Hello, it may be that the kernel has not been upgraded completely after upgrading the system, causing the root mismatch. You can remount the file system or reinstall the system to update the kernel to the latest
I have not upgraded the system (same kernel)
Remounting the file system happens on every reboot, does not make any sense.
I think they have included an old compilation of the btrfs tools and the actual FileSystem in the kernel is more modern than those tools, which have messed something when they were "fixing" the errors found.

Re: BTRFS error parent transid verify failed

Posted: 17 Oct 2021, 12:58
by TMnorah
Hi!
Please save your important data first, then use btrfs-zero-log to clear the log, and then try --repair, and reorganize btrfs if it still can’t be resolved.

Re: BTRFS error parent transid verify failed

Posted: 20 Oct 2021, 23:10
by Spaniard
After a couple of restarts, everything came back to normality and no issues were found during the weekend with no errors..

Code: Select all

[   47.589224] BTRFS: device fsid 4c70363f-977c-430c-9f86-27e962112093 devid 1 transid 37582 /dev/mapper/vg0-lv0
[   47.591332] BTRFS info (device dm-0): metadata ratio 50
[   47.592337] BTRFS info (device dm-0): using free space tree
[   47.593306] BTRFS info (device dm-0): has skinny extents
[   48.945415] BTRFS info (device dm-0): new size for /dev/mapper/vg0-lv0 is 996696653824
However I found the following today in dmesg.. it seems related with the automated snapshots...
Could this mean some RAM error??
Does Terramaster have some boot option for memtest?

Code: Select all

[109176.648892] ------------[ cut here ]------------
[109176.649875] WARNING: CPU: 0 PID: 3286 at fs/btrfs/transaction.c:322 record_root_in_trans+0xd1/0xe0
[109176.650977] Modules linked in: flashcache(O) aesni_intel crypto_simd cryptd glue_helper atlantic(O) 8812bu 8812au(O)
[109176.652598] CPU: 0 PID: 3286 Comm: btrfs Tainted: G           O    4.13.16 #446
[109176.654246] Hardware name: retsamarret 000-F5221-FBA002-0001/TM-J3355-2G2L, BIOS MAPL0304V17 07/27/2020
[109176.655937] task: ffff8a6476395cc0 task.stack: ffff9d4a06164000
[109176.657646] RIP: 0010:record_root_in_trans+0xd1/0xe0
[109176.659363] RSP: 0018:ffff9d4a06167bc0 EFLAGS: 00010293
[109176.661090] RAX: ffff8a640ccdf068 RBX: ffff8a64767d4800 RCX: ffff8a646f510790
[109176.663137] RDX: 0000000000000000 RSI: ffff8a64767d4800 RDI: ffff8a63f07ff078
[109176.665302] RBP: ffff9d4a06167be0 R08: ffff8a647fc1d4e0 R09: ffff8a6479003080
[109176.667503] R10: ffffffffb4314da0 R11: 0000000000002c00 R12: ffff8a63f07ff078
[109176.669704] R13: ffff8a646f510770 R14: ffff8a646f510000 R15: ffff8a64767d4800
[109176.671926] FS:  00007efdb9d6b8c0(0000) GS:ffff8a647fc00000(0000) knlGS:0000000000000000
[109176.674513] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[109176.677200] CR2: 00000000011dc368 CR3: 000000019993a000 CR4: 00000000003406f0
[109176.679896] Call Trace:
[109176.682604]  btrfs_record_root_in_trans+0x4e/0x70
[109176.685283]  start_transaction+0x94/0x400
[109176.687906]  btrfs_start_transaction+0x19/0x20
[109176.690529]  btrfs_mksubvol+0x3e3/0x520
[109176.693165]  ? wait_woken+0x80/0x80
[109176.695808]  btrfs_ioctl_snap_create_transid+0x187/0x190
[109176.698490]  btrfs_ioctl_snap_create_v2+0xf9/0x150
[109176.701117]  btrfs_ioctl+0x5fe/0x2390
[109176.703690]  ? lru_cache_add_active_or_unevictable+0x31/0x90
[109176.706336]  ? __handle_mm_fault+0x713/0x9d0
[109176.708997]  do_vfs_ioctl+0x8d/0x5b0
[109176.711597]  ? do_vfs_ioctl+0x8d/0x5b0
[109176.714131]  ? __do_page_fault+0x245/0x4a0
[109176.716667]  SyS_ioctl+0x74/0x80
[109176.719155]  entry_SYSCALL_64_fastpath+0x17/0x98
[109176.721569] RIP: 0033:0x7efdb8df2557
[109176.723892] RSP: 002b:00007ffd7a595b58 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
[109176.726253] RAX: ffffffffffffffda RBX: 00007efdb90b5c20 RCX: 00007efdb8df2557
[109176.728669] RDX: 00007ffd7a595ba0 RSI: 0000000050009417 RDI: 0000000000000003
[109176.731123] RBP: 00000000000000ff R08: 0000000000000000 R09: 00007efdb8e74fe0
[109176.733568] R10: 000000000000055a R11: 0000000000000202 R12: 0000000000000000
[109176.736046] R13: 0000000000001000 R14: 0000000000001010 R15: 00007efdb90b5c80
[109176.738557] Code: 5b 41 5c 41 5d 41 5e 5d c3 85 d2 0f 85 65 ff ff ff 31 c0 c3 41 c6 46 78 00 31 c0 5b 41 5c 41 5d 41 5e 5d c3 0f ff e9 67 ff ff ff <0f> ff e9 6d ff ff ff 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 
[109176.743867] ---[ end trace 0782e110398e3b21 ]---