All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs cannot be mounted or checked
@ 2021-07-11  8:59 Zhenyu Wu
  2021-07-11 11:37 ` Forza
  0 siblings, 1 reply; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-11  8:59 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

Sorry for my disturbance.
After a dirty reboot because of a computer crash, my btrfs partition
cannot be mounted. The same thing happened before, but now `btrfs
rescue zero-log` cannot work.
```
$ uname -r
5.10.27-gentoo-x86_64
$ btrfs rescue zero-log /dev/sda2
Clearing log on /dev/sda2, previous log_root 0, level 0
$ mount /dev/sda2 /mnt/gentoo
mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
/dev/sda2, missing codepage or helper program, or other error.
$ btrfs check /dev/sda2
parent transid verify failed on 34308096 wanted 962175 found 961764
parent transid verify failed on 34308096 wanted 962175 found 961764
parent transid verify failed on 34308096 wanted 962175 found 961764
Ignoring transid failure
leaf parent key incorrect 34308096
ERROR: failed to read block groups: Operation not permitted
ERROR: cannot open file system
$ dmesg 2>&1|tee dmesg.txt
# see attachment
```
Like `mount -o ro,usebackuproot` cannot work, too.

Thanks for any help!

[-- Attachment #2: dmesg.txt --]
[-- Type: text/plain, Size: 51971 bytes --]

[    0.000000] Linux version 5.10.27-gentoo-x86_64 (root@catalyst) (x86_64-pc-linux-gnu-gcc (Gentoo 10.3.0 p1) 10.3.0, GNU ld (Gentoo 2.35.2 p1) 2.35.2) #1 SMP Wed Jun 23 22:54:55 UTC 2021
[    0.000000] Command line: BOOT_IMAGE=/boot/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
[    0.000000] x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
[    0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format.
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x0000000000057fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000058000-0x0000000000058fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000059000-0x000000000009efff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000070e01fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000070e02000-0x0000000070e02fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000070e03000-0x0000000070e2cfff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000070e2d000-0x0000000070e7efff] usable
[    0.000000] BIOS-e820: [mem 0x0000000070e7f000-0x00000000713cdfff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000713ce000-0x0000000075203fff] usable
[    0.000000] BIOS-e820: [mem 0x0000000075204000-0x0000000077307fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000077308000-0x0000000077339fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000007733a000-0x0000000077b19fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000077b1a000-0x0000000077fa3fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000077fa4000-0x0000000077ffdfff] type 20
[    0.000000] BIOS-e820: [mem 0x0000000077ffe000-0x0000000077ffefff] usable
[    0.000000] BIOS-e820: [mem 0x0000000078000000-0x00000000780fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x0000000283ffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] efi: EFI v2.40 by American Megatrends
[    0.000000] efi: ESRT=0x77e60f98 ACPI=0x77312000 ACPI 2.0=0x77312000 SMBIOS=0xf05e0 SMBIOS 3.0=0xf0600 
[    0.000000] SMBIOS 3.0.0 present.
[    0.000000] DMI: Dell Inc. Vostro 14-5459/080W31, BIOS 1.0.8 12/02/2016
[    0.000000] tsc: Detected 2400.000 MHz processor
[    0.000802] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000805] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000813] last_pfn = 0x284000 max_arch_pfn = 0x400000000
[    0.000816] MTRR default type: write-back
[    0.000816] MTRR fixed ranges enabled:
[    0.000818]   00000-9FFFF write-back
[    0.000819]   A0000-BFFFF uncachable
[    0.000819]   C0000-FFFFF write-protect
[    0.000820] MTRR variable ranges enabled:
[    0.000822]   0 base 0080000000 mask 7F80000000 uncachable
[    0.000823]   1 base 007C000000 mask 7FFC000000 uncachable
[    0.000824]   2 base 007A000000 mask 7FFE000000 uncachable
[    0.000824]   3 base 0079000000 mask 7FFF000000 uncachable
[    0.000825]   4 base 0078800000 mask 7FFF800000 uncachable
[    0.000826]   5 disabled
[    0.000826]   6 disabled
[    0.000827]   7 disabled
[    0.000828]   8 disabled
[    0.000828]   9 disabled
[    0.001218] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.001651] last_pfn = 0x77fff max_arch_pfn = 0x400000000
[    0.008876] found SMP MP-table at [mem 0x000fcf70-0x000fcf7f]
[    0.008884] esrt: Reserving ESRT space from 0x0000000077e60f98 to 0x0000000077e60fd0.
[    0.008891] Using GB pages for direct mapping
[    0.009657] Secure boot could not be determined
[    0.009658] RAMDISK: [mem 0x36ef3000-0x37770fff]
[    0.009662] ACPI: Early table checksum verification disabled
[    0.009665] ACPI: RSDP 0x0000000077312000 000024 (v02 DELL  )
[    0.009668] ACPI: XSDT 0x00000000773120B8 0000EC (v01 DELL   QA09     01072009 AMI  00010013)
[    0.009673] ACPI: FACP 0x000000007732B0F0 00010C (v05 DELL   QA09     01072009 AMI  00010013)
[    0.009679] ACPI: DSDT 0x0000000077312230 018EB9 (v02 DELL   QA09     01072009 INTL 20120913)
[    0.009682] ACPI: FACS 0x0000000077B17F80 000040
[    0.009685] ACPI: APIC 0x000000007732B200 000084 (v03 DELL   QA09     01072009 AMI  00010013)
[    0.009688] ACPI: FPDT 0x000000007732B288 000044 (v01 DELL   QA09     01072009 AMI  00010013)
[    0.009691] ACPI: FIDT 0x000000007732B2D0 00009C (v01 DELL   QA09     01072009 AMI  00010013)
[    0.009694] ACPI: MCFG 0x000000007732B370 00003C (v01 DELL   QA09     01072009 MSFT 00000097)
[    0.009697] ACPI: HPET 0x000000007732B3B0 000038 (v01 DELL   QA09     01072009 AMI. 0005000B)
[    0.009700] ACPI: SSDT 0x000000007732B3E8 000315 (v01 SataRe SataTabl 00001000 INTL 20120913)
[    0.009703] ACPI: LPIT 0x000000007732B700 000094 (v01 INTEL  SKL-ULT  00000000 MSFT 0000005F)
[    0.009706] ACPI: SSDT 0x000000007732B798 000248 (v02 INTEL  sensrhub 00000000 INTL 20120913)
[    0.009709] ACPI: SSDT 0x000000007732B9E0 000ED1 (v02 INTEL  PtidDevc 00001000 INTL 20120913)
[    0.009712] ACPI: SSDT 0x000000007732C8B8 000C45 (v02 INTEL  Ther_Rvp 00001000 INTL 20120913)
[    0.009715] ACPI: DBGP 0x000000007732D500 000034 (v01 INTEL           00000000 MSFT 0000005F)
[    0.009718] ACPI: DBG2 0x000000007732D538 000054 (v00 INTEL           00000000 MSFT 0000005F)
[    0.009721] ACPI: SSDT 0x000000007732D590 0001FB (v02 INTEL  xh_rvp07 00000000 INTL 20120913)
[    0.009724] ACPI: SSDT 0x000000007732D790 003745 (v02 DptfTa DptfTabl 00001000 INTL 20120913)
[    0.009727] ACPI: BOOT 0x0000000077330ED8 000028 (v01 DELL   QA09     01072009 AMI  00010013)
[    0.009730] ACPI: SLIC 0x0000000077330F00 000176 (v01 DELL   QA09     01072009 AMI  00010013)
[    0.009734] ACPI: SSDT 0x0000000077331078 00549C (v02 SaSsdt SaSsdt   00003000 INTL 20120913)
[    0.009737] ACPI: UEFI 0x0000000077336518 000042 (v01                 00000000      00000000)
[    0.009740] ACPI: MSDM 0x0000000077336560 000055 (v03 DELL   QA09     01072009 AMI  00010013)
[    0.009743] ACPI: SSDT 0x00000000773365B8 000E58 (v02 CpuRef CpuSsdt  00003000 INTL 20120913)
[    0.009746] ACPI: SSDT 0x0000000077337410 0006FA (v02 SgRef  SgPch    00001000 INTL 20120913)
[    0.009749] ACPI: DMAR 0x0000000077337B10 0000CC (v01 INTEL  SKL      00000001 INTL 00000001)
[    0.009752] ACPI: TPM2 0x0000000077337BE0 000034 (v03        Tpm2Tabl 00000001 AMI  00000000)
[    0.009755] ACPI: SSDT 0x0000000077337C18 00197A (v01 OptRef OptTabl  00001000 INTL 20120913)
[    0.009763] ACPI: Local APIC address 0xfee00000
[    0.009779] Zone ranges:
[    0.009780]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.009782]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.009784]   Normal   [mem 0x0000000100000000-0x0000000283ffffff]
[    0.009785] Movable zone start for each node
[    0.009786] Early memory node ranges
[    0.009787]   node   0: [mem 0x0000000000001000-0x0000000000057fff]
[    0.009788]   node   0: [mem 0x0000000000059000-0x000000000009efff]
[    0.009789]   node   0: [mem 0x0000000000100000-0x0000000070e01fff]
[    0.009791]   node   0: [mem 0x0000000070e2d000-0x0000000070e7efff]
[    0.009792]   node   0: [mem 0x00000000713ce000-0x0000000075203fff]
[    0.009792]   node   0: [mem 0x0000000077ffe000-0x0000000077ffefff]
[    0.009793]   node   0: [mem 0x0000000100000000-0x0000000283ffffff]
[    0.009795] Initmem setup node 0 [mem 0x0000000000001000-0x0000000283ffffff]
[    0.009797] On node 0 totalpages: 2067496
[    0.009798]   DMA zone: 56 pages used for memmap
[    0.009799]   DMA zone: 26 pages reserved
[    0.009800]   DMA zone: 3997 pages, LIFO batch:0
[    0.010095]   DMA zone: 28771 pages in unavailable ranges
[    0.010097]   DMA32 zone: 6484 pages used for memmap
[    0.010097]   DMA32 zone: 474251 pages, LIFO batch:63
[    0.014773]   DMA32 zone: 13173 pages in unavailable ranges
[    0.014774]   Normal zone: 21728 pages used for memmap
[    0.014775]   Normal zone: 1589248 pages, LIFO batch:63
[    0.030295]   Normal zone: 16384 pages in unavailable ranges
[    0.030306] Reserving Intel graphics memory at [mem 0x79000000-0x7affffff]
[    0.030524] ACPI: PM-Timer IO Port: 0x1808
[    0.030525] ACPI: Local APIC address 0xfee00000
[    0.030530] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.030531] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.030532] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.030533] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.030560] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[    0.030562] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.030564] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.030565] ACPI: IRQ0 used by override.
[    0.030567] ACPI: IRQ9 used by override.
[    0.030569] Using ACPI (MADT) for SMP configuration information
[    0.030570] ACPI: HPET id: 0x8086a701 base: 0xfed00000
[    0.030573] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0xb2 (or later)
[    0.030574] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.030590] [mem 0x7b000000-0xdfffffff] available for PCI devices
[    0.030591] Booting paravirtualized kernel on bare hardware
[    0.030594] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.041507] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:4 nr_node_ids:1
[    0.041707] percpu: Embedded 51 pages/cpu s171992 r8192 d28712 u524288
[    0.041713] pcpu-alloc: s171992 r8192 d28712 u524288 alloc=1*2097152
[    0.041714] pcpu-alloc: [0] 0 1 2 3 
[    0.041731] Built 1 zonelists, mobility grouping on.  Total pages: 2039202
[    0.041732] Kernel command line: BOOT_IMAGE=/boot/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot
[    0.042474] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.042828] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.042870] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.074882] Memory: 7964688K/8269984K available (8201K kernel code, 2156K rwdata, 2428K rodata, 1104K init, 700K bss, 305040K reserved, 0K cma-reserved)
[    0.074936] Kernel/User page tables isolation: enabled
[    0.075008] rcu: Hierarchical RCU implementation.
[    0.075010] rcu: 	RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.075011] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.075012] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.075572] NR_IRQS: 4352, nr_irqs: 1024, preallocated irqs: 16
[    0.075896] random: get_random_bytes called from start_kernel+0x366/0x550 with crng_init=0
[    0.075927] spurious 8259A interrupt: IRQ7.
[    0.076032] Console: colour dummy device 80x25
[    0.076215] printk: console [tty0] enabled
[    0.076221] ACPI: Core revision 20200925
[    0.076457] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns
[    0.076560] APIC: Switch to symmetric I/O mode setup
[    0.077768] x2apic: IRQ remapping doesn't support X2APIC mode
[    0.080816] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
[    0.126499] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x22983777dd9, max_idle_ns: 440795300422 ns
[    0.126504] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.126508] pid_max: default: 32768 minimum: 301
[    0.128685] LSM: Security Framework initializing
[    0.128724] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.128747] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.128910] mce: CPU0: Thermal monitoring enabled (TM1)
[    0.128925] process: using mwait in idle threads
[    0.128928] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[    0.128930] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[    0.128933] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.128936] Spectre V2 : Mitigation: Full generic retpoline
[    0.128938] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    0.128940] Speculative Store Bypass: Vulnerable
[    0.128942] SRBDS: Vulnerable: No microcode
[    0.128944] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    0.129082] Freeing SMP alternatives memory: 16K
[    0.136564] smpboot: CPU0: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (family: 0x6, model: 0x4e, stepping: 0x3)
[    0.136637] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[    0.136649] ... version:                4
[    0.136651] ... bit width:              48
[    0.136652] ... generic registers:      4
[    0.136653] ... value mask:             0000ffffffffffff
[    0.136655] ... max period:             00007fffffffffff
[    0.136657] ... fixed-purpose events:   3
[    0.136658] ... event mask:             000000070000000f
[    0.136759] rcu: Hierarchical SRCU implementation.
[    0.136815] smp: Bringing up secondary CPUs ...
[    0.136882] x86: Booting SMP configuration:
[    0.136884] .... node  #0, CPUs:      #1 #2
[    0.137730] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[    0.137821]  #3
[    0.138276] smp: Brought up 1 node, 4 CPUs
[    0.138281] smpboot: Max logical packages: 1
[    0.138283] smpboot: Total of 4 processors activated (19200.00 BogoMIPS)
[    0.139944] devtmpfs: initialized
[    0.140083] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.140083] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.140083] pinctrl core: initialized pinctrl subsystem
[    0.140083] NET: Registered protocol family 16
[    0.140083] audit: initializing netlink subsys (disabled)
[    0.140439] audit: type=2000 audit(1625991251.070:1): state=initialized audit_enabled=0 res=1
[    0.140439] thermal_sys: Registered thermal governor 'step_wise'
[    0.140439] thermal_sys: Registered thermal governor 'user_space'
[    0.140516] cpuidle: using governor ladder
[    0.140559] Simple Boot Flag at 0x47 set to 0x1
[    0.140559] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.140559] ACPI: bus type PCI registered
[    0.140559] dca service started, version 1.12.1
[    0.140559] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.140559] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.140559] PCI: Using configuration type 1 for base access
[    0.140814] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.142002] ACPI: Added _OSI(Module Device)
[    0.142004] ACPI: Added _OSI(Processor Device)
[    0.142006] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.142007] ACPI: Added _OSI(Processor Aggregator Device)
[    0.142009] ACPI: Added _OSI(Linux-Dell-Video)
[    0.142011] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.142013] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.166851] ACPI: 11 ACPI AML tables successfully acquired and loaded
[    0.169058] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.172458] ACPI: Dynamic OEM Table Load:
[    0.172466] ACPI: SSDT 0xFFFF88810089F000 00061E (v02 PmRef  Cpu0Ist  00003000 INTL 20120913)
[    0.173558] ACPI: \_PR_.CPU0: _OSC native thermal LVT Acked
[    0.174661] ACPI: Dynamic OEM Table Load:
[    0.174667] ACPI: SSDT 0xFFFF888100875400 00037F (v02 PmRef  Cpu0Cst  00003001 INTL 20120913)
[    0.176276] ACPI: Dynamic OEM Table Load:
[    0.176283] ACPI: SSDT 0xFFFF888100919000 0005AA (v02 PmRef  ApIst    00003000 INTL 20120913)
[    0.177538] ACPI: Dynamic OEM Table Load:
[    0.177543] ACPI: SSDT 0xFFFF88810090DC00 000119 (v02 PmRef  ApCst    00003000 INTL 20120913)
[    0.180281] ACPI: EC: EC started
[    0.180283] ACPI: EC: interrupt blocked
[    0.182342] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.182344] ACPI: \_SB_.PCI0.LPCB.EC__: Boot DSDT EC used to handle transactions
[    0.182346] ACPI: Interpreter enabled
[    0.182354] ACPI: (supports S0 S5)
[    0.182356] ACPI: Using IOAPIC for interrupt routing
[    0.182385] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.182871] ACPI: Enabled 7 GPEs in block 00 to 7F
[    0.184775] ACPI: Power Resource [PG00] (on)
[    0.184892] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PEG0.PEGP.NHDA], AE_NOT_FOUND (20200925/psargs-330)
[    0.184899] ACPI Error: Aborting method \_SB.PCI0.PEG0.PG00._ON due to previous error (AE_NOT_FOUND) (20200925/psparse-529)
[    0.185127] ACPI: Power Resource [PG01] (on)
[    0.217201] ACPI: Power Resource [PG02] (on)
[    0.223220] ACPI: Power Resource [PC01] (on)
[    0.296906] ACPI: Power Resource [FN00] (off)
[    0.297059] ACPI: Power Resource [FN01] (off)
[    0.297204] ACPI: Power Resource [FN02] (off)
[    0.297347] ACPI: Power Resource [FN03] (off)
[    0.297489] ACPI: Power Resource [FN04] (off)
[    0.299939] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
[    0.299954] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.300029] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[    0.300707] PCI host bridge to bus 0000:00
[    0.300714] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.300720] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.300727] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.300733] pci_bus 0000:00: root bus resource [mem 0x7b000000-0xdfffffff window]
[    0.300739] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window]
[    0.300745] pci_bus 0000:00: root bus resource [bus 00-fe]
[    0.300774] pci 0000:00:00.0: [8086:1904] type 00 class 0x060000
[    0.301015] pci 0000:00:02.0: [8086:1916] type 00 class 0x030000
[    0.301036] pci 0000:00:02.0: reg 0x10: [mem 0xd4000000-0xd4ffffff 64bit]
[    0.301051] pci 0000:00:02.0: reg 0x18: [mem 0xb0000000-0xbfffffff 64bit pref]
[    0.301062] pci 0000:00:02.0: reg 0x20: [io  0xf000-0xf03f]
[    0.301098] pci 0000:00:02.0: BAR 2: assigned to efifb
[    0.301375] pci 0000:00:04.0: [8086:1903] type 00 class 0x118000
[    0.301395] pci 0000:00:04.0: reg 0x10: [mem 0xd5220000-0xd5227fff 64bit]
[    0.301767] pci 0000:00:14.0: [8086:9d2f] type 00 class 0x0c0330
[    0.301798] pci 0000:00:14.0: reg 0x10: [mem 0xd5210000-0xd521ffff 64bit]
[    0.301903] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    0.302186] pci 0000:00:14.2: [8086:9d31] type 00 class 0x118000
[    0.302216] pci 0000:00:14.2: reg 0x10: [mem 0xd5237000-0xd5237fff 64bit]
[    0.302671] pci 0000:00:15.0: [8086:9d60] type 00 class 0x118000
[    0.302883] pci 0000:00:15.0: reg 0x10: [mem 0xd5236000-0xd5236fff 64bit]
[    0.304003] pci 0000:00:16.0: [8086:9d3a] type 00 class 0x078000
[    0.304035] pci 0000:00:16.0: reg 0x10: [mem 0xd5235000-0xd5235fff 64bit]
[    0.304143] pci 0000:00:16.0: PME# supported from D3hot
[    0.304430] pci 0000:00:17.0: [8086:9d03] type 00 class 0x010601
[    0.304455] pci 0000:00:17.0: reg 0x10: [mem 0xd5230000-0xd5231fff]
[    0.304470] pci 0000:00:17.0: reg 0x14: [mem 0xd5234000-0xd52340ff]
[    0.304485] pci 0000:00:17.0: reg 0x18: [io  0xf090-0xf097]
[    0.304499] pci 0000:00:17.0: reg 0x1c: [io  0xf080-0xf083]
[    0.304514] pci 0000:00:17.0: reg 0x20: [io  0xf060-0xf07f]
[    0.304529] pci 0000:00:17.0: reg 0x24: [mem 0xd5233000-0xd52337ff]
[    0.304597] pci 0000:00:17.0: PME# supported from D3hot
[    0.304890] pci 0000:00:1c.0: [8086:9d10] type 01 class 0x060400
[    0.305014] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.305390] pci 0000:00:1c.5: [8086:9d15] type 01 class 0x060400
[    0.305532] pci 0000:00:1c.5: PME# supported from D0 D3hot D3cold
[    0.305900] pci 0000:00:1d.0: [8086:9d18] type 01 class 0x060400
[    0.306026] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.306397] pci 0000:00:1f.0: [8086:9d48] type 00 class 0x060100
[    0.306803] pci 0000:00:1f.2: [8086:9d21] type 00 class 0x058000
[    0.306826] pci 0000:00:1f.2: reg 0x10: [mem 0xd522c000-0xd522ffff]
[    0.307144] pci 0000:00:1f.3: [8086:9d70] type 00 class 0x040300
[    0.307177] pci 0000:00:1f.3: reg 0x10: [mem 0xd5228000-0xd522bfff 64bit]
[    0.307215] pci 0000:00:1f.3: reg 0x20: [mem 0xd5200000-0xd520ffff 64bit]
[    0.307288] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[    0.307667] pci 0000:00:1f.4: [8086:9d23] type 00 class 0x0c0500
[    0.307729] pci 0000:00:1f.4: reg 0x10: [mem 0xd5232000-0xd52320ff 64bit]
[    0.307804] pci 0000:00:1f.4: reg 0x20: [io  0xf040-0xf05f]
[    0.308205] pci 0000:01:00.0: [10de:1346] type 00 class 0x030200
[    0.308231] pci 0000:01:00.0: reg 0x10: [mem 0xd2000000-0xd2ffffff]
[    0.308253] pci 0000:01:00.0: reg 0x14: [mem 0xc0000000-0xcfffffff 64bit pref]
[    0.308274] pci 0000:01:00.0: reg 0x1c: [mem 0xd0000000-0xd1ffffff 64bit pref]
[    0.308290] pci 0000:01:00.0: reg 0x24: [io  0xe000-0xe07f]
[    0.308305] pci 0000:01:00.0: reg 0x30: [mem 0xd3000000-0xd307ffff pref]
[    0.308342] pci 0000:01:00.0: Enabling HDA controller
[    0.308660] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.308669] pci 0000:00:1c.0:   bridge window [io  0xe000-0xefff]
[    0.308677] pci 0000:00:1c.0:   bridge window [mem 0xc0000000-0xd30fffff]
[    0.309024] pci 0000:02:00.0: [8086:3165] type 00 class 0x028000
[    0.309118] pci 0000:02:00.0: reg 0x10: [mem 0xd5100000-0xd5101fff 64bit]
[    0.309726] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    0.310684] pci 0000:00:1c.5: PCI bridge to [bus 02]
[    0.310695] pci 0000:00:1c.5:   bridge window [mem 0xd5100000-0xd51fffff]
[    0.310785] pci 0000:03:00.0: [10ec:8168] type 00 class 0x020000
[    0.310814] pci 0000:03:00.0: reg 0x10: [io  0xd000-0xd0ff]
[    0.310853] pci 0000:03:00.0: reg 0x18: [mem 0xd5004000-0xd5004fff 64bit]
[    0.310879] pci 0000:03:00.0: reg 0x20: [mem 0xd5000000-0xd5003fff 64bit]
[    0.311030] pci 0000:03:00.0: supports D1 D2
[    0.311035] pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.311254] pci 0000:00:1d.0: PCI bridge to [bus 03]
[    0.311262] pci 0000:00:1d.0:   bridge window [io  0xd000-0xdfff]
[    0.311269] pci 0000:00:1d.0:   bridge window [mem 0xd5000000-0xd50fffff]
[    0.311302] pci_bus 0000:00: on NUMA node 0
[    0.313763] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.313869] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15)
[    0.313970] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.314069] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.314168] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.314267] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.314366] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.314464] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.315567] ACPI: EC: interrupt unblocked
[    0.315572] ACPI: EC: event unblocked
[    0.315593] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.315597] ACPI: EC: GPE=0x46
[    0.315604] ACPI: \_SB_.PCI0.LPCB.EC__: Boot DSDT EC initialization complete
[    0.315611] ACPI: \_SB_.PCI0.LPCB.EC__: EC: Used to handle transactions and events
[    0.315763] iommu: Default domain type: Translated 
[    0.315938] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.315948] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.315965] pci 0000:00:02.0: vgaarb: bridge control possible
[    0.315971] vgaarb: loaded
[    0.316089] SCSI subsystem initialized
[    0.316100] ACPI: bus type USB registered
[    0.316130] usbcore: registered new interface driver usbfs
[    0.316146] usbcore: registered new interface driver hub
[    0.316163] usbcore: registered new device driver usb
[    0.316313] Registered efivars operations
[    0.316647] PCI: Using ACPI for IRQ routing
[    0.344965] PCI: pci_cache_line_size set to 64 bytes
[    0.345318] e820: reserve RAM buffer [mem 0x00058000-0x0005ffff]
[    0.345319] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff]
[    0.345320] e820: reserve RAM buffer [mem 0x70e02000-0x73ffffff]
[    0.345321] e820: reserve RAM buffer [mem 0x70e7f000-0x73ffffff]
[    0.345323] e820: reserve RAM buffer [mem 0x75204000-0x77ffffff]
[    0.345324] e820: reserve RAM buffer [mem 0x77fff000-0x77ffffff]
[    0.345374] clocksource: Switched to clocksource tsc-early
[    0.453666] VFS: Disk quotas dquot_6.6.0
[    0.453680] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.453708] pnp: PnP ACPI init
[    0.453886] system 00:00: [io  0x0680-0x069f] has been reserved
[    0.453889] system 00:00: [io  0xffff] has been reserved
[    0.453892] system 00:00: [io  0xffff] has been reserved
[    0.453894] system 00:00: [io  0xffff] has been reserved
[    0.453896] system 00:00: [io  0x1800-0x18fe] has been reserved
[    0.453899] system 00:00: [io  0x164e-0x164f] has been reserved
[    0.453901] system 00:00: [io  0x0380-0x0387] has been reserved
[    0.453907] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.453977] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.454009] system 00:02: [io  0x1854-0x1857] has been reserved
[    0.454014] system 00:02: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    0.454249] system 00:03: [mem 0xfed10000-0xfed17fff] has been reserved
[    0.454252] system 00:03: [mem 0xfed18000-0xfed18fff] has been reserved
[    0.454254] system 00:03: [mem 0xfed19000-0xfed19fff] has been reserved
[    0.454257] system 00:03: [mem 0xe0000000-0xefffffff] has been reserved
[    0.454259] system 00:03: [mem 0xfed20000-0xfed3ffff] has been reserved
[    0.454262] system 00:03: [mem 0xfed90000-0xfed93fff] has been reserved
[    0.454264] system 00:03: [mem 0xfed45000-0xfed8ffff] has been reserved
[    0.454267] system 00:03: [mem 0xff000000-0xffffffff] has been reserved
[    0.454270] system 00:03: [mem 0xfee00000-0xfeefffff] could not be reserved
[    0.454272] system 00:03: [mem 0xdffe0000-0xdfffffff] has been reserved
[    0.454277] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.454313] system 00:04: [mem 0xfd000000-0xfdabffff] has been reserved
[    0.454315] system 00:04: [mem 0xfdad0000-0xfdadffff] has been reserved
[    0.454318] system 00:04: [mem 0xfdb00000-0xfdffffff] has been reserved
[    0.454321] system 00:04: [mem 0xfe000000-0xfe01ffff] could not be reserved
[    0.454323] system 00:04: [mem 0xfe036000-0xfe03bfff] has been reserved
[    0.454326] system 00:04: [mem 0xfe03d000-0xfe3fffff] has been reserved
[    0.454328] system 00:04: [mem 0xfe410000-0xfe7fffff] has been reserved
[    0.454332] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.454542] system 00:05: [io  0xff00-0xfffe] has been reserved
[    0.454547] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.455283] system 00:06: [mem 0xfe029000-0xfe029fff] has been reserved
[    0.455286] system 00:06: [mem 0xfe028000-0xfe028fff] has been reserved
[    0.455290] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.455600] pnp 00:07: Plug and Play ACPI device, IDs DLL070b PNP0f13 (active)
[    0.455617] pnp 00:08: Plug and Play ACPI device, IDs PNP0303 (active)
[    0.455858] pnp: PnP ACPI: found 9 devices
[    0.461288] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.461316] NET: Registered protocol family 2
[    0.461430] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.461443] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.461517] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.461687] TCP: Hash tables configured (established 65536 bind 65536)
[    0.461712] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.461736] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.461781] NET: Registered protocol family 1
[    0.461849] RPC: Registered named UNIX socket transport module.
[    0.461851] RPC: Registered udp transport module.
[    0.461853] RPC: Registered tcp transport module.
[    0.461854] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.461865] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.461868] pci 0000:00:1c.0:   bridge window [io  0xe000-0xefff]
[    0.461873] pci 0000:00:1c.0:   bridge window [mem 0xc0000000-0xd30fffff]
[    0.461880] pci 0000:00:1c.5: PCI bridge to [bus 02]
[    0.461886] pci 0000:00:1c.5:   bridge window [mem 0xd5100000-0xd51fffff]
[    0.461894] pci 0000:00:1d.0: PCI bridge to [bus 03]
[    0.461896] pci 0000:00:1d.0:   bridge window [io  0xd000-0xdfff]
[    0.461901] pci 0000:00:1d.0:   bridge window [mem 0xd5000000-0xd50fffff]
[    0.461909] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    0.461911] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    0.461913] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.461916] pci_bus 0000:00: resource 7 [mem 0x7b000000-0xdfffffff window]
[    0.461918] pci_bus 0000:00: resource 8 [mem 0xfd000000-0xfe7fffff window]
[    0.461921] pci_bus 0000:01: resource 0 [io  0xe000-0xefff]
[    0.461923] pci_bus 0000:01: resource 1 [mem 0xc0000000-0xd30fffff]
[    0.461925] pci_bus 0000:02: resource 1 [mem 0xd5100000-0xd51fffff]
[    0.461927] pci_bus 0000:03: resource 0 [io  0xd000-0xdfff]
[    0.461929] pci_bus 0000:03: resource 1 [mem 0xd5000000-0xd50fffff]
[    0.462031] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.463101] PCI: CLS 0 bytes, default 64
[    0.463129] Trying to unpack rootfs image as initramfs...
[    1.339584] Freeing initrd memory: 8696K
[    1.339594] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    1.339597] software IO TLB: mapped [mem 0x000000006bcf9000-0x000000006fcf9000] (64MB)
[    1.339675] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer
[    1.339677] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[    1.339679] RAPL PMU: hw unit of domain package 2^-14 Joules
[    1.339681] RAPL PMU: hw unit of domain dram 2^-14 Joules
[    1.339682] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    1.339684] RAPL PMU: hw unit of domain psys 2^-14 Joules
[    1.340123] Initialise system trusted keyrings
[    1.340155] workingset: timestamp_bits=62 max_order=21 bucket_order=0
[    1.340248] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.340313] NFS: Registering the id_resolver key type
[    1.340318] Key type id_resolver registered
[    1.340320] Key type id_legacy registered
[    1.340349] Key type asymmetric registered
[    1.340351] Asymmetric key parser 'x509' registered
[    1.340358] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.340360] io scheduler mq-deadline registered
[    1.340362] io scheduler kyber registered
[    1.340932] efifb: probing for efifb
[    1.340942] efifb: framebuffer at 0xb0000000, using 1920k, total 1920k
[    1.340945] efifb: mode is 800x600x32, linelength=3200, pages=1
[    1.340946] efifb: scrolling: redraw
[    1.340948] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    1.341863] Console: switching to colour frame buffer device 100x37
[    1.342665] fb0: EFI VGA frame buffer device
[    1.342880] Monitor-Mwait will be used to enter C-1 state
[    1.342884] Monitor-Mwait will be used to enter C-2 state
[    1.342889] Monitor-Mwait will be used to enter C-3 state
[    1.342892] ACPI: \_PR_.CPU0: Found 3 idle states
[    1.343045] ACPI: \_PR_.CPU1: Found 3 idle states
[    1.343188] ACPI: \_PR_.CPU2: Found 3 idle states
[    1.343327] ACPI: \_PR_.CPU3: Found 3 idle states
[    1.343408] ioatdma: Intel(R) QuickData Technology Driver 5.00
[    1.343463] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    1.344122] Linux agpgart interface v0.103
[    1.345565] brd: module loaded
[    1.346971] loop: module loaded
[    1.347270] Loading iSCSI transport class v2.0-870.
[    1.347809] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[    1.348179] SCSI Media Changer driver v0.25 
[    1.348504] jme: JMicron JMC2XX ethernet driver version 1.0.8
[    1.348855] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    1.351649] serio: i8042 KBD port at 0x60,0x64 irq 1
[    1.351974] serio: i8042 AUX port at 0x60,0x64 irq 12
[    1.352509] mousedev: PS/2 mouse device common for all mice
[    1.352878] rtc_cmos 00:01: RTC can wake from S4
[    1.353823] rtc_cmos 00:01: registered as rtc0
[    1.354279] rtc_cmos 00:01: setting system clock to 2021-07-11T08:14:12 UTC (1625991252)
[    1.354634] rtc_cmos 00:01: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    1.354988] IR NEC protocol handler initialized
[    1.355311] IR RC5(x/sz) protocol handler initialized
[    1.355630] IR RC6 protocol handler initialized
[    1.355950] IR JVC protocol handler initialized
[    1.356264] IR Sony protocol handler initialized
[    1.356619] IR SANYO protocol handler initialized
[    1.356961] IR Sharp protocol handler initialized
[    1.357259] IR MCE Keyboard/mouse protocol handler initialized
[    1.357562] IR XMP protocol handler initialized
[    1.357859] ir_imon_decoder: IR iMON protocol handler initialized
[    1.358161] IR RCMM protocol handler initialized
[    1.358475] intel_pstate: Intel P-state driver initializing
[    1.359112] intel_pstate: HWP enabled
[    1.359449] hid: raw HID events driver (C) Jiri Kosina
[    1.359806] usbcore: registered new interface driver usbhid
[    1.360135] usbhid: USB HID core driver
[    1.360503] NET: Registered protocol family 17
[    1.360847] Key type dns_resolver registered
[    1.361682] microcode: sig=0x406e3, pf=0x80, revision=0x8a
[    1.361962] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    1.362596] microcode: Microcode Update Driver: v2.2.
[    1.362599] IPI shorthand broadcast: enabled
[    1.363317] sched_clock: Marking stable (1370895135, -9349163)->(1375487171, -13941199)
[    1.363833] registered taskstats version 1
[    1.364179] Loading compiled-in X.509 certificates
[    1.365404] Freeing unused kernel image (initmem) memory: 1104K
[    1.406693] Write protecting the kernel read-only data: 14336k
[    1.407726] Freeing unused kernel image (text/rodata gap) memory: 2036K
[    1.408539] Freeing unused kernel image (rodata/data gap) memory: 1668K
[    1.408965] Run /init as init process
[    1.409325]   with arguments:
[    1.409326]     /init
[    1.409326]     dokeymap
[    1.409327]     cdroot
[    1.409327]   with environment:
[    1.409328]     HOME=/
[    1.409328]     TERM=linux
[    1.409329]     BOOT_IMAGE=/boot/gentoo
[    1.409329]     looptype=squashfs
[    1.409330]     loop=/image.squashfs
[    1.613166] udevd[1047]: starting version 3.2.10
[    1.613309] random: udevd: uninitialized urandom read (16 bytes read)
[    1.613332] random: udevd: uninitialized urandom read (16 bytes read)
[    1.613339] random: udevd: uninitialized urandom read (16 bytes read)
[    1.614264] udevd[1048]: starting eudev-3.2.10
[    1.634569] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.634577] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    1.635661] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000081109810
[    1.635735] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    1.636046] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.636048] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.636050] usb usb1: Product: xHCI Host Controller
[    1.636052] usb usb1: Manufacturer: Linux 5.10.27-gentoo-x86_64 xhci-hcd
[    1.636053] usb usb1: SerialNumber: 0000:00:14.0
[    1.636280] hub 1-0:1.0: USB hub found
[    1.636300] hub 1-0:1.0: 12 ports detected
[    1.638774] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.638779] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    1.638783] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[    1.639469] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    1.639471] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.639473] usb usb2: Product: xHCI Host Controller
[    1.639475] usb usb2: Manufacturer: Linux 5.10.27-gentoo-x86_64 xhci-hcd
[    1.639476] usb usb2: SerialNumber: 0000:00:14.0
[    1.639871] hub 2-0:1.0: USB hub found
[    1.640285] hub 2-0:1.0: 6 ports detected
[    1.641006] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.641774] cryptd: max_cpu_qlen set to 1000
[    1.642959] AVX2 version of gcm_enc/dec engaged.
[    1.642962] AES CTR mode by8 optimization enabled
[    1.644310] libata version 3.00 loaded.
[    1.645776] ahci 0000:00:17.0: version 3.0
[    1.645996] ahci 0000:00:17.0: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    1.645998] ahci 0000:00:17.0: flags: 64bit ncq pm led clo only pio slum part deso sadm sds apst 
[    1.646436] scsi host0: ahci
[    1.646598] scsi host1: ahci
[    1.646657] ata1: SATA max UDMA/133 abar m2048@0xd5233000 port 0xd5233100 irq 124
[    1.646660] ata2: SATA max UDMA/133 abar m2048@0xd5233000 port 0xd5233180 irq 124
[    1.668396] libphy: r8169: probed
[    1.668529] r8169 0000:03:00.0 eth0: RTL8168gu/8111gu, f4:8e:38:f1:5f:5c, XID 509, IRQ 125
[    1.668530] r8169 0000:03:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    1.980633] ata2: SATA link down (SStatus 4 SControl 300)
[    1.980704] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.010571] ata1.00: ATA-8: ST500LT012-1DG142, 0002SDM1, max UDMA/133
[    2.010573] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 32)
[    2.016612] usb 1-2: new high-speed USB device number 2 using xhci_hcd
[    2.147068] ata1.00: configured for UDMA/133
[    2.147215] scsi 0:0:0:0: Direct-Access     ATA      ST500LT012-1DG14 SDM1 PQ: 0 ANSI: 5
[    2.147459] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    2.147461] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.147468] sd 0:0:0:0: [sda] Write Protect is off
[    2.147469] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.147479] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.196712] psmouse serio1: synaptics: queried max coordinates: x [..5664], y [..4704]
[    2.201080] usb 1-2: New USB device found, idVendor=0930, idProduct=6544, bcdDevice= 1.00
[    2.201082] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.201084] usb 1-2: Product: DataTraveler G2 
[    2.201085] usb 1-2: Manufacturer: Kingston
[    2.201086] usb 1-2: SerialNumber: 001CC0C60DDAC030842D07B7
[    2.204148] usb-storage 1-2:1.0: USB Mass Storage device detected
[    2.204537] scsi host2: usb-storage 1-2:1.0
[    2.204614] usbcore: registered new interface driver usb-storage
[    2.229558] psmouse serio1: synaptics: queried min coordinates: x [1276..], y [1148..]
[    2.229562] psmouse serio1: synaptics: The touchpad can support a better bus than the too old PS/2 protocol. Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.
[    2.260143]  sda: sda1 sda2
[    2.260532] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.292952] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf00823/0x840300/0x12e800/0x0, board id: 3017, fw id: 1988148
[    2.333457] random: fast init done
[    2.333518] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input2
[    2.346582] usb 1-5: new full-speed USB device number 3 using xhci_hcd
[    2.376569] tsc: Refined TSC clocksource calibration: 2399.999 MHz
[    2.376574] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2298364cab5, max_idle_ns: 440795214892 ns
[    2.376588] clocksource: Switched to clocksource tsc
[    2.539075] usb 1-5: New USB device found, idVendor=138a, idProduct=0011, bcdDevice= 0.78
[    2.539077] usb 1-5: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[    2.539079] usb 1-5: SerialNumber: b710c460ac16
[    2.686733] usb 1-6: new full-speed USB device number 4 using xhci_hcd
[    2.868588] usb 1-6: New USB device found, idVendor=8087, idProduct=0a2a, bcdDevice= 0.01
[    2.868590] usb 1-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.016751] usb 1-7: new high-speed USB device number 5 using xhci_hcd
[    3.257661] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler G2  1.00 PQ: 0 ANSI: 2
[    3.258255] urandom_read: 4 callbacks suppressed
[    3.258257] random: udevd: uninitialized urandom read (16 bytes read)
[    3.258272] random: udevd: uninitialized urandom read (16 bytes read)
[    3.258293] random: udevd: uninitialized urandom read (16 bytes read)
[    3.258823] sd 2:0:0:0: [sdb] 15654848 512-byte logical blocks: (8.02 GB/7.46 GiB)
[    3.259024] sd 2:0:0:0: [sdb] Write Protect is off
[    3.259027] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[    3.259232] sd 2:0:0:0: [sdb] No Caching mode page found
[    3.259234] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[    3.266700] usb 1-7: New USB device found, idVendor=0c45, idProduct=6712, bcdDevice=55.04
[    3.266703] usb 1-7: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[    3.266704] usb 1-7: Product: Integrated_Webcam_HD
[    3.266705] usb 1-7: Manufacturer: CN0V359T724876BRE1PXA00
[    3.297436]  sdb: sdb1 sdb2
[    3.298306] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[    3.586507] raid6: avx2x4   gen() 28660 MB/s
[    3.756506] raid6: avx2x4   xor()  9079 MB/s
[    3.926506] raid6: avx2x2   gen() 28077 MB/s
[    4.096504] raid6: avx2x2   xor() 16318 MB/s
[    4.266505] raid6: avx2x1   gen() 22688 MB/s
[    4.436506] raid6: avx2x1   xor() 13256 MB/s
[    4.606507] raid6: sse2x4   gen() 12513 MB/s
[    4.776506] raid6: sse2x4   xor()  7327 MB/s
[    4.946506] raid6: sse2x2   gen() 12657 MB/s
[    5.116506] raid6: sse2x2   xor()  7236 MB/s
[    5.286505] raid6: sse2x1   gen() 10820 MB/s
[    5.456506] raid6: sse2x1   xor()  5399 MB/s
[    5.456507] raid6: using algorithm avx2x4 gen() 28660 MB/s
[    5.456508] raid6: .... xor() 9079 MB/s, rmw enabled
[    5.456509] raid6: using avx2x2 recovery algorithm
[    5.458564] xor: automatically using best checksumming function   avx       
[    5.477827] Btrfs loaded, crc32c=crc32c-generic
[    5.478411] BTRFS: device label gentoo devid 1 transid 962175 /dev/sda2 scanned by mount (1293)
[    5.478956] BTRFS info (device sda2): disk space caching is enabled
[    5.478958] BTRFS info (device sda2): has skinny extents
[    5.581605] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd 0, flush 0, corrupt 5, gen 0
[    5.645647] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[    5.654277] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[    5.654285] BTRFS error (device sda2): failed to read block groups: -5
[    5.655319] BTRFS error (device sda2): open_ctree failed
[    5.664167] ISO 9660 Extensions: Microsoft Joliet Level 3
[    5.665449] ISO 9660 Extensions: Microsoft Joliet Level 3
[    5.666263] ISO 9660 Extensions: RRIP_1991A
[    9.720159] random: crng init done
[   10.860091] udevd[8010]: starting version 3.2.10
[   10.870886] udevd[8010]: starting eudev-3.2.10
[   10.913630] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input3
[   10.913720] ACPI: Sleep Button [SLPB]
[   10.913762] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input4
[   10.913812] ACPI: Power Button [PWRB]
[   10.913864] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input5
[   10.916769] thermal LNXTHERM:00: registered as thermal_zone0
[   10.916772] ACPI: Thermal Zone [TZ00] (28 C)
[   10.916953] thermal LNXTHERM:01: registered as thermal_zone1
[   10.916954] ACPI: Thermal Zone [TZ01] (30 C)
[   10.935410] ACPI: AC Adapter [ADP1] (on-line)
[   10.936761] input: DELL Wireless hotkeys as /devices/virtual/input/input6
[   10.946549] ACPI: Lid Switch [LID0]
[   10.946625] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input7
[   10.946755] ACPI: Power Button [PWRF]
[   11.027281] wmi_bus wmi_bus-PNP0C14:01: WQBC data block query control method not found
[   11.035358] battery: ACPI: Battery Slot [BAT0] (battery present)
[   11.039171] r8169 0000:03:00.0 enp3s0: renamed from eth0
[   11.059500] i801_smbus 0000:00:1f.4: SPD Write Disable is set
[   11.059542] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[   11.063072] i2c i2c-0: 1/4 memory slots populated (from DMI)
[   11.063413] i2c i2c-0: Successfully instantiated SPD at 0x50
[   11.066578] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
[   11.139238] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   11.148690] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   11.239024] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.4)
[   11.247454] Intel(R) Wireless WiFi driver for Linux
[   11.247827] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[   11.254827] dell-smbios A80593CE-A997-11DA-B012-B622A1EF5492: WMI SMBIOS userspace interface not supported(0), try upgrading to a newer BIOS
[   11.325355] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM
[   11.325357] iwlwifi 0000:02:00.0: Found debug configuration: 0
[   11.325508] iwlwifi 0000:02:00.0: loaded firmware version 29.4063824552.0 7265D-29.ucode op_mode iwlmvm
[   11.489858] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[   11.490130] input: Dell WMI hotkeys as /devices/platform/PNP0C14:01/wmi_bus/wmi_bus-PNP0C14:01/9DBB5994-A997-11DA-B012-B622A1EF5492/input/input8
[   11.499584] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 3165, REV=0x210
[   11.506802] snd_hda_codec_conexant hdaudioC0D0: CX20722: BIOS auto-probing.
[   11.507281] snd_hda_codec_conexant hdaudioC0D0: autoconfig for CX20722: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   11.507284] snd_hda_codec_conexant hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   11.507285] snd_hda_codec_conexant hdaudioC0D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
[   11.507286] snd_hda_codec_conexant hdaudioC0D0:    mono: mono_out=0x0
[   11.507287] snd_hda_codec_conexant hdaudioC0D0:    inputs:
[   11.507289] snd_hda_codec_conexant hdaudioC0D0:      Internal Mic=0x1a
[   11.507290] snd_hda_codec_conexant hdaudioC0D0:      Mic=0x19
[   11.513188] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[   11.513543] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor.
[   11.514775] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[   11.515080] hdaudio hdaudioC0D2: Unable to bind the codec
[   11.515282] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[   11.515340] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[   11.521841] i2c_hid i2c-SYNA2393:00: supply vdd not found, using dummy regulator
[   11.521877] i2c_hid i2c-SYNA2393:00: supply vddl not found, using dummy regulator
[   11.522620] iwlwifi 0000:02:00.0: base HW address: 3c:f8:62:c7:15:aa
[   11.583340] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[   11.583630] thermal thermal_zone3: failed to read out thermal zone (-61)
[   11.584239] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[   11.714899] input: SYNA2393:00 06CB:75E2 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-SYNA2393:00/0018:06CB:75E2.0001/input/input11
[   11.714973] input: SYNA2393:00 06CB:75E2 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-SYNA2393:00/0018:06CB:75E2.0001/input/input12
[   11.715028] hid-generic 0018:06CB:75E2.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA2393:00 06CB:75E2] on i2c-SYNA2393:00
[   11.954578] input: SYNA2393:00 06CB:75E2 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-SYNA2393:00/0018:06CB:75E2.0001/input/input14
[   11.954680] input: SYNA2393:00 06CB:75E2 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-SYNA2393:00/0018:06CB:75E2.0001/input/input15
[   11.954764] hid-multitouch 0018:06CB:75E2.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA2393:00 06CB:75E2] on i2c-SYNA2393:00
[   12.634101] NET: Registered protocol family 10
[   12.634521] Segment Routing with IPv6
[   12.639112] 8021q: 802.1Q VLAN Support v1.8
[   12.726540] Generic FE-GE Realtek PHY r8169-300:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-300:00, irq=IGNORE)
[   12.967426] r8169 0000:03:00.0 enp3s0: Link is Down
[   12.981546] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[   13.061106] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[   13.062728] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
[   42.516448] BTRFS info (device sda2): disk space caching is enabled
[   42.516451] BTRFS info (device sda2): has skinny extents
[   42.636970] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd 0, flush 0, corrupt 5, gen 0
[   42.712137] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[   42.720773] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[   42.720782] BTRFS error (device sda2): failed to read block groups: -5
[   42.722766] BTRFS error (device sda2): open_ctree failed
[   70.598824] BTRFS info (device sda2): disk space caching is enabled
[   70.598827] BTRFS info (device sda2): has skinny extents
[   70.706358] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd 0, flush 0, corrupt 5, gen 0
[   70.770327] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[   70.778954] BTRFS error (device sda2): parent transid verify failed on 34308096 wanted 962175 found 961764
[   70.778979] BTRFS error (device sda2): failed to read block groups: -5
[   70.779513] BTRFS error (device sda2): open_ctree failed
[  174.146341] wlp2s0: authenticate with 68:db:54:a4:ce:68
[  174.153726] wlp2s0: send auth to 68:db:54:a4:ce:68 (try 1/3)
[  174.156724] wlp2s0: authenticated
[  174.166707] wlp2s0: associate with 68:db:54:a4:ce:68 (try 1/3)
[  174.169988] wlp2s0: RX AssocResp from 68:db:54:a4:ce:68 (capab=0x11 status=0 aid=1)
[  174.171695] wlp2s0: associated
[  174.188425] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready

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

* Re: btrfs cannot be mounted or checked
  2021-07-11  8:59 btrfs cannot be mounted or checked Zhenyu Wu
@ 2021-07-11 11:37 ` Forza
  2021-07-11 12:00   ` Qu Wenruo
  0 siblings, 1 reply; 17+ messages in thread
From: Forza @ 2021-07-11 11:37 UTC (permalink / raw)
  To: Zhenyu Wu, linux-btrfs



On 2021-07-11 10:59, Zhenyu Wu wrote:
> Sorry for my disturbance.
> After a dirty reboot because of a computer crash, my btrfs partition
> cannot be mounted. The same thing happened before, but now `btrfs
> rescue zero-log` cannot work.
> ```
> $ uname -r
> 5.10.27-gentoo-x86_64
> $ btrfs rescue zero-log /dev/sda2
> Clearing log on /dev/sda2, previous log_root 0, level 0
> $ mount /dev/sda2 /mnt/gentoo
> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
> /dev/sda2, missing codepage or helper program, or other error.
> $ btrfs check /dev/sda2
> parent transid verify failed on 34308096 wanted 962175 found 961764
> parent transid verify failed on 34308096 wanted 962175 found 961764
> parent transid verify failed on 34308096 wanted 962175 found 961764
> Ignoring transid failure
> leaf parent key incorrect 34308096
> ERROR: failed to read block groups: Operation not permitted
> ERROR: cannot open file system
> $ dmesg 2>&1|tee dmesg.txt
> # see attachment
> ```
> Like `mount -o ro,usebackuproot` cannot work, too.
> 
> Thanks for any help!
> 


Hi!

Parent transid failed is hard to recover from, as mentioned on 
https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F

I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You 
can check with "smartctl -x /dev/sda" to determine the health.

One way of avoiding this error is to disable write-cache. Parent transid 
failed can happen when the disk re-orders writes in its write cache 
before flushing to disk. This violates barriers, but it is unfortately 
common. If you have a crash, SATA bus reset or other issues, unwritten 
content is lost. The problem here is the re-ordering. The superblock is 
written out before other metadata (which is now lost due to the crash).

You disable write cache with "hdparm -W0 /dev/sda". It might be worth 
adding this to a cron-job every 5 minutes or so, as the setting is not 
persistent and can get reset if the disk looses power, goes to sleep, etc.

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

* Re: btrfs cannot be mounted or checked
  2021-07-11 11:37 ` Forza
@ 2021-07-11 12:00   ` Qu Wenruo
  2021-07-14  8:49     ` Zhenyu Wu
  0 siblings, 1 reply; 17+ messages in thread
From: Qu Wenruo @ 2021-07-11 12:00 UTC (permalink / raw)
  To: Forza, Zhenyu Wu, linux-btrfs



On 2021/7/11 下午7:37, Forza wrote:
>
>
> On 2021-07-11 10:59, Zhenyu Wu wrote:
>> Sorry for my disturbance.
>> After a dirty reboot because of a computer crash, my btrfs partition
>> cannot be mounted. The same thing happened before, but now `btrfs
>> rescue zero-log` cannot work.
>> ```
>> $ uname -r
>> 5.10.27-gentoo-x86_64
>> $ btrfs rescue zero-log /dev/sda2
>> Clearing log on /dev/sda2, previous log_root 0, level 0
>> $ mount /dev/sda2 /mnt/gentoo
>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>> /dev/sda2, missing codepage or helper program, or other error.
>> $ btrfs check /dev/sda2
>> parent transid verify failed on 34308096 wanted 962175 found 961764
>> parent transid verify failed on 34308096 wanted 962175 found 961764
>> parent transid verify failed on 34308096 wanted 962175 found 961764
>> Ignoring transid failure
>> leaf parent key incorrect 34308096
>> ERROR: failed to read block groups: Operation not permitted
>> ERROR: cannot open file system
>> $ dmesg 2>&1|tee dmesg.txt
>> # see attachment
>> ```
>> Like `mount -o ro,usebackuproot` cannot work, too.
>>
>> Thanks for any help!
>>
>
>
> Hi!
>
> Parent transid failed is hard to recover from, as mentioned on
> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>
>
> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
> can check with "smartctl -x /dev/sda" to determine the health.
>
> One way of avoiding this error is to disable write-cache. Parent transid
> failed can happen when the disk re-orders writes in its write cache
> before flushing to disk. This violates barriers, but it is unfortately
> common. If you have a crash, SATA bus reset or other issues, unwritten
> content is lost. The problem here is the re-ordering. The superblock is
> written out before other metadata (which is now lost due to the crash).

To be extra accurate, all filesysmtems have taken the re-order into
consideration.
Thus we have flush (or called barrier) command to force the disk to
write all its cache back to disk or at least non-volatile cache.

Combined with mandatory metadata CoW, it means, no matter what the disk
re-order or not, we should only see either the newer data after the
flush, or the older data before the flush.

But unfortunately, hardware is unreliable, sometimes even lies about its
flush command.
Thus it's possible some disks, especially some cheap RAID cards, tend to
just ignore such flush commands, thus leaves the data corrupted after a
power loss.

Thanks,
Qu

>
> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
> adding this to a cron-job every 5 minutes or so, as the setting is not
> persistent and can get reset if the disk looses power, goes to sleep, etc.

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

* Re: btrfs cannot be mounted or checked
  2021-07-11 12:00   ` Qu Wenruo
@ 2021-07-14  8:49     ` Zhenyu Wu
  2021-07-14  8:58       ` Qu Wenruo
  0 siblings, 1 reply; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-14  8:49 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Forza, linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 5148 bytes --]

sorry for late:(

I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
as my situation. But in my computer (boot from live usb) `btrfs check
--init-extent-tree` output a lot of non-ascii character (maybe because
ansi escape code mess the terminal)
after several days it outputs `7/7`and `killed`. The solution looks failed.

I'm sorry because my live usb don't have smartctl :(

```
$ hdparm -W0 /dev/sda
/dev/sda:
 setting drive write-caching to 0 (off)
 write-caching =  0 (off)
```

But now the btrfs partition still cannot be mounted.

when I try to mount it with `usebackuproot`, it will output the same
error message. And dmesg will output
```
[250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
deprecated, use 'rescue=usebackuproot' instead
[250062.064788] BTRFS info (device sda2): trying to use backup root at
mount time
[250062.064789] BTRFS info (device sda2): disk space caching is enabled
[250062.064790] BTRFS info (device sda2): has skinny extents
[250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
rd 0, flush 0, corrupt 5, gen 0
[250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
block group used, have 1073754112 expect [0, 1073741824)
[250062.277048] BTRFS error (device sda2): block=273006592 read time
tree block corruption detected
[250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
block group used, have 1073754112 expect [0, 1073741824)
[250062.291927] BTRFS error (device sda2): block=273006592 read time
tree block corruption detected
[250062.291943] BTRFS error (device sda2): failed to read block groups: -5
[250062.292897] BTRFS error (device sda2): open_ctree failed
```

If don't usebackuproot, dmesg will output the same log except the first 2 lines.

Now btrfs check can check this partition:

```
$ btrfs check /dev/sda2 2>&1|tee check.txt
# see attachment
```

Does my disk have any hope to be rescued?
thanks!

On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
> On 2021/7/11 下午7:37, Forza wrote:
>>
>>
>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>> Sorry for my disturbance.
>>> After a dirty reboot because of a computer crash, my btrfs partition
>>> cannot be mounted. The same thing happened before, but now `btrfs
>>> rescue zero-log` cannot work.
>>> ```
>>> $ uname -r
>>> 5.10.27-gentoo-x86_64
>>> $ btrfs rescue zero-log /dev/sda2
>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>> $ mount /dev/sda2 /mnt/gentoo
>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>> /dev/sda2, missing codepage or helper program, or other error.
>>> $ btrfs check /dev/sda2
>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>> Ignoring transid failure
>>> leaf parent key incorrect 34308096
>>> ERROR: failed to read block groups: Operation not permitted
>>> ERROR: cannot open file system
>>> $ dmesg 2>&1|tee dmesg.txt
>>> # see attachment
>>> ```
>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>
>>> Thanks for any help!
>>>
>>
>>
>> Hi!
>>
>> Parent transid failed is hard to recover from, as mentioned on
>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>
>>
>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
>> can check with "smartctl -x /dev/sda" to determine the health.
>>
>> One way of avoiding this error is to disable write-cache. Parent transid
>> failed can happen when the disk re-orders writes in its write cache
>> before flushing to disk. This violates barriers, but it is unfortately
>> common. If you have a crash, SATA bus reset or other issues, unwritten
>> content is lost. The problem here is the re-ordering. The superblock is
>> written out before other metadata (which is now lost due to the crash).
>
> To be extra accurate, all filesysmtems have taken the re-order into
> consideration.
> Thus we have flush (or called barrier) command to force the disk to
> write all its cache back to disk or at least non-volatile cache.
>
> Combined with mandatory metadata CoW, it means, no matter what the disk
> re-order or not, we should only see either the newer data after the
> flush, or the older data before the flush.
>
> But unfortunately, hardware is unreliable, sometimes even lies about its
> flush command.
> Thus it's possible some disks, especially some cheap RAID cards, tend to
> just ignore such flush commands, thus leaves the data corrupted after a
> power loss.
>
> Thanks,
> Qu
>
>>
>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>> adding this to a cron-job every 5 minutes or so, as the setting is not
>> persistent and can get reset if the disk looses power, goes to sleep,
>> etc.
>

[-- Attachment #2: check.txt --]
[-- Type: text/plain, Size: 80962 bytes --]

warning, bad space info total_bytes 1082130432 used 1082142720
warning, bad space info total_bytes 2155872256 used 2155884544
[1/7] checking root items
[2/7] checking extents
ref mismatch on [96206848 16384] extent item 81, found 77
backref 96206848 parent 1362119802880 not referenced back 0x55f4fe088900
backref 96206848 parent 857950994432 not referenced back 0x55f4fe088cf0
backref 96206848 parent 151504666624 not referenced back 0x55f4fe0890b0
backref 96206848 parent 25203179520 not referenced back 0x55f4fe089230
incorrect global backref count on 96206848 found 81 wanted 77
backpointer mismatch on [96206848 16384]
ref mismatch on [100450304 16384] extent item 13, found 12
backref 100450304 parent 857950994432 not referenced back 0x55f4fddf9040
incorrect global backref count on 100450304 found 13 wanted 12
backpointer mismatch on [100450304 16384]
ref mismatch on [104316928 16384] extent item 13, found 12
backref 104316928 parent 857950994432 not referenced back 0x55f4e1b63060
incorrect global backref count on 104316928 found 13 wanted 12
backpointer mismatch on [104316928 16384]
ref mismatch on [108380160 16384] extent item 13, found 12
backref 108380160 parent 857950994432 not referenced back 0x55f4fe04d580
incorrect global backref count on 108380160 found 13 wanted 12
backpointer mismatch on [108380160 16384]
ref mismatch on [117309440 16384] extent item 13, found 12
backref 117309440 parent 857950994432 not referenced back 0x55f4e1c63650
incorrect global backref count on 117309440 found 13 wanted 12
backpointer mismatch on [117309440 16384]
ref mismatch on [136970240 16384] extent item 5, found 3
backref 136970240 parent 151504666624 not referenced back 0x55f4e1b9b560
backref 136970240 parent 25203179520 not referenced back 0x55f4e1b9c460
incorrect global backref count on 136970240 found 5 wanted 3
backpointer mismatch on [136970240 16384]
ref mismatch on [141246464 16384] extent item 5, found 3
backref 141246464 parent 151504666624 not referenced back 0x55f4e1baa0d0
backref 141246464 parent 25203179520 not referenced back 0x55f4e1ba97d0
incorrect global backref count on 141246464 found 5 wanted 3
backpointer mismatch on [141246464 16384]
ref mismatch on [141524992 16384] extent item 5, found 3
backref 141524992 parent 151504666624 not referenced back 0x55f4e1bab150
backref 141524992 parent 25203179520 not referenced back 0x55f4e1bab750
incorrect global backref count on 141524992 found 5 wanted 3
backpointer mismatch on [141524992 16384]
ref mismatch on [148766720 16384] extent item 5, found 3
backref 148766720 parent 151504666624 not referenced back 0x55f4e1bc87e0
backref 148766720 parent 25203179520 not referenced back 0x55f4e1bc8660
incorrect global backref count on 148766720 found 5 wanted 3
backpointer mismatch on [148766720 16384]
ref mismatch on [155172864 16384] extent item 5, found 3
backref 155172864 parent 151504666624 not referenced back 0x55f4e1c54250
backref 155172864 parent 25203179520 not referenced back 0x55f4e1c540d0
incorrect global backref count on 155172864 found 5 wanted 3
backpointer mismatch on [155172864 16384]
ref mismatch on [160088064 16384] extent item 5, found 3
backref 160088064 parent 151504666624 not referenced back 0x55f4e19dce40
backref 160088064 parent 25203179520 not referenced back 0x55f4e19dce70
incorrect global backref count on 160088064 found 5 wanted 3
backpointer mismatch on [160088064 16384]
ref mismatch on [296321024 16384] extent item 81, found 77
backref 296321024 parent 1362119802880 not referenced back 0x55f4fe0ee430
backref 296321024 parent 857950994432 not referenced back 0x55f4fe0ee820
backref 296321024 parent 151504666624 not referenced back 0x55f4fe0eebe0
backref 296321024 parent 25203179520 not referenced back 0x55f4fe0eed60
incorrect global backref count on 296321024 found 81 wanted 77
backpointer mismatch on [296321024 16384]
ref mismatch on [675627008 16384] extent item 2, found 1
backref 675627008 parent 25203179520 not referenced back 0x55f4fe034190
incorrect global backref count on 675627008 found 2 wanted 1
backpointer mismatch on [675627008 16384]
ref mismatch on [680247296 16384] extent item 4, found 2
backref 680247296 parent 25203179520 not referenced back 0x55f4fe0d6e60
backref 680247296 parent 151504666624 not referenced back 0x55f4fe0d6e30
incorrect global backref count on 680247296 found 4 wanted 2
backpointer mismatch on [680247296 16384]
ref mismatch on [680263680 16384] extent item 4, found 2
backref 680263680 parent 25203179520 not referenced back 0x55f4fe0d6ff0
backref 680263680 parent 151504666624 not referenced back 0x55f4fe0d6fc0
incorrect global backref count on 680263680 found 4 wanted 2
backpointer mismatch on [680263680 16384]
ref mismatch on [691847168 16384] extent item 4, found 2
backref 691847168 parent 25203179520 not referenced back 0x55f4fe0c7540
backref 691847168 parent 151504666624 not referenced back 0x55f4fe0c7510
incorrect global backref count on 691847168 found 4 wanted 2
backpointer mismatch on [691847168 16384]
ref mismatch on [819183616 16384] extent item 4, found 2
backref 819183616 parent 25203179520 not referenced back 0x55f4fe080fb0
backref 819183616 parent 151504666624 not referenced back 0x55f4fe080f80
incorrect global backref count on 819183616 found 4 wanted 2
backpointer mismatch on [819183616 16384]
ref mismatch on [940032000 16384] extent item 4, found 2
backref 940032000 parent 25203179520 not referenced back 0x55f4fdfa0e00
backref 940032000 parent 151504666624 not referenced back 0x55f4fdfa0dd0
incorrect global backref count on 940032000 found 4 wanted 2
backpointer mismatch on [940032000 16384]
ref mismatch on [956989440 16384] extent item 81, found 77
backref 956989440 parent 1362119802880 not referenced back 0x55f4fe171050
backref 956989440 parent 857950994432 not referenced back 0x55f4fe171440
backref 956989440 parent 151504666624 not referenced back 0x55f4fe171800
backref 956989440 parent 25203179520 not referenced back 0x55f4fe171980
incorrect global backref count on 956989440 found 81 wanted 77
backpointer mismatch on [956989440 16384]
ref mismatch on [1066303488 16384] extent item 4, found 2
backref 1066303488 parent 25203179520 not referenced back 0x55f4fe1b4b30
backref 1066303488 parent 151504666624 not referenced back 0x55f4fe1b4b00
incorrect global backref count on 1066303488 found 4 wanted 2
backpointer mismatch on [1066303488 16384]
ref mismatch on [1095565312 16384] extent item 81, found 77
backref 1095565312 parent 1362119802880 not referenced back 0x55f4fe0f51f0
backref 1095565312 parent 857950994432 not referenced back 0x55f4fe0f55e0
backref 1095565312 parent 151504666624 not referenced back 0x55f4fe0f59a0
backref 1095565312 parent 25203179520 not referenced back 0x55f4fe0f5b20
incorrect global backref count on 1095565312 found 81 wanted 77
backpointer mismatch on [1095565312 16384]
extent item 1211379712 has multiple extent items
ref mismatch on [1211379712 32768] extent item 1, found 2
backref disk bytenr does not match extent record, bytenr=1211379712, ref bytenr=1211387904
backref bytes do not match extent backref, bytenr=1211379712, ref bytes=32768, backref bytes=77824
backpointer mismatch on [1211379712 32768]
ref mismatch on [24728535040 16384] extent item 81, found 77
backref 24728535040 parent 1362119802880 not referenced back 0x55f4fdfb6dc0
backref 24728535040 parent 857950994432 not referenced back 0x55f4fdfb71b0
backref 24728535040 parent 151504666624 not referenced back 0x55f4fdfb7570
backref 24728535040 parent 25203179520 not referenced back 0x55f4fdfb76f0
incorrect global backref count on 24728535040 found 81 wanted 77
backpointer mismatch on [24728535040 16384]
ref mismatch on [24730697728 16384] extent item 2, found 1
backref 24730697728 parent 25203179520 not referenced back 0x55f4fdfbcf30
incorrect global backref count on 24730697728 found 2 wanted 1
backpointer mismatch on [24730697728 16384]
ref mismatch on [24817123328 16384] extent item 2, found 1
backref 24817123328 parent 25203179520 not referenced back 0x55f4fd3fdce0
incorrect global backref count on 24817123328 found 2 wanted 1
backpointer mismatch on [24817123328 16384]
ref mismatch on [24920391680 16384] extent item 4, found 2
backref 24920391680 parent 25203179520 not referenced back 0x55f4fd899fe0
backref 24920391680 parent 151504666624 not referenced back 0x55f4fd899fb0
incorrect global backref count on 24920391680 found 4 wanted 2
backpointer mismatch on [24920391680 16384]
ref mismatch on [24971214848 16384] extent item 4, found 2
backref 24971214848 parent 25203179520 not referenced back 0x55f4fe128b50
backref 24971214848 parent 151504666624 not referenced back 0x55f4fe128b20
incorrect global backref count on 24971214848 found 4 wanted 2
backpointer mismatch on [24971214848 16384]
ref mismatch on [24999067648 16384] extent item 81, found 77
backref 24999067648 parent 1362119802880 not referenced back 0x55f4fe11df10
backref 24999067648 parent 857950994432 not referenced back 0x55f4fe11e300
backref 24999067648 parent 151504666624 not referenced back 0x55f4fe11e6c0
backref 24999067648 parent 25203179520 not referenced back 0x55f4fe11e840
incorrect global backref count on 24999067648 found 81 wanted 77
backpointer mismatch on [24999067648 16384]
ref mismatch on [24999133184 16384] extent item 81, found 77
backref 24999133184 parent 1362119802880 not referenced back 0x55f4fe11ef10
backref 24999133184 parent 857950994432 not referenced back 0x55f4fe11f300
backref 24999133184 parent 151504666624 not referenced back 0x55f4fe11f6c0
backref 24999133184 parent 25203179520 not referenced back 0x55f4fe11f840
incorrect global backref count on 24999133184 found 81 wanted 77
backpointer mismatch on [24999133184 16384]
ref mismatch on [24999723008 16384] extent item 81, found 77
backref 24999723008 parent 1362119802880 not referenced back 0x55f4e19e3c20
backref 24999723008 parent 857950994432 not referenced back 0x55f4fe103910
backref 24999723008 parent 151504666624 not referenced back 0x55f4fe103cd0
backref 24999723008 parent 25203179520 not referenced back 0x55f4fe103e50
incorrect global backref count on 24999723008 found 81 wanted 77
backpointer mismatch on [24999723008 16384]
ref mismatch on [25000050688 16384] extent item 81, found 77
backref 25000050688 parent 1362119802880 not referenced back 0x55f4fe1047b0
backref 25000050688 parent 857950994432 not referenced back 0x55f4fe104ba0
backref 25000050688 parent 151504666624 not referenced back 0x55f4fe104f60
backref 25000050688 parent 25203179520 not referenced back 0x55f4fe1050e0
incorrect global backref count on 25000050688 found 81 wanted 77
backpointer mismatch on [25000050688 16384]
ref mismatch on [25040961536 16384] extent item 4, found 2
backref 25040961536 parent 25203179520 not referenced back 0x55f4fe06dfd0
backref 25040961536 parent 151504666624 not referenced back 0x55f4fe06dfa0
incorrect global backref count on 25040961536 found 4 wanted 2
backpointer mismatch on [25040961536 16384]
ref mismatch on [25135185920 16384] extent item 4, found 2
backref 25135185920 parent 25203179520 not referenced back 0x55f4fdfc9e20
backref 25135185920 parent 151504666624 not referenced back 0x55f4fdfc9df0
incorrect global backref count on 25135185920 found 4 wanted 2
backpointer mismatch on [25135185920 16384]
ref mismatch on [25180618752 16384] extent item 2, found 1
backref 25180618752 parent 25203179520 not referenced back 0x55f4fd40fb50
incorrect global backref count on 25180618752 found 2 wanted 1
backpointer mismatch on [25180618752 16384]
ref mismatch on [25180979200 16384] extent item 90, found 86
backref 25180979200 parent 1362119802880 not referenced back 0x55f4fde38140
backref 25180979200 parent 151504666624 not referenced back 0x55f4fde38a40
backref 25180979200 parent 25203179520 not referenced back 0x55f4fde38bc0
backref 25180979200 parent 857950994432 not referenced back 0x55f4fde38620
incorrect global backref count on 25180979200 found 90 wanted 86
backpointer mismatch on [25180979200 16384]
ref mismatch on [25183404032 16384] extent item 90, found 86
backref 25183404032 parent 1362119802880 not referenced back 0x55f4fde3c640
backref 25183404032 parent 151504666624 not referenced back 0x55f4fde3cf40
backref 25183404032 parent 25203179520 not referenced back 0x55f4fde3d0c0
backref 25183404032 parent 857950994432 not referenced back 0x55f4fde3cb20
incorrect global backref count on 25183404032 found 90 wanted 86
backpointer mismatch on [25183404032 16384]
ref mismatch on [25200001024 16384] extent item 2, found 1
backref 25200001024 parent 25203179520 not referenced back 0x55f4fd074ed0
incorrect global backref count on 25200001024 found 2 wanted 1
backpointer mismatch on [25200001024 16384]
ref mismatch on [25200115712 16384] extent item 2, found 1
backref 25200115712 parent 25203179520 not referenced back 0x55f4fd075450
incorrect global backref count on 25200115712 found 2 wanted 1
backpointer mismatch on [25200115712 16384]
ref mismatch on [25202802688 16384] extent item 1, found 0
backref 25202802688 parent 25203179520 not referenced back 0x55f4fd07e780
incorrect global backref count on 25202802688 found 1 wanted 0
backpointer mismatch on [25202802688 16384]
owner ref check failed [25202802688 16384]
ref mismatch on [25203195904 16384] extent item 2, found 1
backref 25203195904 parent 25203179520 not referenced back 0x55f4fd07ecb0
incorrect global backref count on 25203195904 found 2 wanted 1
backpointer mismatch on [25203195904 16384]
ref mismatch on [25339101184 16384] extent item 2, found 1
backref 25339101184 parent 151504666624 not referenced back 0x55f4fdf9e7c0
incorrect global backref count on 25339101184 found 2 wanted 1
backpointer mismatch on [25339101184 16384]
ref mismatch on [25339543552 16384] extent item 1, found 0
backref 25339543552 parent 151504666624 not referenced back 0x55f4fdf9fc70
incorrect global backref count on 25339543552 found 1 wanted 0
backpointer mismatch on [25339543552 16384]
owner ref check failed [25339543552 16384]
ref mismatch on [25465585664 16384] extent item 2, found 1
backref 25465585664 parent 151504666624 not referenced back 0x55f4fe136480
incorrect global backref count on 25465585664 found 2 wanted 1
backpointer mismatch on [25465585664 16384]
ref mismatch on [25467289600 16384] extent item 81, found 77
backref 25467289600 parent 1362119802880 not referenced back 0x55f4fe13ab20
backref 25467289600 parent 857950994432 not referenced back 0x55f4fe13af10
backref 25467289600 parent 151504666624 not referenced back 0x55f4fe13b2d0
backref 25467289600 parent 25203179520 not referenced back 0x55f4fe13b450
incorrect global backref count on 25467289600 found 81 wanted 77
backpointer mismatch on [25467289600 16384]
ref mismatch on [25470533632 16384] extent item 2, found 1
backref 25470533632 parent 151504666624 not referenced back 0x55f4fd5bae90
incorrect global backref count on 25470533632 found 2 wanted 1
backpointer mismatch on [25470533632 16384]
ref mismatch on [25484345344 16384] extent item 81, found 77
backref 25484345344 parent 1362119802880 not referenced back 0x55f4fd5191a0
backref 25484345344 parent 857950994432 not referenced back 0x55f4fd519590
backref 25484345344 parent 151504666624 not referenced back 0x55f4fd519950
backref 25484345344 parent 25203179520 not referenced back 0x55f4fd519ad0
incorrect global backref count on 25484345344 found 81 wanted 77
backpointer mismatch on [25484345344 16384]
ref mismatch on [25485148160 16384] extent item 81, found 77
backref 25485148160 parent 1362119802880 not referenced back 0x55f4fd51af90
backref 25485148160 parent 857950994432 not referenced back 0x55f4fd51b380
backref 25485148160 parent 151504666624 not referenced back 0x55f4fd51b740
backref 25485148160 parent 25203179520 not referenced back 0x55f4fd51b8c0
incorrect global backref count on 25485148160 found 81 wanted 77
backpointer mismatch on [25485148160 16384]
ref mismatch on [25506004992 16384] extent item 81, found 77
backref 25506004992 parent 1362119802880 not referenced back 0x55f4fd4f8650
backref 25506004992 parent 857950994432 not referenced back 0x55f4fd4f8a40
backref 25506004992 parent 151504666624 not referenced back 0x55f4fd4f8e00
backref 25506004992 parent 25203179520 not referenced back 0x55f4fd4f8f80
incorrect global backref count on 25506004992 found 81 wanted 77
backpointer mismatch on [25506004992 16384]
ref mismatch on [25506119680 16384] extent item 81, found 77
backref 25506119680 parent 1362119802880 not referenced back 0x55f4fd4f9d90
backref 25506119680 parent 857950994432 not referenced back 0x55f4fd4fa180
backref 25506119680 parent 151504666624 not referenced back 0x55f4fd4fa540
backref 25506119680 parent 25203179520 not referenced back 0x55f4fd4fa6c0
incorrect global backref count on 25506119680 found 81 wanted 77
backpointer mismatch on [25506119680 16384]
ref mismatch on [25621725184 16384] extent item 2, found 1
backref 25621725184 parent 151504666624 not referenced back 0x55f4fdf65c60
incorrect global backref count on 25621725184 found 2 wanted 1
backpointer mismatch on [25621725184 16384]
ref mismatch on [25623871488 16384] extent item 2, found 1
backref 25623871488 parent 151504666624 not referenced back 0x55f4fdf67820
incorrect global backref count on 25623871488 found 2 wanted 1
backpointer mismatch on [25623871488 16384]
ref mismatch on [25629310976 16384] extent item 3, found 2
backref 25629310976 parent 151504666624 not referenced back 0x55f4fdf8cb40
incorrect global backref count on 25629310976 found 3 wanted 2
backpointer mismatch on [25629310976 16384]
ref mismatch on [151464689664 16384] extent item 8, found 7
backref 151464689664 parent 857950994432 not referenced back 0x55f4fde34990
incorrect global backref count on 151464689664 found 8 wanted 7
backpointer mismatch on [151464689664 16384]
ref mismatch on [151505043456 16384] extent item 2, found 1
backref 151505043456 parent 151504666624 not referenced back 0x55f4fdb5d290
incorrect global backref count on 151505043456 found 2 wanted 1
backpointer mismatch on [151505043456 16384]
ref mismatch on [151514349568 16384] extent item 2, found 1
backref 151514349568 parent 151504666624 not referenced back 0x55f4fd57c750
incorrect global backref count on 151514349568 found 2 wanted 1
backpointer mismatch on [151514349568 16384]
ref mismatch on [151578148864 16384] extent item 76, found 74
backref 151578148864 parent 1362119802880 not referenced back 0x55f4fdef5510
backref 151578148864 parent 857950994432 not referenced back 0x55f4fdef5900
incorrect global backref count on 151578148864 found 76 wanted 74
backpointer mismatch on [151578148864 16384]
ref mismatch on [151676502016 16384] extent item 90, found 86
backref 151676502016 parent 1362119802880 not referenced back 0x55f4fdec4dc0
backref 151676502016 parent 151504666624 not referenced back 0x55f4fdec56c0
backref 151676502016 parent 25203179520 not referenced back 0x55f4fdec5840
backref 151676502016 parent 857950994432 not referenced back 0x55f4fdec52a0
incorrect global backref count on 151676502016 found 90 wanted 86
backpointer mismatch on [151676502016 16384]
ref mismatch on [151826956288 16384] extent item 18, found 17
backref 151826956288 parent 1362119802880 not referenced back 0x55f4fe17b6f0
incorrect global backref count on 151826956288 found 18 wanted 17
backpointer mismatch on [151826956288 16384]
ref mismatch on [151828938752 16384] extent item 81, found 77
backref 151828938752 parent 1362119802880 not referenced back 0x55f4fe17d330
backref 151828938752 parent 857950994432 not referenced back 0x55f4fe17d720
backref 151828938752 parent 151504666624 not referenced back 0x55f4fe17dae0
backref 151828938752 parent 25203179520 not referenced back 0x55f4fe17dc60
incorrect global backref count on 151828938752 found 81 wanted 77
backpointer mismatch on [151828938752 16384]
ref mismatch on [151941709824 16384] extent item 81, found 77
backref 151941709824 parent 1362119802880 not referenced back 0x55f4fe149810
backref 151941709824 parent 857950994432 not referenced back 0x55f4fe149c00
backref 151941709824 parent 151504666624 not referenced back 0x55f4fe149fc0
backref 151941709824 parent 25203179520 not referenced back 0x55f4fe14a140
incorrect global backref count on 151941709824 found 81 wanted 77
backpointer mismatch on [151941709824 16384]
ref mismatch on [151941726208 16384] extent item 81, found 77
backref 151941726208 parent 1362119802880 not referenced back 0x55f4fe14a810
backref 151941726208 parent 857950994432 not referenced back 0x55f4fe14ac00
backref 151941726208 parent 151504666624 not referenced back 0x55f4fe14afc0
backref 151941726208 parent 25203179520 not referenced back 0x55f4fe14b140
incorrect global backref count on 151941726208 found 81 wanted 77
backpointer mismatch on [151941726208 16384]
ref mismatch on [152154619904 16384] extent item 81, found 77
backref 152154619904 parent 1362119802880 not referenced back 0x55f4fe157810
backref 152154619904 parent 857950994432 not referenced back 0x55f4fe157c00
backref 152154619904 parent 151504666624 not referenced back 0x55f4fe157fc0
backref 152154619904 parent 25203179520 not referenced back 0x55f4fe158140
incorrect global backref count on 152154619904 found 81 wanted 77
backpointer mismatch on [152154619904 16384]
ref mismatch on [152195743744 16384] extent item 6, found 5
backref 152195743744 parent 857950994432 not referenced back 0x55f4fdde35a0
incorrect global backref count on 152195743744 found 6 wanted 5
backpointer mismatch on [152195743744 16384]
ref mismatch on [152212652032 16384] extent item 7, found 6
backref 152212652032 parent 857950994432 not referenced back 0x55f4fddbe950
incorrect global backref count on 152212652032 found 7 wanted 6
backpointer mismatch on [152212652032 16384]
ref mismatch on [152212733952 16384] extent item 6, found 5
backref 152212733952 parent 857950994432 not referenced back 0x55f4fddbee30
incorrect global backref count on 152212733952 found 6 wanted 5
backpointer mismatch on [152212733952 16384]
ref mismatch on [152257658880 16384] extent item 6, found 5
backref 152257658880 parent 857950994432 not referenced back 0x55f4fdda6b20
incorrect global backref count on 152257658880 found 6 wanted 5
backpointer mismatch on [152257658880 16384]
ref mismatch on [152346525696 16384] extent item 28, found 24
backref 152346525696 parent 1362119802880 not referenced back 0x55f4fe0b8fb0
backref 152346525696 parent 857950994432 not referenced back 0x55f4fe0b90d0
backref 152346525696 parent 151504666624 not referenced back 0x55f4fe0b9250
backref 152346525696 parent 25203179520 not referenced back 0x55f4fe0b92b0
incorrect global backref count on 152346525696 found 28 wanted 24
backpointer mismatch on [152346525696 16384]
ref mismatch on [152447713280 16384] extent item 79, found 76
backref 152447713280 parent 1362119802880 not referenced back 0x55f4fe00f870
backref 152447713280 parent 857950994432 not referenced back 0x55f4fe00fc60
backref 152447713280 parent 25203179520 not referenced back 0x55f4fe010170
incorrect global backref count on 152447713280 found 79 wanted 76
backpointer mismatch on [152447713280 16384]
ref mismatch on [152447762432 16384] extent item 79, found 76
backref 152447762432 parent 1362119802880 not referenced back 0x55f4fe010910
backref 152447762432 parent 857950994432 not referenced back 0x55f4fe010d00
backref 152447762432 parent 25203179520 not referenced back 0x55f4fe011210
incorrect global backref count on 152447762432 found 79 wanted 76
backpointer mismatch on [152447762432 16384]
ref mismatch on [152447795200 16384] extent item 79, found 76
backref 152447795200 parent 1362119802880 not referenced back 0x55f4fe0118b0
backref 152447795200 parent 857950994432 not referenced back 0x55f4fe011ca0
backref 152447795200 parent 25203179520 not referenced back 0x55f4fe0121b0
incorrect global backref count on 152447795200 found 79 wanted 76
backpointer mismatch on [152447795200 16384]
ref mismatch on [345949118464 16384] extent item 88, found 84
incorrect local backref count on 345949118464 parent 1362126471168 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c21f0
backref disk bytenr does not match extent record, bytenr=345949118464, ref bytenr=0
incorrect local backref count on 345949118464 parent 795589853184 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c2af0
backref disk bytenr does not match extent record, bytenr=345949118464, ref bytenr=0
incorrect local backref count on 345949118464 parent 25339543552 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c3510
backref disk bytenr does not match extent record, bytenr=345949118464, ref bytenr=0
incorrect local backref count on 345949118464 parent 25202802688 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c35d0
backref disk bytenr does not match extent record, bytenr=345949118464, ref bytenr=0
backpointer mismatch on [345949118464 16384]
ref mismatch on [345949982720 24576] extent item 88, found 84
incorrect local backref count on 345949982720 parent 1362126471168 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c5cb0
backref disk bytenr does not match extent record, bytenr=345949982720, ref bytenr=0
incorrect local backref count on 345949982720 parent 795589853184 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c65b0
backref disk bytenr does not match extent record, bytenr=345949982720, ref bytenr=0
incorrect local backref count on 345949982720 parent 25339543552 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c6fd0
backref disk bytenr does not match extent record, bytenr=345949982720, ref bytenr=0
incorrect local backref count on 345949982720 parent 25202802688 owner 0 offset 0 found 0 wanted 1 back 0x55f4fe1c7090
backref disk bytenr does not match extent record, bytenr=345949982720, ref bytenr=0
backpointer mismatch on [345949982720 24576]
ref mismatch on [794686226432 16384] extent item 5, found 4
backref 794686226432 parent 857950994432 not referenced back 0x55f4fdd398b0
incorrect global backref count on 794686226432 found 5 wanted 4
backpointer mismatch on [794686226432 16384]
ref mismatch on [794719043584 16384] extent item 9, found 8
backref 794719043584 parent 1362119802880 not referenced back 0x55f4fd2d49c0
incorrect global backref count on 794719043584 found 9 wanted 8
backpointer mismatch on [794719043584 16384]
ref mismatch on [794773028864 16384] extent item 6, found 5
backref 794773028864 parent 857950994432 not referenced back 0x55f4fdecb7b0
incorrect global backref count on 794773028864 found 6 wanted 5
backpointer mismatch on [794773028864 16384]
ref mismatch on [794911211520 16384] extent item 5, found 4
backref 794911211520 parent 857950994432 not referenced back 0x55f4fdd142c0
incorrect global backref count on 794911211520 found 5 wanted 4
backpointer mismatch on [794911211520 16384]
ref mismatch on [794984546304 16384] extent item 4, found 3
backref 794984546304 parent 857950994432 not referenced back 0x55f4fd4c8350
incorrect global backref count on 794984546304 found 4 wanted 3
backpointer mismatch on [794984546304 16384]
ref mismatch on [795166834688 16384] extent item 4, found 3
backref 795166834688 parent 857950994432 not referenced back 0x55f4fd744640
incorrect global backref count on 795166834688 found 4 wanted 3
backpointer mismatch on [795166834688 16384]
ref mismatch on [795413626880 16384] extent item 4, found 3
backref 795413626880 parent 857950994432 not referenced back 0x55f4fdcf6e60
incorrect global backref count on 795413626880 found 4 wanted 3
backpointer mismatch on [795413626880 16384]
ref mismatch on [795421491200 16384] extent item 4, found 3
backref 795421491200 parent 857950994432 not referenced back 0x55f4fdd236c0
incorrect global backref count on 795421491200 found 4 wanted 3
backpointer mismatch on [795421491200 16384]
ref mismatch on [795588034560 16384] extent item 2, found 1
backref 795588034560 parent 857950994432 not referenced back 0x55f4fdcda190
incorrect global backref count on 795588034560 found 2 wanted 1
backpointer mismatch on [795588034560 16384]
ref mismatch on [795588198400 16384] extent item 2, found 1
backref 795588198400 parent 857950994432 not referenced back 0x55f4fdcda5e0
incorrect global backref count on 795588198400 found 2 wanted 1
backpointer mismatch on [795588198400 16384]
ref mismatch on [795589853184 16384] extent item 1, found 0
backref 795589853184 parent 857950994432 not referenced back 0x55f4fdce2600
incorrect global backref count on 795589853184 found 1 wanted 0
backpointer mismatch on [795589853184 16384]
owner ref check failed [795589853184 16384]
ref mismatch on [795627798528 16384] extent item 90, found 86
backref 795627798528 parent 1362119802880 not referenced back 0x55f4fdf50730
backref 795627798528 parent 151504666624 not referenced back 0x55f4fdf51030
backref 795627798528 parent 25203179520 not referenced back 0x55f4fdf511b0
backref 795627798528 parent 857950994432 not referenced back 0x55f4fdf50c10
incorrect global backref count on 795627798528 found 90 wanted 86
backpointer mismatch on [795627798528 16384]
ref mismatch on [795628273664 16384] extent item 75, found 71
backref 795628273664 parent 1362119802880 not referenced back 0x55f4fdf51eb0
backref 795628273664 parent 857950994432 not referenced back 0x55f4fdf522a0
backref 795628273664 parent 151504666624 not referenced back 0x55f4fdf52570
backref 795628273664 parent 25203179520 not referenced back 0x55f4fdf526c0
incorrect global backref count on 795628273664 found 75 wanted 71
backpointer mismatch on [795628273664 16384]
ref mismatch on [795670626304 16384] extent item 2, found 1
backref 795670626304 parent 857950994432 not referenced back 0x55f4fdcc9ca0
incorrect global backref count on 795670626304 found 2 wanted 1
backpointer mismatch on [795670626304 16384]
ref mismatch on [857951010816 16384] extent item 2, found 1
backref 857951010816 parent 857950994432 not referenced back 0x55f4fd5c7ec0
incorrect global backref count on 857951010816 found 2 wanted 1
backpointer mismatch on [857951010816 16384]
ref mismatch on [858355335168 16384] extent item 81, found 77
backref 858355335168 parent 1362119802880 not referenced back 0x55f4fe1ae2e0
backref 858355335168 parent 857950994432 not referenced back 0x55f4fe1ae6d0
backref 858355335168 parent 151504666624 not referenced back 0x55f4fe1aea90
backref 858355335168 parent 25203179520 not referenced back 0x55f4fe1aec10
incorrect global backref count on 858355335168 found 81 wanted 77
backpointer mismatch on [858355335168 16384]
ref mismatch on [858355613696 16384] extent item 81, found 77
backref 858355613696 parent 1362119802880 not referenced back 0x55f4fe1af2e0
backref 858355613696 parent 857950994432 not referenced back 0x55f4fe1af6d0
backref 858355613696 parent 151504666624 not referenced back 0x55f4fe1afa90
backref 858355613696 parent 25203179520 not referenced back 0x55f4fe1afc10
incorrect global backref count on 858355613696 found 81 wanted 77
backpointer mismatch on [858355613696 16384]
ref mismatch on [858756431872 16384] extent item 90, found 86
backref 858756431872 parent 1362119802880 not referenced back 0x55f4fdf1f770
backref 858756431872 parent 151504666624 not referenced back 0x55f4fdf20070
backref 858756431872 parent 25203179520 not referenced back 0x55f4fdf201f0
backref 858756431872 parent 857950994432 not referenced back 0x55f4fdf1fc50
incorrect global backref count on 858756431872 found 90 wanted 86
backpointer mismatch on [858756431872 16384]
ref mismatch on [858758594560 16384] extent item 90, found 86
backref 858758594560 parent 1362119802880 not referenced back 0x55f4fdf24c00
backref 858758594560 parent 151504666624 not referenced back 0x55f4fdf25500
backref 858758594560 parent 25203179520 not referenced back 0x55f4fdf25680
backref 858758594560 parent 857950994432 not referenced back 0x55f4fdf250e0
incorrect global backref count on 858758594560 found 90 wanted 86
backpointer mismatch on [858758594560 16384]
ref mismatch on [858758627328 16384] extent item 90, found 86
backref 858758627328 parent 1362119802880 not referenced back 0x55f4fdf25db0
backref 858758627328 parent 151504666624 not referenced back 0x55f4fdf266b0
backref 858758627328 parent 25203179520 not referenced back 0x55f4fdf26830
backref 858758627328 parent 857950994432 not referenced back 0x55f4fdf26290
incorrect global backref count on 858758627328 found 90 wanted 86
backpointer mismatch on [858758627328 16384]
ref mismatch on [858758742016 16384] extent item 90, found 86
backref 858758742016 parent 1362119802880 not referenced back 0x55f4fdf273d0
backref 858758742016 parent 151504666624 not referenced back 0x55f4fdf27cd0
backref 858758742016 parent 25203179520 not referenced back 0x55f4fdf27e50
backref 858758742016 parent 857950994432 not referenced back 0x55f4fdf278b0
incorrect global backref count on 858758742016 found 90 wanted 86
backpointer mismatch on [858758742016 16384]
ref mismatch on [858797621248 16384] extent item 90, found 86
backref 858797621248 parent 1362119802880 not referenced back 0x55f4fddeabf0
backref 858797621248 parent 151504666624 not referenced back 0x55f4fddeb4f0
backref 858797621248 parent 25203179520 not referenced back 0x55f4fddeb670
backref 858797621248 parent 857950994432 not referenced back 0x55f4fddeb0d0
incorrect global backref count on 858797621248 found 90 wanted 86
backpointer mismatch on [858797621248 16384]
ref mismatch on [858797670400 16384] extent item 90, found 86
backref 858797670400 parent 1362119802880 not referenced back 0x55f4fddebea0
backref 858797670400 parent 151504666624 not referenced back 0x55f4fddec7a0
backref 858797670400 parent 25203179520 not referenced back 0x55f4fddec920
backref 858797670400 parent 857950994432 not referenced back 0x55f4fddec380
incorrect global backref count on 858797670400 found 90 wanted 86
backpointer mismatch on [858797670400 16384]
ref mismatch on [858801111040 16384] extent item 90, found 86
backref 858801111040 parent 1362119802880 not referenced back 0x55f4fddf5fb0
backref 858801111040 parent 151504666624 not referenced back 0x55f4fddf68b0
backref 858801111040 parent 25203179520 not referenced back 0x55f4fddf6a30
backref 858801111040 parent 857950994432 not referenced back 0x55f4fddf6490
incorrect global backref count on 858801111040 found 90 wanted 86
backpointer mismatch on [858801111040 16384]
ref mismatch on [858833993728 16384] extent item 90, found 86
backref 858833993728 parent 1362119802880 not referenced back 0x55f4fdd69020
backref 858833993728 parent 151504666624 not referenced back 0x55f4fdd69920
backref 858833993728 parent 25203179520 not referenced back 0x55f4fdd69aa0
backref 858833993728 parent 857950994432 not referenced back 0x55f4fdd69500
incorrect global backref count on 858833993728 found 90 wanted 86
backpointer mismatch on [858833993728 16384]
ref mismatch on [858834059264 16384] extent item 90, found 86
backref 858834059264 parent 1362119802880 not referenced back 0x55f4fdd7a620
backref 858834059264 parent 151504666624 not referenced back 0x55f4fdd7af20
backref 858834059264 parent 25203179520 not referenced back 0x55f4fdd7b0a0
backref 858834059264 parent 857950994432 not referenced back 0x55f4fdd7ab00
incorrect global backref count on 858834059264 found 90 wanted 86
backpointer mismatch on [858834059264 16384]
ref mismatch on [858834092032 16384] extent item 90, found 86
backref 858834092032 parent 1362119802880 not referenced back 0x55f4fdd7b7d0
backref 858834092032 parent 151504666624 not referenced back 0x55f4fdd7c0d0
backref 858834092032 parent 25203179520 not referenced back 0x55f4fdd7c250
backref 858834092032 parent 857950994432 not referenced back 0x55f4fdd7bcb0
incorrect global backref count on 858834092032 found 90 wanted 86
backpointer mismatch on [858834092032 16384]
ref mismatch on [858845593600 16384] extent item 90, found 86
backref 858845593600 parent 1362119802880 not referenced back 0x55f4fdedece0
backref 858845593600 parent 151504666624 not referenced back 0x55f4fdedf5e0
backref 858845593600 parent 25203179520 not referenced back 0x55f4fdedf760
backref 858845593600 parent 857950994432 not referenced back 0x55f4fdedf1c0
incorrect global backref count on 858845593600 found 90 wanted 86
backpointer mismatch on [858845593600 16384]
ref mismatch on [858845642752 16384] extent item 90, found 86
backref 858845642752 parent 1362119802880 not referenced back 0x55f4fdedfe90
backref 858845642752 parent 151504666624 not referenced back 0x55f4fdee0790
backref 858845642752 parent 25203179520 not referenced back 0x55f4fdee0910
backref 858845642752 parent 857950994432 not referenced back 0x55f4fdee0370
incorrect global backref count on 858845642752 found 90 wanted 86
backpointer mismatch on [858845642752 16384]
ref mismatch on [858845675520 16384] extent item 90, found 86
backref 858845675520 parent 1362119802880 not referenced back 0x55f4e1abea10
backref 858845675520 parent 151504666624 not referenced back 0x55f4fdee1790
backref 858845675520 parent 25203179520 not referenced back 0x55f4fdee1910
backref 858845675520 parent 857950994432 not referenced back 0x55f4fdee1370
incorrect global backref count on 858845675520 found 90 wanted 86
backpointer mismatch on [858845675520 16384]
ref mismatch on [858858635264 16384] extent item 90, found 86
backref 858858635264 parent 1362119802880 not referenced back 0x55f4fdf11100
backref 858858635264 parent 151504666624 not referenced back 0x55f4fdf11a00
backref 858858635264 parent 25203179520 not referenced back 0x55f4fdf11b80
backref 858858635264 parent 857950994432 not referenced back 0x55f4fdf115e0
incorrect global backref count on 858858635264 found 90 wanted 86
backpointer mismatch on [858858635264 16384]
ref mismatch on [858859995136 16384] extent item 90, found 86
backref 858859995136 parent 1362119802880 not referenced back 0x55f4fdf12fb0
backref 858859995136 parent 151504666624 not referenced back 0x55f4fdf138b0
backref 858859995136 parent 25203179520 not referenced back 0x55f4fdf13a30
backref 858859995136 parent 857950994432 not referenced back 0x55f4fdf13490
incorrect global backref count on 858859995136 found 90 wanted 86
backpointer mismatch on [858859995136 16384]
ref mismatch on [858877296640 16384] extent item 90, found 86
backref 858877296640 parent 1362119802880 not referenced back 0x55f4fdea8250
backref 858877296640 parent 151504666624 not referenced back 0x55f4fdea8b50
backref 858877296640 parent 25203179520 not referenced back 0x55f4fdea8cd0
backref 858877296640 parent 857950994432 not referenced back 0x55f4fdea8730
incorrect global backref count on 858877296640 found 90 wanted 86
backpointer mismatch on [858877296640 16384]
ref mismatch on [858877362176 16384] extent item 90, found 86
backref 858877362176 parent 1362119802880 not referenced back 0x55f4fdea9500
backref 858877362176 parent 151504666624 not referenced back 0x55f4fdea9e00
backref 858877362176 parent 25203179520 not referenced back 0x55f4fdea9f80
backref 858877362176 parent 857950994432 not referenced back 0x55f4fdea99e0
incorrect global backref count on 858877362176 found 90 wanted 86
backpointer mismatch on [858877362176 16384]
ref mismatch on [858877526016 16384] extent item 90, found 86
backref 858877526016 parent 1362119802880 not referenced back 0x55f4fdeaa9b0
backref 858877526016 parent 151504666624 not referenced back 0x55f4fdeab2b0
backref 858877526016 parent 25203179520 not referenced back 0x55f4fdeab430
backref 858877526016 parent 857950994432 not referenced back 0x55f4fdeaae90
incorrect global backref count on 858877526016 found 90 wanted 86
backpointer mismatch on [858877526016 16384]
ref mismatch on [858877820928 16384] extent item 90, found 86
backref 858877820928 parent 1362119802880 not referenced back 0x55f4fdeabd60
backref 858877820928 parent 151504666624 not referenced back 0x55f4fdeac660
backref 858877820928 parent 25203179520 not referenced back 0x55f4fdeac7e0
backref 858877820928 parent 857950994432 not referenced back 0x55f4fdeac240
incorrect global backref count on 858877820928 found 90 wanted 86
backpointer mismatch on [858877820928 16384]
ref mismatch on [858885324800 16384] extent item 90, found 86
backref 858885324800 parent 1362119802880 not referenced back 0x55f4fded60f0
backref 858885324800 parent 151504666624 not referenced back 0x55f4fded69f0
backref 858885324800 parent 25203179520 not referenced back 0x55f4fded6b70
backref 858885324800 parent 857950994432 not referenced back 0x55f4fded65d0
incorrect global backref count on 858885324800 found 90 wanted 86
backpointer mismatch on [858885324800 16384]
ref mismatch on [858911293440 16384] extent item 90, found 86
backref 858911293440 parent 1362119802880 not referenced back 0x55f4fdf59870
backref 858911293440 parent 151504666624 not referenced back 0x55f4fdf5a170
backref 858911293440 parent 25203179520 not referenced back 0x55f4fdf5a2f0
backref 858911293440 parent 857950994432 not referenced back 0x55f4fdf59d50
incorrect global backref count on 858911293440 found 90 wanted 86
backpointer mismatch on [858911293440 16384]
ref mismatch on [858963935232 16384] extent item 90, found 86
backref 858963935232 parent 1362119802880 not referenced back 0x55f4fddc3a80
backref 858963935232 parent 151504666624 not referenced back 0x55f4fddc4380
backref 858963935232 parent 25203179520 not referenced back 0x55f4fddc4500
backref 858963935232 parent 857950994432 not referenced back 0x55f4fddc3f60
incorrect global backref count on 858963935232 found 90 wanted 86
backpointer mismatch on [858963935232 16384]
ref mismatch on [858964017152 16384] extent item 90, found 86
backref 858964017152 parent 1362119802880 not referenced back 0x55f4fddc4d30
backref 858964017152 parent 151504666624 not referenced back 0x55f4fddc5630
backref 858964017152 parent 25203179520 not referenced back 0x55f4fddc57b0
backref 858964017152 parent 857950994432 not referenced back 0x55f4fddc5210
incorrect global backref count on 858964017152 found 90 wanted 86
backpointer mismatch on [858964017152 16384]
ref mismatch on [858964115456 16384] extent item 90, found 86
backref 858964115456 parent 1362119802880 not referenced back 0x55f4fddc5fe0
backref 858964115456 parent 151504666624 not referenced back 0x55f4fddc68e0
backref 858964115456 parent 25203179520 not referenced back 0x55f4fddc6a60
backref 858964115456 parent 857950994432 not referenced back 0x55f4fddc64c0
incorrect global backref count on 858964115456 found 90 wanted 86
backpointer mismatch on [858964115456 16384]
ref mismatch on [858964213760 16384] extent item 90, found 86
backref 858964213760 parent 1362119802880 not referenced back 0x55f4fddc7490
backref 858964213760 parent 151504666624 not referenced back 0x55f4fddc7d90
backref 858964213760 parent 25203179520 not referenced back 0x55f4fddc7f10
backref 858964213760 parent 857950994432 not referenced back 0x55f4fddc7970
incorrect global backref count on 858964213760 found 90 wanted 86
backpointer mismatch on [858964213760 16384]
ref mismatch on [858964262912 16384] extent item 90, found 86
backref 858964262912 parent 1362119802880 not referenced back 0x55f4fddc8640
backref 858964262912 parent 151504666624 not referenced back 0x55f4fddc8f40
backref 858964262912 parent 25203179520 not referenced back 0x55f4fddc90c0
backref 858964262912 parent 857950994432 not referenced back 0x55f4fddc8b20
incorrect global backref count on 858964262912 found 90 wanted 86
backpointer mismatch on [858964262912 16384]
ref mismatch on [858964639744 16384] extent item 90, found 86
backref 858964639744 parent 1362119802880 not referenced back 0x55f4fddc9ef0
backref 858964639744 parent 151504666624 not referenced back 0x55f4fddca7f0
backref 858964639744 parent 25203179520 not referenced back 0x55f4fddca970
backref 858964639744 parent 857950994432 not referenced back 0x55f4fddca3d0
incorrect global backref count on 858964639744 found 90 wanted 86
backpointer mismatch on [858964639744 16384]
ref mismatch on [858964918272 16384] extent item 90, found 86
backref 858964918272 parent 1362119802880 not referenced back 0x55f4fddcb4a0
backref 858964918272 parent 151504666624 not referenced back 0x55f4fddcbda0
backref 858964918272 parent 25203179520 not referenced back 0x55f4fddcbf20
backref 858964918272 parent 857950994432 not referenced back 0x55f4fddcb980
incorrect global backref count on 858964918272 found 90 wanted 86
backpointer mismatch on [858964918272 16384]
ref mismatch on [858964951040 16384] extent item 90, found 86
backref 858964951040 parent 1362119802880 not referenced back 0x55f4fddcc650
backref 858964951040 parent 151504666624 not referenced back 0x55f4fddccf50
backref 858964951040 parent 25203179520 not referenced back 0x55f4fddcd0d0
backref 858964951040 parent 857950994432 not referenced back 0x55f4fddccb30
incorrect global backref count on 858964951040 found 90 wanted 86
backpointer mismatch on [858964951040 16384]
ref mismatch on [858976796672 16384] extent item 90, found 86
backref 858976796672 parent 1362119802880 not referenced back 0x55f4fdd8ed50
backref 858976796672 parent 151504666624 not referenced back 0x55f4fdd8f650
backref 858976796672 parent 25203179520 not referenced back 0x55f4fdd8f7d0
backref 858976796672 parent 857950994432 not referenced back 0x55f4fdd8f230
incorrect global backref count on 858976796672 found 90 wanted 86
backpointer mismatch on [858976796672 16384]
ref mismatch on [858976829440 16384] extent item 90, found 86
backref 858976829440 parent 1362119802880 not referenced back 0x55f4fdd8ff00
backref 858976829440 parent 151504666624 not referenced back 0x55f4fdd90800
backref 858976829440 parent 25203179520 not referenced back 0x55f4fdd90980
backref 858976829440 parent 857950994432 not referenced back 0x55f4fdd903e0
incorrect global backref count on 858976829440 found 90 wanted 86
backpointer mismatch on [858976829440 16384]
ref mismatch on [858997686272 16384] extent item 6, found 5
backref 858997686272 parent 1362119802880 not referenced back 0x55f4fd352790
incorrect global backref count on 858997686272 found 6 wanted 5
backpointer mismatch on [858997686272 16384]
ref mismatch on [859017707520 16384] extent item 90, found 86
backref 859017707520 parent 1362119802880 not referenced back 0x55f4fddd1be0
backref 859017707520 parent 151504666624 not referenced back 0x55f4fddd24e0
backref 859017707520 parent 25203179520 not referenced back 0x55f4fddd2660
backref 859017707520 parent 857950994432 not referenced back 0x55f4fddd20c0
incorrect global backref count on 859017707520 found 90 wanted 86
backpointer mismatch on [859017707520 16384]
ref mismatch on [859017723904 16384] extent item 90, found 86
backref 859017723904 parent 1362119802880 not referenced back 0x55f4fddd2d90
backref 859017723904 parent 151504666624 not referenced back 0x55f4fddd3690
backref 859017723904 parent 25203179520 not referenced back 0x55f4fddd3810
backref 859017723904 parent 857950994432 not referenced back 0x55f4fddd3270
incorrect global backref count on 859017723904 found 90 wanted 86
backpointer mismatch on [859017723904 16384]
ref mismatch on [859017805824 16384] extent item 90, found 86
backref 859017805824 parent 1362119802880 not referenced back 0x55f4fddd44e0
backref 859017805824 parent 151504666624 not referenced back 0x55f4fddd4de0
backref 859017805824 parent 25203179520 not referenced back 0x55f4fddd4f60
backref 859017805824 parent 857950994432 not referenced back 0x55f4fddd49c0
incorrect global backref count on 859017805824 found 90 wanted 86
backpointer mismatch on [859017805824 16384]
ref mismatch on [859023310848 16384] extent item 90, found 86
backref 859023310848 parent 1362119802880 not referenced back 0x55f4e1a93af0
backref 859023310848 parent 151504666624 not referenced back 0x55f4e1a94870
backref 859023310848 parent 25203179520 not referenced back 0x55f4e1a955f0
backref 859023310848 parent 857950994432 not referenced back 0x55f4e1a93fd0
incorrect global backref count on 859023310848 found 90 wanted 86
backpointer mismatch on [859023310848 16384]
ref mismatch on [899826483200 16384] extent item 90, found 86
backref 899826483200 parent 1362119802880 not referenced back 0x55f4fde9d940
backref 899826483200 parent 151504666624 not referenced back 0x55f4fde9e240
backref 899826483200 parent 25203179520 not referenced back 0x55f4fde9e3c0
backref 899826483200 parent 857950994432 not referenced back 0x55f4fde9de20
incorrect global backref count on 899826483200 found 90 wanted 86
backpointer mismatch on [899826483200 16384]
ref mismatch on [899826499584 16384] extent item 90, found 86
backref 899826499584 parent 1362119802880 not referenced back 0x55f4fde9eaf0
backref 899826499584 parent 151504666624 not referenced back 0x55f4fde9f300
backref 899826499584 parent 25203179520 not referenced back 0x55f4fde9f480
backref 899826499584 parent 857950994432 not referenced back 0x55f4e1a64d80
incorrect global backref count on 899826499584 found 90 wanted 86
backpointer mismatch on [899826499584 16384]
ref mismatch on [899826614272 16384] extent item 90, found 86
backref 899826614272 parent 1362119802880 not referenced back 0x55f4fde9fcb0
backref 899826614272 parent 151504666624 not referenced back 0x55f4fdea05b0
backref 899826614272 parent 25203179520 not referenced back 0x55f4fdea0730
backref 899826614272 parent 857950994432 not referenced back 0x55f4fdea0190
incorrect global backref count on 899826614272 found 90 wanted 86
backpointer mismatch on [899826614272 16384]
ref mismatch on [899826630656 16384] extent item 90, found 86
backref 899826630656 parent 1362119802880 not referenced back 0x55f4fdea0e60
backref 899826630656 parent 151504666624 not referenced back 0x55f4fdea1760
backref 899826630656 parent 25203179520 not referenced back 0x55f4fdea18e0
backref 899826630656 parent 857950994432 not referenced back 0x55f4fdea1340
incorrect global backref count on 899826630656 found 90 wanted 86
backpointer mismatch on [899826630656 16384]
ref mismatch on [899826647040 16384] extent item 90, found 86
backref 899826647040 parent 1362119802880 not referenced back 0x55f4fdea2010
backref 899826647040 parent 151504666624 not referenced back 0x55f4fdea2910
backref 899826647040 parent 25203179520 not referenced back 0x55f4fdea2a90
backref 899826647040 parent 857950994432 not referenced back 0x55f4fdea24f0
incorrect global backref count on 899826647040 found 90 wanted 86
backpointer mismatch on [899826647040 16384]
ref mismatch on [899826941952 16384] extent item 90, found 86
backref 899826941952 parent 1362119802880 not referenced back 0x55f4fdea4870
backref 899826941952 parent 151504666624 not referenced back 0x55f4fdea5170
backref 899826941952 parent 25203179520 not referenced back 0x55f4fdea52f0
backref 899826941952 parent 857950994432 not referenced back 0x55f4fdea4d50
incorrect global backref count on 899826941952 found 90 wanted 86
backpointer mismatch on [899826941952 16384]
ref mismatch on [899826958336 16384] extent item 90, found 86
backref 899826958336 parent 1362119802880 not referenced back 0x55f4fdea5a20
backref 899826958336 parent 151504666624 not referenced back 0x55f4fdea6320
backref 899826958336 parent 25203179520 not referenced back 0x55f4fdea64a0
backref 899826958336 parent 857950994432 not referenced back 0x55f4fdea5f00
incorrect global backref count on 899826958336 found 90 wanted 86
backpointer mismatch on [899826958336 16384]
ref mismatch on [899852025856 16384] extent item 90, found 86
backref 899852025856 parent 1362119802880 not referenced back 0x55f4fdebb3a0
backref 899852025856 parent 151504666624 not referenced back 0x55f4fdebbca0
backref 899852025856 parent 25203179520 not referenced back 0x55f4fdebbe20
backref 899852025856 parent 857950994432 not referenced back 0x55f4fdebb880
incorrect global backref count on 899852025856 found 90 wanted 86
backpointer mismatch on [899852025856 16384]
ref mismatch on [899852042240 16384] extent item 90, found 86
backref 899852042240 parent 1362119802880 not referenced back 0x55f4fdebc550
backref 899852042240 parent 151504666624 not referenced back 0x55f4fdebce50
backref 899852042240 parent 25203179520 not referenced back 0x55f4fdebcfd0
backref 899852042240 parent 857950994432 not referenced back 0x55f4fdebca30
incorrect global backref count on 899852042240 found 90 wanted 86
backpointer mismatch on [899852042240 16384]
ref mismatch on [899852058624 16384] extent item 90, found 86
backref 899852058624 parent 1362119802880 not referenced back 0x55f4fdebd700
backref 899852058624 parent 151504666624 not referenced back 0x55f4fdebe000
backref 899852058624 parent 25203179520 not referenced back 0x55f4fdebe180
backref 899852058624 parent 857950994432 not referenced back 0x55f4fdebdbe0
incorrect global backref count on 899852058624 found 90 wanted 86
backpointer mismatch on [899852058624 16384]
ref mismatch on [899871129600 16384] extent item 90, found 86
backref 899871129600 parent 1362119802880 not referenced back 0x55f4fdd94970
backref 899871129600 parent 151504666624 not referenced back 0x55f4fdd95270
backref 899871129600 parent 25203179520 not referenced back 0x55f4fdd953f0
backref 899871129600 parent 857950994432 not referenced back 0x55f4fdd94e50
incorrect global backref count on 899871129600 found 90 wanted 86
backpointer mismatch on [899871129600 16384]
ref mismatch on [899871358976 16384] extent item 90, found 86
backref 899871358976 parent 1362119802880 not referenced back 0x55f4fdd96420
backref 899871358976 parent 151504666624 not referenced back 0x55f4fdd96d20
backref 899871358976 parent 25203179520 not referenced back 0x55f4fdd96ea0
backref 899871358976 parent 857950994432 not referenced back 0x55f4fdd96900
incorrect global backref count on 899871358976 found 90 wanted 86
backpointer mismatch on [899871358976 16384]
ref mismatch on [899918708736 16384] extent item 90, found 86
backref 899918708736 parent 1362119802880 not referenced back 0x55f4fde686e0
backref 899918708736 parent 151504666624 not referenced back 0x55f4fde68fe0
backref 899918708736 parent 25203179520 not referenced back 0x55f4fde69160
backref 899918708736 parent 857950994432 not referenced back 0x55f4fde68bc0
incorrect global backref count on 899918708736 found 90 wanted 86
backpointer mismatch on [899918708736 16384]
ref mismatch on [899918725120 16384] extent item 90, found 86
backref 899918725120 parent 1362119802880 not referenced back 0x55f4fde69890
backref 899918725120 parent 151504666624 not referenced back 0x55f4fde6a190
backref 899918725120 parent 25203179520 not referenced back 0x55f4fde6a310
backref 899918725120 parent 857950994432 not referenced back 0x55f4fde69d70
incorrect global backref count on 899918725120 found 90 wanted 86
backpointer mismatch on [899918725120 16384]
ref mismatch on [899918790656 16384] extent item 90, found 86
backref 899918790656 parent 1362119802880 not referenced back 0x55f4fde6aa40
backref 899918790656 parent 151504666624 not referenced back 0x55f4fde6b340
backref 899918790656 parent 25203179520 not referenced back 0x55f4fde6b4c0
backref 899918790656 parent 857950994432 not referenced back 0x55f4fde6af20
incorrect global backref count on 899918790656 found 90 wanted 86
backpointer mismatch on [899918790656 16384]
ref mismatch on [899918921728 16384] extent item 90, found 86
backref 899918921728 parent 1362119802880 not referenced back 0x55f4fde6bdb0
backref 899918921728 parent 151504666624 not referenced back 0x55f4fde6c6b0
backref 899918921728 parent 25203179520 not referenced back 0x55f4fde6c830
backref 899918921728 parent 857950994432 not referenced back 0x55f4fde6c290
incorrect global backref count on 899918921728 found 90 wanted 86
backpointer mismatch on [899918921728 16384]
ref mismatch on [899918954496 16384] extent item 90, found 86
backref 899918954496 parent 1362119802880 not referenced back 0x55f4fde6cf60
backref 899918954496 parent 151504666624 not referenced back 0x55f4fde6d860
backref 899918954496 parent 25203179520 not referenced back 0x55f4fde6d9e0
backref 899918954496 parent 857950994432 not referenced back 0x55f4fde6d440
incorrect global backref count on 899918954496 found 90 wanted 86
backpointer mismatch on [899918954496 16384]
ref mismatch on [899918987264 16384] extent item 90, found 86
backref 899918987264 parent 1362119802880 not referenced back 0x55f4fde6e110
backref 899918987264 parent 151504666624 not referenced back 0x55f4fde6ea10
backref 899918987264 parent 25203179520 not referenced back 0x55f4fde6eb90
backref 899918987264 parent 857950994432 not referenced back 0x55f4fde6e5f0
incorrect global backref count on 899918987264 found 90 wanted 86
backpointer mismatch on [899918987264 16384]
ref mismatch on [899919020032 16384] extent item 90, found 86
backref 899919020032 parent 1362119802880 not referenced back 0x55f4fde6f2c0
backref 899919020032 parent 151504666624 not referenced back 0x55f4fde6fbc0
backref 899919020032 parent 25203179520 not referenced back 0x55f4fde6fd40
backref 899919020032 parent 857950994432 not referenced back 0x55f4fde6f7a0
incorrect global backref count on 899919020032 found 90 wanted 86
backpointer mismatch on [899919020032 16384]
ref mismatch on [899919052800 16384] extent item 90, found 86
backref 899919052800 parent 1362119802880 not referenced back 0x55f4fde70470
backref 899919052800 parent 151504666624 not referenced back 0x55f4fde70d70
backref 899919052800 parent 25203179520 not referenced back 0x55f4fde70ef0
backref 899919052800 parent 857950994432 not referenced back 0x55f4fde70950
incorrect global backref count on 899919052800 found 90 wanted 86
backpointer mismatch on [899919052800 16384]
ref mismatch on [899919101952 16384] extent item 90, found 86
backref 899919101952 parent 1362119802880 not referenced back 0x55f4fde71720
backref 899919101952 parent 151504666624 not referenced back 0x55f4fde72020
backref 899919101952 parent 25203179520 not referenced back 0x55f4fde721a0
backref 899919101952 parent 857950994432 not referenced back 0x55f4fde71c00
incorrect global backref count on 899919101952 found 90 wanted 86
backpointer mismatch on [899919101952 16384]
ref mismatch on [899919249408 16384] extent item 90, found 86
backref 899919249408 parent 1362119802880 not referenced back 0x55f4fde72cf0
backref 899919249408 parent 151504666624 not referenced back 0x55f4fde735f0
backref 899919249408 parent 25203179520 not referenced back 0x55f4fde73770
backref 899919249408 parent 857950994432 not referenced back 0x55f4fde731d0
incorrect global backref count on 899919249408 found 90 wanted 86
backpointer mismatch on [899919249408 16384]
ref mismatch on [899935666176 16384] extent item 90, found 86
backref 899935666176 parent 1362119802880 not referenced back 0x55f4fdd2c760
backref 899935666176 parent 151504666624 not referenced back 0x55f4fdd2d060
backref 899935666176 parent 25203179520 not referenced back 0x55f4fdd2d1e0
backref 899935666176 parent 857950994432 not referenced back 0x55f4fdd2cc40
incorrect global backref count on 899935666176 found 90 wanted 86
backpointer mismatch on [899935666176 16384]
ref mismatch on [900010393600 16384] extent item 90, found 86
backref 900010393600 parent 1362119802880 not referenced back 0x55f4fddfdd60
backref 900010393600 parent 151504666624 not referenced back 0x55f4fddfe660
backref 900010393600 parent 25203179520 not referenced back 0x55f4fddfe7e0
backref 900010393600 parent 857950994432 not referenced back 0x55f4fddfe240
incorrect global backref count on 900010393600 found 90 wanted 86
backpointer mismatch on [900010393600 16384]
ref mismatch on [900010426368 16384] extent item 90, found 86
backref 900010426368 parent 1362119802880 not referenced back 0x55f4fddff010
backref 900010426368 parent 151504666624 not referenced back 0x55f4fddff910
backref 900010426368 parent 25203179520 not referenced back 0x55f4fddffa90
backref 900010426368 parent 857950994432 not referenced back 0x55f4fddff4f0
incorrect global backref count on 900010426368 found 90 wanted 86
backpointer mismatch on [900010426368 16384]
ref mismatch on [900010459136 16384] extent item 90, found 86
backref 900010459136 parent 1362119802880 not referenced back 0x55f4fde001c0
backref 900010459136 parent 151504666624 not referenced back 0x55f4fde00ac0
backref 900010459136 parent 25203179520 not referenced back 0x55f4fde00c40
backref 900010459136 parent 857950994432 not referenced back 0x55f4fde006a0
incorrect global backref count on 900010459136 found 90 wanted 86
backpointer mismatch on [900010459136 16384]
ref mismatch on [900010491904 16384] extent item 90, found 86
backref 900010491904 parent 1362119802880 not referenced back 0x55f4fde01470
backref 900010491904 parent 151504666624 not referenced back 0x55f4fde01d70
backref 900010491904 parent 25203179520 not referenced back 0x55f4fde01ef0
backref 900010491904 parent 857950994432 not referenced back 0x55f4fde01950
incorrect global backref count on 900010491904 found 90 wanted 86
backpointer mismatch on [900010491904 16384]
ref mismatch on [900010508288 16384] extent item 90, found 86
backref 900010508288 parent 1362119802880 not referenced back 0x55f4fde02620
backref 900010508288 parent 151504666624 not referenced back 0x55f4fde02f20
backref 900010508288 parent 25203179520 not referenced back 0x55f4fde030a0
backref 900010508288 parent 857950994432 not referenced back 0x55f4fde02b00
incorrect global backref count on 900010508288 found 90 wanted 86
backpointer mismatch on [900010508288 16384]
ref mismatch on [900221550592 16384] extent item 77, found 75
backref 900221550592 parent 1362119802880 not referenced back 0x55f4fdb14d00
backref 900221550592 parent 857950994432 not referenced back 0x55f4fdb150f0
incorrect global backref count on 900221550592 found 77 wanted 75
backpointer mismatch on [900221550592 16384]
ref mismatch on [900221566976 16384] extent item 81, found 77
backref 900221566976 parent 1362119802880 not referenced back 0x55f4fdb15ca0
backref 900221566976 parent 857950994432 not referenced back 0x55f4fdb16090
backref 900221566976 parent 151504666624 not referenced back 0x55f4fdb16450
backref 900221566976 parent 25203179520 not referenced back 0x55f4fdb165d0
incorrect global backref count on 900221566976 found 81 wanted 77
backpointer mismatch on [900221566976 16384]
ref mismatch on [900221681664 16384] extent item 81, found 77
backref 900221681664 parent 1362119802880 not referenced back 0x55f4fdb17780
backref 900221681664 parent 857950994432 not referenced back 0x55f4fdb17b70
backref 900221681664 parent 151504666624 not referenced back 0x55f4fdb17f30
backref 900221681664 parent 25203179520 not referenced back 0x55f4fdb180b0
incorrect global backref count on 900221681664 found 81 wanted 77
backpointer mismatch on [900221681664 16384]
ref mismatch on [900221698048 16384] extent item 81, found 77
backref 900221698048 parent 1362119802880 not referenced back 0x55f4fdb18780
backref 900221698048 parent 857950994432 not referenced back 0x55f4fdb18b70
backref 900221698048 parent 151504666624 not referenced back 0x55f4fdb18f30
backref 900221698048 parent 25203179520 not referenced back 0x55f4fdb190b0
incorrect global backref count on 900221698048 found 81 wanted 77
backpointer mismatch on [900221698048 16384]
ref mismatch on [900221714432 16384] extent item 81, found 77
backref 900221714432 parent 1362119802880 not referenced back 0x55f4fdb19780
backref 900221714432 parent 857950994432 not referenced back 0x55f4fdb19b70
backref 900221714432 parent 151504666624 not referenced back 0x55f4fdb19f30
backref 900221714432 parent 25203179520 not referenced back 0x55f4fdb1a0b0
incorrect global backref count on 900221714432 found 81 wanted 77
backpointer mismatch on [900221714432 16384]
ref mismatch on [900221747200 16384] extent item 81, found 77
backref 900221747200 parent 1362119802880 not referenced back 0x55f4fdb1a780
backref 900221747200 parent 857950994432 not referenced back 0x55f4fdb1ab70
backref 900221747200 parent 151504666624 not referenced back 0x55f4fdb1af30
backref 900221747200 parent 25203179520 not referenced back 0x55f4fdb1b0b0
incorrect global backref count on 900221747200 found 81 wanted 77
backpointer mismatch on [900221747200 16384]
ref mismatch on [900221763584 16384] extent item 81, found 77
backref 900221763584 parent 1362119802880 not referenced back 0x55f4fdb1b780
backref 900221763584 parent 857950994432 not referenced back 0x55f4fdb1bb70
backref 900221763584 parent 151504666624 not referenced back 0x55f4fdb1bf30
backref 900221763584 parent 25203179520 not referenced back 0x55f4fdb1c0b0
incorrect global backref count on 900221763584 found 81 wanted 77
backpointer mismatch on [900221763584 16384]
ref mismatch on [900221779968 16384] extent item 81, found 77
backref 900221779968 parent 1362119802880 not referenced back 0x55f4fe109710
backref 900221779968 parent 857950994432 not referenced back 0x55f4fe109b00
backref 900221779968 parent 151504666624 not referenced back 0x55f4fe109ec0
backref 900221779968 parent 25203179520 not referenced back 0x55f4fe10a040
incorrect global backref count on 900221779968 found 81 wanted 77
backpointer mismatch on [900221779968 16384]
ref mismatch on [900221796352 16384] extent item 81, found 77
backref 900221796352 parent 1362119802880 not referenced back 0x55f4fe10a710
backref 900221796352 parent 857950994432 not referenced back 0x55f4fe10ab00
backref 900221796352 parent 151504666624 not referenced back 0x55f4fe10aec0
backref 900221796352 parent 25203179520 not referenced back 0x55f4fe10b040
incorrect global backref count on 900221796352 found 81 wanted 77
backpointer mismatch on [900221796352 16384]
ref mismatch on [900221812736 16384] extent item 81, found 77
backref 900221812736 parent 1362119802880 not referenced back 0x55f4fe10b710
backref 900221812736 parent 857950994432 not referenced back 0x55f4fe10bb00
backref 900221812736 parent 151504666624 not referenced back 0x55f4fe10bec0
backref 900221812736 parent 25203179520 not referenced back 0x55f4fe10c040
incorrect global backref count on 900221812736 found 81 wanted 77
backpointer mismatch on [900221812736 16384]
ref mismatch on [900221829120 16384] extent item 81, found 77
backref 900221829120 parent 1362119802880 not referenced back 0x55f4fe10c710
backref 900221829120 parent 857950994432 not referenced back 0x55f4fe10cb00
backref 900221829120 parent 151504666624 not referenced back 0x55f4fe10cec0
backref 900221829120 parent 25203179520 not referenced back 0x55f4fe10d040
incorrect global backref count on 900221829120 found 81 wanted 77
backpointer mismatch on [900221829120 16384]
ref mismatch on [900221845504 16384] extent item 81, found 77
backref 900221845504 parent 1362119802880 not referenced back 0x55f4fe10d710
backref 900221845504 parent 857950994432 not referenced back 0x55f4fe10db00
backref 900221845504 parent 151504666624 not referenced back 0x55f4fe10dec0
backref 900221845504 parent 25203179520 not referenced back 0x55f4fe10e040
incorrect global backref count on 900221845504 found 81 wanted 77
backpointer mismatch on [900221845504 16384]
ref mismatch on [900221861888 16384] extent item 81, found 77
backref 900221861888 parent 1362119802880 not referenced back 0x55f4fe10e710
backref 900221861888 parent 857950994432 not referenced back 0x55f4fe10eb00
backref 900221861888 parent 151504666624 not referenced back 0x55f4fe10eec0
backref 900221861888 parent 25203179520 not referenced back 0x55f4fe10f040
incorrect global backref count on 900221861888 found 81 wanted 77
backpointer mismatch on [900221861888 16384]
ref mismatch on [900221878272 16384] extent item 81, found 77
backref 900221878272 parent 1362119802880 not referenced back 0x55f4fe10f710
backref 900221878272 parent 857950994432 not referenced back 0x55f4fe10fb00
backref 900221878272 parent 151504666624 not referenced back 0x55f4fe10fec0
backref 900221878272 parent 25203179520 not referenced back 0x55f4fe110040
incorrect global backref count on 900221878272 found 81 wanted 77
backpointer mismatch on [900221878272 16384]
ref mismatch on [900221894656 16384] extent item 81, found 77
backref 900221894656 parent 1362119802880 not referenced back 0x55f4fe110710
backref 900221894656 parent 857950994432 not referenced back 0x55f4fe110b00
backref 900221894656 parent 151504666624 not referenced back 0x55f4fe110ec0
backref 900221894656 parent 25203179520 not referenced back 0x55f4fe111040
incorrect global backref count on 900221894656 found 81 wanted 77
backpointer mismatch on [900221894656 16384]
ref mismatch on [900221911040 16384] extent item 81, found 77
backref 900221911040 parent 1362119802880 not referenced back 0x55f4fe111710
backref 900221911040 parent 857950994432 not referenced back 0x55f4fe111b00
backref 900221911040 parent 151504666624 not referenced back 0x55f4fe111ec0
backref 900221911040 parent 25203179520 not referenced back 0x55f4e1a4d690
incorrect global backref count on 900221911040 found 81 wanted 77
backpointer mismatch on [900221911040 16384]
ref mismatch on [900221927424 16384] extent item 81, found 77
backref 900221927424 parent 1362119802880 not referenced back 0x55f4fe1124a0
backref 900221927424 parent 857950994432 not referenced back 0x55f4fe112890
backref 900221927424 parent 151504666624 not referenced back 0x55f4fe112c50
backref 900221927424 parent 25203179520 not referenced back 0x55f4fe112dd0
incorrect global backref count on 900221927424 found 81 wanted 77
backpointer mismatch on [900221927424 16384]
ref mismatch on [900221943808 16384] extent item 70, found 69
backref 900221943808 parent 1362119802880 not referenced back 0x55f4fe113410
incorrect global backref count on 900221943808 found 70 wanted 69
backpointer mismatch on [900221943808 16384]
ref mismatch on [900222713856 16384] extent item 77, found 75
backref 900222713856 parent 1362119802880 not referenced back 0x55f4fdbac370
backref 900222713856 parent 857950994432 not referenced back 0x55f4fdbac760
incorrect global backref count on 900222713856 found 77 wanted 75
backpointer mismatch on [900222713856 16384]
ref mismatch on [900222730240 16384] extent item 81, found 77
backref 900222730240 parent 1362119802880 not referenced back 0x55f4fdbad310
backref 900222730240 parent 857950994432 not referenced back 0x55f4fdbad700
backref 900222730240 parent 151504666624 not referenced back 0x55f4fdbadac0
backref 900222730240 parent 25203179520 not referenced back 0x55f4fdbadc40
incorrect global backref count on 900222730240 found 81 wanted 77
backpointer mismatch on [900222730240 16384]
ref mismatch on [900224188416 16384] extent item 70, found 69
backref 900224188416 parent 1362119802880 not referenced back 0x55f4fdbb5cc0
incorrect global backref count on 900224188416 found 70 wanted 69
backpointer mismatch on [900224188416 16384]
ref mismatch on [900225007616 16384] extent item 81, found 77
backref 900225007616 parent 1362119802880 not referenced back 0x55f4fe0f9090
backref 900225007616 parent 857950994432 not referenced back 0x55f4fe0f9480
backref 900225007616 parent 151504666624 not referenced back 0x55f4fe0f9840
backref 900225007616 parent 25203179520 not referenced back 0x55f4fe0f99c0
incorrect global backref count on 900225007616 found 81 wanted 77
backpointer mismatch on [900225007616 16384]
ref mismatch on [900226039808 16384] extent item 81, found 77
backref 900226039808 parent 1362119802880 not referenced back 0x55f4fe0fcfa0
backref 900226039808 parent 857950994432 not referenced back 0x55f4fe0fd390
backref 900226039808 parent 151504666624 not referenced back 0x55f4fe0fd750
backref 900226039808 parent 25203179520 not referenced back 0x55f4fe0fd8d0
incorrect global backref count on 900226039808 found 81 wanted 77
backpointer mismatch on [900226039808 16384]
ref mismatch on [900226072576 16384] extent item 81, found 77
backref 900226072576 parent 1362119802880 not referenced back 0x55f4fe0fdfa0
backref 900226072576 parent 857950994432 not referenced back 0x55f4fe0fe390
backref 900226072576 parent 151504666624 not referenced back 0x55f4fe0fe750
backref 900226072576 parent 25203179520 not referenced back 0x55f4fe0fe8d0
incorrect global backref count on 900226072576 found 81 wanted 77
backpointer mismatch on [900226072576 16384]
ref mismatch on [900226088960 16384] extent item 81, found 77
backref 900226088960 parent 1362119802880 not referenced back 0x55f4fe0fefa0
backref 900226088960 parent 857950994432 not referenced back 0x55f4fe0ff390
backref 900226088960 parent 151504666624 not referenced back 0x55f4fe0ff750
backref 900226088960 parent 25203179520 not referenced back 0x55f4fe0ff8d0
incorrect global backref count on 900226088960 found 81 wanted 77
backpointer mismatch on [900226088960 16384]
ref mismatch on [900226105344 16384] extent item 81, found 77
backref 900226105344 parent 1362119802880 not referenced back 0x55f4fe0fffa0
backref 900226105344 parent 857950994432 not referenced back 0x55f4fe100390
backref 900226105344 parent 151504666624 not referenced back 0x55f4fe100750
backref 900226105344 parent 25203179520 not referenced back 0x55f4fe1008d0
incorrect global backref count on 900226105344 found 81 wanted 77
backpointer mismatch on [900226105344 16384]
ref mismatch on [900226121728 16384] extent item 79, found 76
backref 900226121728 parent 1362119802880 not referenced back 0x55f4fe100f70
backref 900226121728 parent 857950994432 not referenced back 0x55f4fe101360
backref 900226121728 parent 25203179520 not referenced back 0x55f4fe101870
incorrect global backref count on 900226121728 found 79 wanted 76
backpointer mismatch on [900226121728 16384]
ref mismatch on [900226203648 16384] extent item 81, found 77
backref 900226203648 parent 1362119802880 not referenced back 0x55f4fe08af10
backref 900226203648 parent 857950994432 not referenced back 0x55f4fe08b300
backref 900226203648 parent 151504666624 not referenced back 0x55f4fe08b6c0
backref 900226203648 parent 25203179520 not referenced back 0x55f4fe08b840
incorrect global backref count on 900226203648 found 81 wanted 77
backpointer mismatch on [900226203648 16384]
ref mismatch on [900238688256 16384] extent item 90, found 86
backref 900238688256 parent 1362119802880 not referenced back 0x55f4fe0a7f70
backref 900238688256 parent 151504666624 not referenced back 0x55f4fe0a8870
backref 900238688256 parent 25203179520 not referenced back 0x55f4fe0a89f0
backref 900238688256 parent 857950994432 not referenced back 0x55f4fe0a8450
incorrect global backref count on 900238688256 found 90 wanted 86
backpointer mismatch on [900238688256 16384]
ref mismatch on [900238721024 16384] extent item 90, found 86
backref 900238721024 parent 1362119802880 not referenced back 0x55f4fe0a9120
backref 900238721024 parent 151504666624 not referenced back 0x55f4fe0a9a20
backref 900238721024 parent 25203179520 not referenced back 0x55f4fe0a9ba0
backref 900238721024 parent 857950994432 not referenced back 0x55f4fe0a9600
incorrect global backref count on 900238721024 found 90 wanted 86
backpointer mismatch on [900238721024 16384]
ref mismatch on [900239179776 16384] extent item 90, found 86
backref 900239179776 parent 1362119802880 not referenced back 0x55f4fe091e70
backref 900239179776 parent 151504666624 not referenced back 0x55f4fe092770
backref 900239179776 parent 25203179520 not referenced back 0x55f4fe0928f0
backref 900239179776 parent 857950994432 not referenced back 0x55f4fe092350
incorrect global backref count on 900239179776 found 90 wanted 86
backpointer mismatch on [900239179776 16384]
ref mismatch on [900497883136 16384] extent item 81, found 77
backref 900497883136 parent 1362119802880 not referenced back 0x55f4fdfb1fe0
backref 900497883136 parent 857950994432 not referenced back 0x55f4fdfb23d0
backref 900497883136 parent 151504666624 not referenced back 0x55f4fdfb2790
backref 900497883136 parent 25203179520 not referenced back 0x55f4fdfb2910
incorrect global backref count on 900497883136 found 81 wanted 77
backpointer mismatch on [900497883136 16384]
ref mismatch on [1346653388800 16384] extent item 79, found 76
backref 1346653388800 parent 1362119802880 not referenced back 0x55f4fdb3b2b0
backref 1346653388800 parent 857950994432 not referenced back 0x55f4fdb3b6a0
backref 1346653388800 parent 25203179520 not referenced back 0x55f4fdb3bbb0
incorrect global backref count on 1346653388800 found 79 wanted 76
backpointer mismatch on [1346653388800 16384]
ref mismatch on [1361652793344 16384] extent item 2, found 1
backref 1361652793344 parent 1362119802880 not referenced back 0x55f4fd60e1e0
incorrect global backref count on 1361652793344 found 2 wanted 1
backpointer mismatch on [1361652793344 16384]
ref mismatch on [1361693753344 16384] extent item 79, found 76
backref 1361693753344 parent 1362119802880 not referenced back 0x55f4fe020fa0
backref 1361693753344 parent 857950994432 not referenced back 0x55f4fe021390
backref 1361693753344 parent 25203179520 not referenced back 0x55f4fe0218a0
incorrect global backref count on 1361693753344 found 79 wanted 76
backpointer mismatch on [1361693753344 16384]
ref mismatch on [1361734828032 16384] extent item 2, found 1
backref 1361734828032 parent 1362119802880 not referenced back 0x55f4fd61fde0
incorrect global backref count on 1361734828032 found 2 wanted 1
backpointer mismatch on [1361734828032 16384]
ref mismatch on [1361735729152 16384] extent item 2, found 1
backref 1361735729152 parent 1362119802880 not referenced back 0x55f4fd629920
incorrect global backref count on 1361735729152 found 2 wanted 1
backpointer mismatch on [1361735729152 16384]
ref mismatch on [1361752686592 16384] extent item 2, found 1
backref 1361752686592 parent 1362119802880 not referenced back 0x55f4fda345f0
incorrect global backref count on 1361752686592 found 2 wanted 1
backpointer mismatch on [1361752686592 16384]
ref mismatch on [1361753276416 16384] extent item 2, found 1
backref 1361753276416 parent 1362119802880 not referenced back 0x55f4fd330e20
incorrect global backref count on 1361753276416 found 2 wanted 1
backpointer mismatch on [1361753276416 16384]
ref mismatch on [1361753391104 16384] extent item 2, found 1
backref 1361753391104 parent 1362119802880 not referenced back 0x55f4fd3315d0
incorrect global backref count on 1361753391104 found 2 wanted 1
backpointer mismatch on [1361753391104 16384]
ref mismatch on [1361757913088 16384] extent item 2, found 1
backref 1361757913088 parent 1362119802880 not referenced back 0x55f4fd346c30
incorrect global backref count on 1361757913088 found 2 wanted 1
backpointer mismatch on [1361757913088 16384]
ref mismatch on [1361779228672 16384] extent item 2, found 1
backref 1361779228672 parent 1362119802880 not referenced back 0x55f4fdc2da90
incorrect global backref count on 1361779228672 found 2 wanted 1
backpointer mismatch on [1361779228672 16384]
ref mismatch on [1361802346496 16384] extent item 2, found 1
backref 1361802346496 parent 1362119802880 not referenced back 0x55f4fd302670
incorrect global backref count on 1361802346496 found 2 wanted 1
backpointer mismatch on [1361802346496 16384]
ref mismatch on [1361906761728 16384] extent item 2, found 1
backref 1361906761728 parent 1362119802880 not referenced back 0x55f4fd14d510
incorrect global backref count on 1361906761728 found 2 wanted 1
backpointer mismatch on [1361906761728 16384]
ref mismatch on [1361994285056 16384] extent item 2, found 1
backref 1361994285056 parent 1362119802880 not referenced back 0x55f4fd311d70
incorrect global backref count on 1361994285056 found 2 wanted 1
backpointer mismatch on [1361994285056 16384]
ref mismatch on [1362105155584 16384] extent item 2, found 1
backref 1362105155584 parent 1362119802880 not referenced back 0x55f4fd01c4b0
incorrect global backref count on 1362105155584 found 2 wanted 1
backpointer mismatch on [1362105155584 16384]
ref mismatch on [1362114347008 16384] extent item 2, found 1
backref 1362114347008 parent 1362119802880 not referenced back 0x55f4fd5d5710
incorrect global backref count on 1362114347008 found 2 wanted 1
backpointer mismatch on [1362114347008 16384]
ref mismatch on [1362114789376 16384] extent item 2, found 1
backref 1362114789376 parent 1362119802880 not referenced back 0x55f4fd5d5d40
incorrect global backref count on 1362114789376 found 2 wanted 1
backpointer mismatch on [1362114789376 16384]
ref mismatch on [1362117476352 16384] extent item 2, found 1
backref 1362117476352 parent 1362119802880 not referenced back 0x55f4fd5d8820
incorrect global backref count on 1362117476352 found 2 wanted 1
backpointer mismatch on [1362117476352 16384]
ref mismatch on [1362119835648 16384] extent item 2, found 1
backref 1362119835648 parent 1362119802880 not referenced back 0x55f4fd5db390
incorrect global backref count on 1362119835648 found 2 wanted 1
backpointer mismatch on [1362119835648 16384]
ref mismatch on [1362126471168 16384] extent item 1, found 0
backref 1362126471168 parent 1362119802880 not referenced back 0x55f4fd5e05c0
incorrect global backref count on 1362126471168 found 1 wanted 0
backpointer mismatch on [1362126471168 16384]
owner ref check failed [1362126471168 16384]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space cache
[4/7] checking fs roots
warning line 3832
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups

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

* Re: btrfs cannot be mounted or checked
  2021-07-14  8:49     ` Zhenyu Wu
@ 2021-07-14  8:58       ` Qu Wenruo
  2021-07-14  9:58         ` Zhenyu Wu
  0 siblings, 1 reply; 17+ messages in thread
From: Qu Wenruo @ 2021-07-14  8:58 UTC (permalink / raw)
  To: Zhenyu Wu, Qu Wenruo; +Cc: Forza, linux-btrfs



On 2021/7/14 下午4:49, Zhenyu Wu wrote:
> sorry for late:(
> 
> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
> as my situation. But in my computer (boot from live usb) `btrfs check
> --init-extent-tree` output a lot of non-ascii character (maybe because
> ansi escape code mess the terminal)
> after several days it outputs `7/7`and `killed`. The solution looks failed.
> 
> I'm sorry because my live usb don't have smartctl :(
> 
> ```
> $ hdparm -W0 /dev/sda
> /dev/sda:
>   setting drive write-caching to 0 (off)
>   write-caching =  0 (off)
> ```
> 
> But now the btrfs partition still cannot be mounted.
> 
> when I try to mount it with `usebackuproot`, it will output the same
> error message. And dmesg will output
> ```
> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
> deprecated, use 'rescue=usebackuproot' instead
> [250062.064788] BTRFS info (device sda2): trying to use backup root at
> mount time
> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
> [250062.064790] BTRFS info (device sda2): has skinny extents
> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
> rd 0, flush 0, corrupt 5, gen 0
> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)

Looks like a bad extent tree re-initialization, a bug in btrfs-progs then.

For now, you can try to mount with "ro,rescue=ibadroots" to see if it 
can be mounted RO, then rescue your data.

Thanks,
Qu
> [250062.277048] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)
> [250062.291927] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [250062.291943] BTRFS error (device sda2): failed to read block groups: -5
> [250062.292897] BTRFS error (device sda2): open_ctree failed
> ```
> 
> If don't usebackuproot, dmesg will output the same log except the first 2 lines.
> 
> Now btrfs check can check this partition:
> 
> ```
> $ btrfs check /dev/sda2 2>&1|tee check.txt
> # see attachment
> ```
> 
> Does my disk have any hope to be rescued?
> thanks!
> 
> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>>
>> On 2021/7/11 下午7:37, Forza wrote:
>>>
>>>
>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>> Sorry for my disturbance.
>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>> rescue zero-log` cannot work.
>>>> ```
>>>> $ uname -r
>>>> 5.10.27-gentoo-x86_64
>>>> $ btrfs rescue zero-log /dev/sda2
>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>> $ mount /dev/sda2 /mnt/gentoo
>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>> $ btrfs check /dev/sda2
>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>> Ignoring transid failure
>>>> leaf parent key incorrect 34308096
>>>> ERROR: failed to read block groups: Operation not permitted
>>>> ERROR: cannot open file system
>>>> $ dmesg 2>&1|tee dmesg.txt
>>>> # see attachment
>>>> ```
>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>
>>>> Thanks for any help!
>>>>
>>>
>>>
>>> Hi!
>>>
>>> Parent transid failed is hard to recover from, as mentioned on
>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>
>>>
>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>
>>> One way of avoiding this error is to disable write-cache. Parent transid
>>> failed can happen when the disk re-orders writes in its write cache
>>> before flushing to disk. This violates barriers, but it is unfortately
>>> common. If you have a crash, SATA bus reset or other issues, unwritten
>>> content is lost. The problem here is the re-ordering. The superblock is
>>> written out before other metadata (which is now lost due to the crash).
>>
>> To be extra accurate, all filesysmtems have taken the re-order into
>> consideration.
>> Thus we have flush (or called barrier) command to force the disk to
>> write all its cache back to disk or at least non-volatile cache.
>>
>> Combined with mandatory metadata CoW, it means, no matter what the disk
>> re-order or not, we should only see either the newer data after the
>> flush, or the older data before the flush.
>>
>> But unfortunately, hardware is unreliable, sometimes even lies about its
>> flush command.
>> Thus it's possible some disks, especially some cheap RAID cards, tend to
>> just ignore such flush commands, thus leaves the data corrupted after a
>> power loss.
>>
>> Thanks,
>> Qu
>>
>>>
>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>> adding this to a cron-job every 5 minutes or so, as the setting is not
>>> persistent and can get reset if the disk looses power, goes to sleep,
>>> etc.
>>


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

* Re: btrfs cannot be mounted or checked
  2021-07-14  8:58       ` Qu Wenruo
@ 2021-07-14  9:58         ` Zhenyu Wu
  2021-07-14 10:01           ` Qu Wenruo
  2021-07-14 10:04           ` Nikolay Borisov
  0 siblings, 2 replies; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-14  9:58 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs

```
[  301.533172] BTRFS info (device sda2): unrecognized rescue option 'ibadroots'
[  301.533209] BTRFS error (device sda2): open_ctree failed
```

Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.

Thanks!

On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>
>
> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>> sorry for late:(
>>
>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>> as my situation. But in my computer (boot from live usb) `btrfs check
>> --init-extent-tree` output a lot of non-ascii character (maybe because
>> ansi escape code mess the terminal)
>> after several days it outputs `7/7`and `killed`. The solution looks
>> failed.
>>
>> I'm sorry because my live usb don't have smartctl :(
>>
>> ```
>> $ hdparm -W0 /dev/sda
>> /dev/sda:
>>   setting drive write-caching to 0 (off)
>>   write-caching =  0 (off)
>> ```
>>
>> But now the btrfs partition still cannot be mounted.
>>
>> when I try to mount it with `usebackuproot`, it will output the same
>> error message. And dmesg will output
>> ```
>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>> deprecated, use 'rescue=usebackuproot' instead
>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>> mount time
>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>> [250062.064790] BTRFS info (device sda2): has skinny extents
>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>> rd 0, flush 0, corrupt 5, gen 0
>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>> block group used, have 1073754112 expect [0, 1073741824)
>
> Looks like a bad extent tree re-initialization, a bug in btrfs-progs then.
>
> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
> can be mounted RO, then rescue your data.
>
> Thanks,
> Qu
>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>> tree block corruption detected
>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>> block group used, have 1073754112 expect [0, 1073741824)
>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>> tree block corruption detected
>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>> -5
>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>> ```
>>
>> If don't usebackuproot, dmesg will output the same log except the first 2
>> lines.
>>
>> Now btrfs check can check this partition:
>>
>> ```
>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>> # see attachment
>> ```
>>
>> Does my disk have any hope to be rescued?
>> thanks!
>>
>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>
>>>
>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>
>>>>
>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>> Sorry for my disturbance.
>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>> rescue zero-log` cannot work.
>>>>> ```
>>>>> $ uname -r
>>>>> 5.10.27-gentoo-x86_64
>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>> $ btrfs check /dev/sda2
>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>> Ignoring transid failure
>>>>> leaf parent key incorrect 34308096
>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>> ERROR: cannot open file system
>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>> # see attachment
>>>>> ```
>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>
>>>>> Thanks for any help!
>>>>>
>>>>
>>>>
>>>> Hi!
>>>>
>>>> Parent transid failed is hard to recover from, as mentioned on
>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>
>>>>
>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>
>>>> One way of avoiding this error is to disable write-cache. Parent
>>>> transid
>>>> failed can happen when the disk re-orders writes in its write cache
>>>> before flushing to disk. This violates barriers, but it is unfortately
>>>> common. If you have a crash, SATA bus reset or other issues, unwritten
>>>> content is lost. The problem here is the re-ordering. The superblock is
>>>> written out before other metadata (which is now lost due to the crash).
>>>
>>> To be extra accurate, all filesysmtems have taken the re-order into
>>> consideration.
>>> Thus we have flush (or called barrier) command to force the disk to
>>> write all its cache back to disk or at least non-volatile cache.
>>>
>>> Combined with mandatory metadata CoW, it means, no matter what the disk
>>> re-order or not, we should only see either the newer data after the
>>> flush, or the older data before the flush.
>>>
>>> But unfortunately, hardware is unreliable, sometimes even lies about its
>>> flush command.
>>> Thus it's possible some disks, especially some cheap RAID cards, tend to
>>> just ignore such flush commands, thus leaves the data corrupted after a
>>> power loss.
>>>
>>> Thanks,
>>> Qu
>>>
>>>>
>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>> adding this to a cron-job every 5 minutes or so, as the setting is not
>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>> etc.
>>>
>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14  9:58         ` Zhenyu Wu
@ 2021-07-14 10:01           ` Qu Wenruo
  2021-07-14 11:37             ` Zhenyu Wu
  2021-07-14 13:52             ` Zhenyu Wu
  2021-07-14 10:04           ` Nikolay Borisov
  1 sibling, 2 replies; 17+ messages in thread
From: Qu Wenruo @ 2021-07-14 10:01 UTC (permalink / raw)
  To: Zhenyu Wu, Qu Wenruo; +Cc: Forza, linux-btrfs



On 2021/7/14 下午5:58, Zhenyu Wu wrote:
> ```
> [  301.533172] BTRFS info (device sda2): unrecognized rescue option 'ibadroots'
> [  301.533209] BTRFS error (device sda2): open_ctree failed
> ```
>
> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.

Oh, that support is added in v5.11...

You may want to grab a liveCD from some rolling release.

But even with v5.11, it may not help much, as that option won't help if
your extent tree is still intact.

You may want to use "btrfs ins dump-tree" to locate your extent tree,
then corrupt the extent tree root completely (using btrfs-map-logical to
get the physical offset, then dd to destory the first 4 bytes of both
copy), then the option would properly work.

Thanks,
Qu
>
> Thanks!
>
> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>
>>
>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>> sorry for late:(
>>>
>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>> ansi escape code mess the terminal)
>>> after several days it outputs `7/7`and `killed`. The solution looks
>>> failed.
>>>
>>> I'm sorry because my live usb don't have smartctl :(
>>>
>>> ```
>>> $ hdparm -W0 /dev/sda
>>> /dev/sda:
>>>    setting drive write-caching to 0 (off)
>>>    write-caching =  0 (off)
>>> ```
>>>
>>> But now the btrfs partition still cannot be mounted.
>>>
>>> when I try to mount it with `usebackuproot`, it will output the same
>>> error message. And dmesg will output
>>> ```
>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>> deprecated, use 'rescue=usebackuproot' instead
>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>> mount time
>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>> rd 0, flush 0, corrupt 5, gen 0
>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>
>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs then.
>>
>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>> can be mounted RO, then rescue your data.
>>
>> Thanks,
>> Qu
>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>> -5
>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>> ```
>>>
>>> If don't usebackuproot, dmesg will output the same log except the first 2
>>> lines.
>>>
>>> Now btrfs check can check this partition:
>>>
>>> ```
>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>> # see attachment
>>> ```
>>>
>>> Does my disk have any hope to be rescued?
>>> thanks!
>>>
>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>
>>>>
>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>
>>>>>
>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>> Sorry for my disturbance.
>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>> rescue zero-log` cannot work.
>>>>>> ```
>>>>>> $ uname -r
>>>>>> 5.10.27-gentoo-x86_64
>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>> $ btrfs check /dev/sda2
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> Ignoring transid failure
>>>>>> leaf parent key incorrect 34308096
>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>> ERROR: cannot open file system
>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>> # see attachment
>>>>>> ```
>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>
>>>>>> Thanks for any help!
>>>>>>
>>>>>
>>>>>
>>>>> Hi!
>>>>>
>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>
>>>>>
>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>
>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>> transid
>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>> before flushing to disk. This violates barriers, but it is unfortately
>>>>> common. If you have a crash, SATA bus reset or other issues, unwritten
>>>>> content is lost. The problem here is the re-ordering. The superblock is
>>>>> written out before other metadata (which is now lost due to the crash).
>>>>
>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>> consideration.
>>>> Thus we have flush (or called barrier) command to force the disk to
>>>> write all its cache back to disk or at least non-volatile cache.
>>>>
>>>> Combined with mandatory metadata CoW, it means, no matter what the disk
>>>> re-order or not, we should only see either the newer data after the
>>>> flush, or the older data before the flush.
>>>>
>>>> But unfortunately, hardware is unreliable, sometimes even lies about its
>>>> flush command.
>>>> Thus it's possible some disks, especially some cheap RAID cards, tend to
>>>> just ignore such flush commands, thus leaves the data corrupted after a
>>>> power loss.
>>>>
>>>> Thanks,
>>>> Qu
>>>>
>>>>>
>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>> adding this to a cron-job every 5 minutes or so, as the setting is not
>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>> etc.
>>>>
>>
>>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14  9:58         ` Zhenyu Wu
  2021-07-14 10:01           ` Qu Wenruo
@ 2021-07-14 10:04           ` Nikolay Borisov
  1 sibling, 0 replies; 17+ messages in thread
From: Nikolay Borisov @ 2021-07-14 10:04 UTC (permalink / raw)
  To: Zhenyu Wu, Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs



On 14.07.21 г. 12:58, Zhenyu Wu wrote:
> ```
> [  301.533172] BTRFS info (device sda2): unrecognized rescue option 'ibadroots'
> [  301.533209] BTRFS error (device sda2): open_ctree failed
> ```
> 
> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.

That options landed in kernel 5.11

> 
> Thanks!
> 
> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>
>>
>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>> sorry for late:(
>>>
>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>> ansi escape code mess the terminal)
>>> after several days it outputs `7/7`and `killed`. The solution looks
>>> failed.
>>>
>>> I'm sorry because my live usb don't have smartctl :(
>>>
>>> ```
>>> $ hdparm -W0 /dev/sda
>>> /dev/sda:
>>>   setting drive write-caching to 0 (off)
>>>   write-caching =  0 (off)
>>> ```
>>>
>>> But now the btrfs partition still cannot be mounted.
>>>
>>> when I try to mount it with `usebackuproot`, it will output the same
>>> error message. And dmesg will output
>>> ```
>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>> deprecated, use 'rescue=usebackuproot' instead
>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>> mount time
>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>> rd 0, flush 0, corrupt 5, gen 0
>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>
>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs then.
>>
>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>> can be mounted RO, then rescue your data.
>>
>> Thanks,
>> Qu
>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>> -5
>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>> ```
>>>
>>> If don't usebackuproot, dmesg will output the same log except the first 2
>>> lines.
>>>
>>> Now btrfs check can check this partition:
>>>
>>> ```
>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>> # see attachment
>>> ```
>>>
>>> Does my disk have any hope to be rescued?
>>> thanks!
>>>
>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>
>>>>
>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>
>>>>>
>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>> Sorry for my disturbance.
>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>> rescue zero-log` cannot work.
>>>>>> ```
>>>>>> $ uname -r
>>>>>> 5.10.27-gentoo-x86_64
>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>> $ btrfs check /dev/sda2
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>> Ignoring transid failure
>>>>>> leaf parent key incorrect 34308096
>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>> ERROR: cannot open file system
>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>> # see attachment
>>>>>> ```
>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>
>>>>>> Thanks for any help!
>>>>>>
>>>>>
>>>>>
>>>>> Hi!
>>>>>
>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>
>>>>>
>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy? You
>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>
>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>> transid
>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>> before flushing to disk. This violates barriers, but it is unfortately
>>>>> common. If you have a crash, SATA bus reset or other issues, unwritten
>>>>> content is lost. The problem here is the re-ordering. The superblock is
>>>>> written out before other metadata (which is now lost due to the crash).
>>>>
>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>> consideration.
>>>> Thus we have flush (or called barrier) command to force the disk to
>>>> write all its cache back to disk or at least non-volatile cache.
>>>>
>>>> Combined with mandatory metadata CoW, it means, no matter what the disk
>>>> re-order or not, we should only see either the newer data after the
>>>> flush, or the older data before the flush.
>>>>
>>>> But unfortunately, hardware is unreliable, sometimes even lies about its
>>>> flush command.
>>>> Thus it's possible some disks, especially some cheap RAID cards, tend to
>>>> just ignore such flush commands, thus leaves the data corrupted after a
>>>> power loss.
>>>>
>>>> Thanks,
>>>> Qu
>>>>
>>>>>
>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>> adding this to a cron-job every 5 minutes or so, as the setting is not
>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>> etc.
>>>>
>>
>>
> 

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 10:01           ` Qu Wenruo
@ 2021-07-14 11:37             ` Zhenyu Wu
  2021-07-14 12:00               ` Qu Wenruo
  2021-07-14 13:52             ` Zhenyu Wu
  1 sibling, 1 reply; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-14 11:37 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs, nborisov

sorry:( can it be specific?
btrfs-map-logical looks like need an option, btrfs ins dump-tree is
outputing many text, and how to locate the extent tree?
Thanks!

On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>> ```
>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>> 'ibadroots'
>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>> ```
>>
>> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.
>
> Oh, that support is added in v5.11...
>
> You may want to grab a liveCD from some rolling release.
>
> But even with v5.11, it may not help much, as that option won't help if
> your extent tree is still intact.
>
> You may want to use "btrfs ins dump-tree" to locate your extent tree,
> then corrupt the extent tree root completely (using btrfs-map-logical to
> get the physical offset, then dd to destory the first 4 bytes of both
> copy), then the option would properly work.
>
> Thanks,
> Qu
>>
>> Thanks!
>>
>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>
>>>
>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>> sorry for late:(
>>>>
>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>>> ansi escape code mess the terminal)
>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>> failed.
>>>>
>>>> I'm sorry because my live usb don't have smartctl :(
>>>>
>>>> ```
>>>> $ hdparm -W0 /dev/sda
>>>> /dev/sda:
>>>>    setting drive write-caching to 0 (off)
>>>>    write-caching =  0 (off)
>>>> ```
>>>>
>>>> But now the btrfs partition still cannot be mounted.
>>>>
>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>> error message. And dmesg will output
>>>> ```
>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>> deprecated, use 'rescue=usebackuproot' instead
>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>>> mount time
>>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>> rd 0, flush 0, corrupt 5, gen 0
>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>
>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>> then.
>>>
>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>> can be mounted RO, then rescue your data.
>>>
>>> Thanks,
>>> Qu
>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>>> -5
>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>> ```
>>>>
>>>> If don't usebackuproot, dmesg will output the same log except the first
>>>> 2
>>>> lines.
>>>>
>>>> Now btrfs check can check this partition:
>>>>
>>>> ```
>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>> # see attachment
>>>> ```
>>>>
>>>> Does my disk have any hope to be rescued?
>>>> thanks!
>>>>
>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>
>>>>>
>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>
>>>>>>
>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>> Sorry for my disturbance.
>>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>> rescue zero-log` cannot work.
>>>>>>> ```
>>>>>>> $ uname -r
>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>> $ btrfs check /dev/sda2
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> Ignoring transid failure
>>>>>>> leaf parent key incorrect 34308096
>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>> ERROR: cannot open file system
>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>> # see attachment
>>>>>>> ```
>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>
>>>>>>> Thanks for any help!
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>
>>>>>>
>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>> You
>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>
>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>> transid
>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>> unfortately
>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>> unwritten
>>>>>> content is lost. The problem here is the re-ordering. The superblock
>>>>>> is
>>>>>> written out before other metadata (which is now lost due to the
>>>>>> crash).
>>>>>
>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>> consideration.
>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>
>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>> disk
>>>>> re-order or not, we should only see either the newer data after the
>>>>> flush, or the older data before the flush.
>>>>>
>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>> its
>>>>> flush command.
>>>>> Thus it's possible some disks, especially some cheap RAID cards, tend
>>>>> to
>>>>> just ignore such flush commands, thus leaves the data corrupted after
>>>>> a
>>>>> power loss.
>>>>>
>>>>> Thanks,
>>>>> Qu
>>>>>
>>>>>>
>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>> not
>>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>>> etc.
>>>>>
>>>
>>>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 11:37             ` Zhenyu Wu
@ 2021-07-14 12:00               ` Qu Wenruo
  0 siblings, 0 replies; 17+ messages in thread
From: Qu Wenruo @ 2021-07-14 12:00 UTC (permalink / raw)
  To: Zhenyu Wu; +Cc: Qu Wenruo, Forza, linux-btrfs, nborisov



On 2021/7/14 下午7:37, Zhenyu Wu wrote:
> sorry:( can it be specific?
> btrfs-map-logical looks like need an option, btrfs ins dump-tree is
> outputing many text, and how to locate the extent tree?
> Thanks!

Oh, sorry I should explain it more.

Here is the more detailed version.

NOTE: this only works for non-RAID5/6 metadata profiles.
RAID5/6 has extra P/Q to recovery the metadata.

- Use "btrfs ins dump-tree" to determine where the extent tree root is

   $ btrfs ins dump-tree -t root /dev/test/test | grep -A 3 EXTENT_TREE
         item 0 key (EXTENT_TREE ROOT_ITEM 0) itemoff 15844 itemsize 439
                 generation 3682 root_dirid 0 bytenr 30441472 level 1 refs 1
                 lastsnap 0 byte_limit 0 bytes_used 65536 flags 0x0(none)
                 uuid 00000000-0000-0000-0000-000000000000

   The bytenr "30441472" is the bytenr you need to take note of.
   (Here the number is just my example, yours will change obviously)

- Use "btrfs-map-logical" to determine the real location of the metadata

   $ btrfs-map-logical -l 30441472 /dev/test/test
   mirror 1 logical 30441472 physical 38830080 device /dev/test/test
   mirror 2 logical 30441472 physical 307265536 device /dev/test/test

   The two physical numbers, "38830080" and "307265536", are the real
   offset inside each device.

- Corrupt the metadata header of both copies

   Only 4 bytes are needed to be corrupted.

   # xfs_io -f -c "pwrite 38830080 4" /dev/test/test
   # xfs_io -f -c "pwrite 307265536 4" /dev/test/test

- Verify the corruption works:
   $ btrfs check /dev/test/test
   Opening filesystem to check...
   checksum verify failed on 30441472 wanted 0xcdcdcdcd found 0x900b6dae
   checksum verify failed on 30441472 wanted 0xcdcdcdcd found 0x900b6dae
   checksum verify failed on 30441472 wanted 0xcdcdcdcd found 0x900b6dae
   Csum didn't match
   ERROR: could not setup extent tree
   ERROR: cannot open file system

   0xcd is the default pattern of xfs_io pwrite. And the line "ERROR:
   could not setup extent tree" means extent tree is completely
   corrupted.

- Use rescue=ibadroots to rescue the fs

   # mount -o ro,rescue=ibadroots /dev/test/test /mnt/btrfs

Thanks,
Qu
>
> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>>
>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>> ```
>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>> 'ibadroots'
>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>> ```
>>>
>>> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.
>>
>> Oh, that support is added in v5.11...
>>
>> You may want to grab a liveCD from some rolling release.
>>
>> But even with v5.11, it may not help much, as that option won't help if
>> your extent tree is still intact.
>>
>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>> then corrupt the extent tree root completely (using btrfs-map-logical to
>> get the physical offset, then dd to destory the first 4 bytes of both
>> copy), then the option would properly work.
>>
>> Thanks,
>> Qu
>>>
>>> Thanks!
>>>
>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>
>>>>
>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>> sorry for late:(
>>>>>
>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>>>> ansi escape code mess the terminal)
>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>> failed.
>>>>>
>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>
>>>>> ```
>>>>> $ hdparm -W0 /dev/sda
>>>>> /dev/sda:
>>>>>     setting drive write-caching to 0 (off)
>>>>>     write-caching =  0 (off)
>>>>> ```
>>>>>
>>>>> But now the btrfs partition still cannot be mounted.
>>>>>
>>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>>> error message. And dmesg will output
>>>>> ```
>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>>>> mount time
>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>
>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>> then.
>>>>
>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>>> can be mounted RO, then rescue your data.
>>>>
>>>> Thanks,
>>>> Qu
>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>>>> -5
>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>> ```
>>>>>
>>>>> If don't usebackuproot, dmesg will output the same log except the first
>>>>> 2
>>>>> lines.
>>>>>
>>>>> Now btrfs check can check this partition:
>>>>>
>>>>> ```
>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>> # see attachment
>>>>> ```
>>>>>
>>>>> Does my disk have any hope to be rescued?
>>>>> thanks!
>>>>>
>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>> Sorry for my disturbance.
>>>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>>> rescue zero-log` cannot work.
>>>>>>>> ```
>>>>>>>> $ uname -r
>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> Ignoring transid failure
>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>> ERROR: cannot open file system
>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>> # see attachment
>>>>>>>> ```
>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>
>>>>>>>> Thanks for any help!
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>
>>>>>>>
>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>>> You
>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>
>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>> transid
>>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>> unfortately
>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>> unwritten
>>>>>>> content is lost. The problem here is the re-ordering. The superblock
>>>>>>> is
>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>> crash).
>>>>>>
>>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>>> consideration.
>>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>
>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>> disk
>>>>>> re-order or not, we should only see either the newer data after the
>>>>>> flush, or the older data before the flush.
>>>>>>
>>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>>> its
>>>>>> flush command.
>>>>>> Thus it's possible some disks, especially some cheap RAID cards, tend
>>>>>> to
>>>>>> just ignore such flush commands, thus leaves the data corrupted after
>>>>>> a
>>>>>> power loss.
>>>>>>
>>>>>> Thanks,
>>>>>> Qu
>>>>>>
>>>>>>>
>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>>> not
>>>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>>>> etc.
>>>>>>
>>>>
>>>>
>>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 10:01           ` Qu Wenruo
  2021-07-14 11:37             ` Zhenyu Wu
@ 2021-07-14 13:52             ` Zhenyu Wu
  2021-07-14 15:00               ` Zhenyu Wu
  2021-07-14 22:35               ` Qu Wenruo
  1 sibling, 2 replies; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-14 13:52 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs

I found btrfs-5.12 in archlinux (surprisedly)

When I try to mount with ro, rescue=ibadroots, I will get
```
wrong fs type, bad option, bad superblock on
/dev/sda2, missing codepage or helper program, or other error.
```

dmesg will output
```
[ 1087.646701] BTRFS info (device sda2): ignoring bad roots
[ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
[ 1087.646735] BTRFS info (device sda2): has skinny extents
[ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
0, flush 0, corrupt 5, gen 0
[ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
block group used, have 1073754112 expect [0, 1073741824)
[ 1087.834550] BTRFS error (device sda2): block=273006592 read time
tree block corruption detected
[ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
block group used, have 1073754112 expect [0, 1073741824)
[ 1087.848762] BTRFS error (device sda2): block=273006592 read time
tree block corruption detected
[ 1087.849006] BTRFS error (device sda2): failed to read block groups: -5
[ 1087.851674] BTRFS error (device sda2): open_ctree failed
```
does it mean my extent tree is still intact? so I need to btrfs ins
dump-tree, btrfs-map-logical?
thanks!

On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>> ```
>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>> 'ibadroots'
>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>> ```
>>
>> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.
>
> Oh, that support is added in v5.11...
>
> You may want to grab a liveCD from some rolling release.
>
> But even with v5.11, it may not help much, as that option won't help if
> your extent tree is still intact.
>
> You may want to use "btrfs ins dump-tree" to locate your extent tree,
> then corrupt the extent tree root completely (using btrfs-map-logical to
> get the physical offset, then dd to destory the first 4 bytes of both
> copy), then the option would properly work.
>
> Thanks,
> Qu
>>
>> Thanks!
>>
>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>
>>>
>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>> sorry for late:(
>>>>
>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>>> ansi escape code mess the terminal)
>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>> failed.
>>>>
>>>> I'm sorry because my live usb don't have smartctl :(
>>>>
>>>> ```
>>>> $ hdparm -W0 /dev/sda
>>>> /dev/sda:
>>>>    setting drive write-caching to 0 (off)
>>>>    write-caching =  0 (off)
>>>> ```
>>>>
>>>> But now the btrfs partition still cannot be mounted.
>>>>
>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>> error message. And dmesg will output
>>>> ```
>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>> deprecated, use 'rescue=usebackuproot' instead
>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>>> mount time
>>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>> rd 0, flush 0, corrupt 5, gen 0
>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>
>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>> then.
>>>
>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>> can be mounted RO, then rescue your data.
>>>
>>> Thanks,
>>> Qu
>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>>> -5
>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>> ```
>>>>
>>>> If don't usebackuproot, dmesg will output the same log except the first
>>>> 2
>>>> lines.
>>>>
>>>> Now btrfs check can check this partition:
>>>>
>>>> ```
>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>> # see attachment
>>>> ```
>>>>
>>>> Does my disk have any hope to be rescued?
>>>> thanks!
>>>>
>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>
>>>>>
>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>
>>>>>>
>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>> Sorry for my disturbance.
>>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>> rescue zero-log` cannot work.
>>>>>>> ```
>>>>>>> $ uname -r
>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>> $ btrfs check /dev/sda2
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>> Ignoring transid failure
>>>>>>> leaf parent key incorrect 34308096
>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>> ERROR: cannot open file system
>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>> # see attachment
>>>>>>> ```
>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>
>>>>>>> Thanks for any help!
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>
>>>>>>
>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>> You
>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>
>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>> transid
>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>> unfortately
>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>> unwritten
>>>>>> content is lost. The problem here is the re-ordering. The superblock
>>>>>> is
>>>>>> written out before other metadata (which is now lost due to the
>>>>>> crash).
>>>>>
>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>> consideration.
>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>
>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>> disk
>>>>> re-order or not, we should only see either the newer data after the
>>>>> flush, or the older data before the flush.
>>>>>
>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>> its
>>>>> flush command.
>>>>> Thus it's possible some disks, especially some cheap RAID cards, tend
>>>>> to
>>>>> just ignore such flush commands, thus leaves the data corrupted after
>>>>> a
>>>>> power loss.
>>>>>
>>>>> Thanks,
>>>>> Qu
>>>>>
>>>>>>
>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>> not
>>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>>> etc.
>>>>>
>>>
>>>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 13:52             ` Zhenyu Wu
@ 2021-07-14 15:00               ` Zhenyu Wu
  2021-07-14 22:35               ` Qu Wenruo
  1 sibling, 0 replies; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-14 15:00 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs

smartctl exists in archlinux live USB.

```
# smartctl -x /dev/sda
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.12.13-arch1-2] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Laptop HDD
Device Model:     ST500LT012-1DG142
Serial Number:    SBY85S8Y
LU WWN Device Id: 5 000c50 0a84e3995
Firmware Version: 0002SDM1
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Jul 14 14:53:11 2021 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM level is:     128 (minimum power consumption without standby)
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever
					been run.
Total time to complete Offline
data collection: 		(    0) seconds.
Offline data collection
capabilities: 			 (0x73) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 (  99) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x1035)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   106   099   006    -    10870616
  3 Spin_Up_Time            PO----   099   098   000    -    0
  4 Start_Stop_Count        -O--CK   094   094   020    -    6612
  5 Reallocated_Sector_Ct   PO--CK   100   100   036    -    0
  7 Seek_Error_Rate         POSR--   073   060   030    -    60468900788
  9 Power_On_Hours          -O--CK   091   091   000    -    8240 (177 169 0)
 10 Spin_Retry_Count        PO--C-   100   100   097    -    0
 12 Power_Cycle_Count       -O--CK   099   099   020    -    1958
184 End-to-End_Error        -O--CK   100   100   099    -    0
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
188 Command_Timeout         -O--CK   100   099   000    -    1
189 High_Fly_Writes         -O-RCK   100   100   000    -    0
190 Airflow_Temperature_Cel -O---K   068   056   045    -    32 (Min/Max 31/33)
191 G-Sense_Error_Rate      -O--CK   100   100   000    -    1011
192 Power-Off_Retract_Count -O--CK   100   100   000    -    3
193 Load_Cycle_Count        -O--CK   001   001   000    -    486026
194 Temperature_Celsius     -O---K   032   044   000    -    32 (0 7 0 0 0)
197 Current_Pending_Sector  -O--C-   100   100   000    -    0
198 Offline_Uncorrectable   ----C-   100   100   000    -    0
199 UDMA_CRC_Error_Count    -OSRCK   200   200   000    -    0
240 Head_Flying_Hours       ------   093   093   000    -    6674 (140 75 0)
241 Total_LBAs_Written      ------   100   253   000    -    48132007448
242 Total_LBAs_Read         ------   100   253   000    -    89410660754
254 Free_Fall_Sensor        -O--CK   100   100   000    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      5  Comprehensive SMART error log
0x03       GPL     R/O      5  Ext. Comprehensive SMART error log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters log
0x21       GPL     R/O      1  Write stream error log
0x22       GPL     R/O      1  Read stream error log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa1       GPL,SL  VS      20  Device vendor specific log
0xa2       GPL     VS    2248  Device vendor specific log
0xa8       GPL,SL  VS      65  Device vendor specific log
0xa9       GPL,SL  VS       1  Device vendor specific log
0xab       GPL     VS       1  Device vendor specific log
0xb0       GPL     VS    2864  Device vendor specific log
0xbd-0xbf  GPL     VS   65535  Device vendor specific log
0xc0       GPL,SL  VS       1  Device vendor specific log
0xc1       GPL,SL  VS      10  Device vendor specific log
0xc3       GPL,SL  VS       8  Device vendor specific log
0xc4       GPL,SL  VS      18  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (5 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining
LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      8079         -
# 2  Short offline       Interrupted (host reset)      00%       663         -
# 3  Extended offline    Completed without error       00%        27         -
# 4  Short offline       Completed without error       00%        23         -
# 5  Short offline       Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3
SCT Version (vendor specific):       522 (0x020a)
Device State:                        Active (0)
Current Temperature:                    33 Celsius
Power Cycle Min/Max Temperature:     31/33 Celsius
Lifetime    Min/Max Temperature:      7/46 Celsius
Specified Max Operating Temperature:    32 Celsius
Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        30 minutes
Min/Max recommended Temperature:     14/55 Celsius
Min/Max Temperature Limit:           10/60 Celsius
Temperature History Size (Index):    128 (42)

Index    Estimated Time   Temperature Celsius
  43    2021-07-11 23:00    41  **********************
 ...    ..( 27 skipped).    ..  **********************
  71    2021-07-12 13:00    41  **********************
  72    2021-07-12 13:30    42  ***********************
 ...    ..( 23 skipped).    ..  ***********************
  96    2021-07-13 01:30    42  ***********************
  97    2021-07-13 02:00    41  **********************
 ...    ..( 15 skipped).    ..  **********************
 113    2021-07-13 10:00    41  **********************
 114    2021-07-13 10:30    42  ***********************
 ...    ..(  5 skipped).    ..  ***********************
 120    2021-07-13 13:30    42  ***********************
 121    2021-07-13 14:00    43  ************************
 ...    ..(  3 skipped).    ..  ************************
 125    2021-07-13 16:00    43  ************************
 126    2021-07-13 16:30    42  ***********************
 127    2021-07-13 17:00    42  ***********************
   0    2021-07-13 17:30    42  ***********************
   1    2021-07-13 18:00    41  **********************
   2    2021-07-13 18:30    42  ***********************
 ...    ..( 10 skipped).    ..  ***********************
  13    2021-07-14 00:00    42  ***********************
  14    2021-07-14 00:30    41  **********************
 ...    ..(  9 skipped).    ..  **********************
  24    2021-07-14 05:30    41  **********************
  25    2021-07-14 06:00    44  *************************
 ...    ..(  2 skipped).    ..  *************************
  28    2021-07-14 07:30    44  *************************
  29    2021-07-14 08:00    37  ******************
  30    2021-07-14 08:30    39  ********************
  31    2021-07-14 09:00    42  ***********************
  32    2021-07-14 09:30    43  ************************
  33    2021-07-14 10:00    43  ************************
  34    2021-07-14 10:30    43  ************************
  35    2021-07-14 11:00    35  ****************
  36    2021-07-14 11:30    35  ****************
  37    2021-07-14 12:00    37  ******************
  38    2021-07-14 12:30    34  ***************
  39    2021-07-14 13:00     ?  -
  40    2021-07-14 13:30    31  ************
  41    2021-07-14 14:00     ?  -
  42    2021-07-14 14:30    31  ************

SCT Error Recovery Control command not supported

Device Statistics (GP/SMART Log 0x04) not supported

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x000a  2            3  Device-to-host register FISes sent due to a COMRESET
0x0001  2            0  Command failed due to ICRC error
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
```

Thanks!

On 7/14/21, Zhenyu Wu <wuzy001@gmail.com> wrote:
> I found btrfs-5.12 in archlinux (surprisedly)
>
> When I try to mount with ro, rescue=ibadroots, I will get
> ```
> wrong fs type, bad option, bad superblock on
> /dev/sda2, missing codepage or helper program, or other error.
> ```
>
> dmesg will output
> ```
> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
> [ 1087.646735] BTRFS info (device sda2): has skinny extents
> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
> 0, flush 0, corrupt 5, gen 0
> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)
> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)
> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [ 1087.849006] BTRFS error (device sda2): failed to read block groups: -5
> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
> ```
> does it mean my extent tree is still intact? so I need to btrfs ins
> dump-tree, btrfs-map-logical?
> thanks!
>
> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>>
>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>> ```
>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>> 'ibadroots'
>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>> ```
>>>
>>> Does ibadroots need a newer version of btrfs? My btrfs version is
>>> 5.10.1.
>>
>> Oh, that support is added in v5.11...
>>
>> You may want to grab a liveCD from some rolling release.
>>
>> But even with v5.11, it may not help much, as that option won't help if
>> your extent tree is still intact.
>>
>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>> then corrupt the extent tree root completely (using btrfs-map-logical to
>> get the physical offset, then dd to destory the first 4 bytes of both
>> copy), then the option would properly work.
>>
>> Thanks,
>> Qu
>>>
>>> Thanks!
>>>
>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>
>>>>
>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>> sorry for late:(
>>>>>
>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>>>> ansi escape code mess the terminal)
>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>> failed.
>>>>>
>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>
>>>>> ```
>>>>> $ hdparm -W0 /dev/sda
>>>>> /dev/sda:
>>>>>    setting drive write-caching to 0 (off)
>>>>>    write-caching =  0 (off)
>>>>> ```
>>>>>
>>>>> But now the btrfs partition still cannot be mounted.
>>>>>
>>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>>> error message. And dmesg will output
>>>>> ```
>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>>>> mount time
>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is
>>>>> enabled
>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>
>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>> then.
>>>>
>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>>> can be mounted RO, then rescue your data.
>>>>
>>>> Thanks,
>>>> Qu
>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291943] BTRFS error (device sda2): failed to read block
>>>>> groups:
>>>>> -5
>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>> ```
>>>>>
>>>>> If don't usebackuproot, dmesg will output the same log except the
>>>>> first
>>>>> 2
>>>>> lines.
>>>>>
>>>>> Now btrfs check can check this partition:
>>>>>
>>>>> ```
>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>> # see attachment
>>>>> ```
>>>>>
>>>>> Does my disk have any hope to be rescued?
>>>>> thanks!
>>>>>
>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>> Sorry for my disturbance.
>>>>>>>> After a dirty reboot because of a computer crash, my btrfs
>>>>>>>> partition
>>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>>> rescue zero-log` cannot work.
>>>>>>>> ```
>>>>>>>> $ uname -r
>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> Ignoring transid failure
>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>> ERROR: cannot open file system
>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>> # see attachment
>>>>>>>> ```
>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>
>>>>>>>> Thanks for any help!
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>
>>>>>>>
>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>>> You
>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>
>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>> transid
>>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>> unfortately
>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>> unwritten
>>>>>>> content is lost. The problem here is the re-ordering. The superblock
>>>>>>> is
>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>> crash).
>>>>>>
>>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>>> consideration.
>>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>
>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>> disk
>>>>>> re-order or not, we should only see either the newer data after the
>>>>>> flush, or the older data before the flush.
>>>>>>
>>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>>> its
>>>>>> flush command.
>>>>>> Thus it's possible some disks, especially some cheap RAID cards, tend
>>>>>> to
>>>>>> just ignore such flush commands, thus leaves the data corrupted after
>>>>>> a
>>>>>> power loss.
>>>>>>
>>>>>> Thanks,
>>>>>> Qu
>>>>>>
>>>>>>>
>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be
>>>>>>> worth
>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>>> not
>>>>>>> persistent and can get reset if the disk looses power, goes to
>>>>>>> sleep,
>>>>>>> etc.
>>>>>>
>>>>
>>>>
>>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 13:52             ` Zhenyu Wu
  2021-07-14 15:00               ` Zhenyu Wu
@ 2021-07-14 22:35               ` Qu Wenruo
  2021-07-15  5:17                 ` Zhenyu Wu
  1 sibling, 1 reply; 17+ messages in thread
From: Qu Wenruo @ 2021-07-14 22:35 UTC (permalink / raw)
  To: Zhenyu Wu; +Cc: Qu Wenruo, Forza, linux-btrfs



On 2021/7/14 下午9:52, Zhenyu Wu wrote:
> I found btrfs-5.12 in archlinux (surprisedly)
>
> When I try to mount with ro, rescue=ibadroots, I will get
> ```
> wrong fs type, bad option, bad superblock on
> /dev/sda2, missing codepage or helper program, or other error.
> ```
>
> dmesg will output
> ```
> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
> [ 1087.646735] BTRFS info (device sda2): has skinny extents
> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
> 0, flush 0, corrupt 5, gen 0
> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)
> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
> block group used, have 1073754112 expect [0, 1073741824)
> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
> tree block corruption detected
> [ 1087.849006] BTRFS error (device sda2): failed to read block groups: -5
> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
> ```
> does it mean my extent tree is still intact? so I need to btrfs ins
> dump-tree, btrfs-map-logical?
> thanks!

Yep, you need to corrupt the extent tree to rescue the data, ironically.

Thanks,
Qu
>
> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>>
>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>> ```
>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>> 'ibadroots'
>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>> ```
>>>
>>> Does ibadroots need a newer version of btrfs? My btrfs version is 5.10.1.
>>
>> Oh, that support is added in v5.11...
>>
>> You may want to grab a liveCD from some rolling release.
>>
>> But even with v5.11, it may not help much, as that option won't help if
>> your extent tree is still intact.
>>
>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>> then corrupt the extent tree root completely (using btrfs-map-logical to
>> get the physical offset, then dd to destory the first 4 bytes of both
>> copy), then the option would properly work.
>>
>> Thanks,
>> Qu
>>>
>>> Thanks!
>>>
>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>
>>>>
>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>> sorry for late:(
>>>>>
>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks same
>>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>>> --init-extent-tree` output a lot of non-ascii character (maybe because
>>>>> ansi escape code mess the terminal)
>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>> failed.
>>>>>
>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>
>>>>> ```
>>>>> $ hdparm -W0 /dev/sda
>>>>> /dev/sda:
>>>>>     setting drive write-caching to 0 (off)
>>>>>     write-caching =  0 (off)
>>>>> ```
>>>>>
>>>>> But now the btrfs partition still cannot be mounted.
>>>>>
>>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>>> error message. And dmesg will output
>>>>> ```
>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root at
>>>>> mount time
>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is enabled
>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>
>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>> then.
>>>>
>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>>> can be mounted RO, then rescue your data.
>>>>
>>>> Thanks,
>>>> Qu
>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [250062.291943] BTRFS error (device sda2): failed to read block groups:
>>>>> -5
>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>> ```
>>>>>
>>>>> If don't usebackuproot, dmesg will output the same log except the first
>>>>> 2
>>>>> lines.
>>>>>
>>>>> Now btrfs check can check this partition:
>>>>>
>>>>> ```
>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>> # see attachment
>>>>> ```
>>>>>
>>>>> Does my disk have any hope to be rescued?
>>>>> thanks!
>>>>>
>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>> Sorry for my disturbance.
>>>>>>>> After a dirty reboot because of a computer crash, my btrfs partition
>>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>>> rescue zero-log` cannot work.
>>>>>>>> ```
>>>>>>>> $ uname -r
>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found 961764
>>>>>>>> Ignoring transid failure
>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>> ERROR: cannot open file system
>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>> # see attachment
>>>>>>>> ```
>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>
>>>>>>>> Thanks for any help!
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi!
>>>>>>>
>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>
>>>>>>>
>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>>> You
>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>
>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>> transid
>>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>> unfortately
>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>> unwritten
>>>>>>> content is lost. The problem here is the re-ordering. The superblock
>>>>>>> is
>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>> crash).
>>>>>>
>>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>>> consideration.
>>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>
>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>> disk
>>>>>> re-order or not, we should only see either the newer data after the
>>>>>> flush, or the older data before the flush.
>>>>>>
>>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>>> its
>>>>>> flush command.
>>>>>> Thus it's possible some disks, especially some cheap RAID cards, tend
>>>>>> to
>>>>>> just ignore such flush commands, thus leaves the data corrupted after
>>>>>> a
>>>>>> power loss.
>>>>>>
>>>>>> Thanks,
>>>>>> Qu
>>>>>>
>>>>>>>
>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be worth
>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>>> not
>>>>>>> persistent and can get reset if the disk looses power, goes to sleep,
>>>>>>> etc.
>>>>>>
>>>>
>>>>
>>

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

* Re: btrfs cannot be mounted or checked
  2021-07-14 22:35               ` Qu Wenruo
@ 2021-07-15  5:17                 ` Zhenyu Wu
  2021-07-15  5:22                   ` Qu Wenruo
  0 siblings, 1 reply; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-15  5:17 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs

```
$ btrfs ins dump-tree -t root /dev/sda2|grep -A3 EXTENT_TREE|grep
bytenr|tr -d '\t'|cut -d' ' -f6 > num
$ btrfs-map-logical -l `cat num` /dev/sda2|cut -d' ' -f6 > phy
$ xfs_io -f -c "pwrite `tail -n1 phy` 4" /dev/sda2
wrote 4/4 bytes at offset 499117572096
4.000000 bytes, 1 ops; 0.3517 sec (11.370161 bytes/sec and 2.8425 ops/sec)
$ xfs_io -f -c "pwrite `head -n1 phy` 4" /dev/sda2
# same as above
$ btrfs check /dev/sda2
Opening filesystem to check...
checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
Csum didn't match
ERROR: could not setup extent tree
ERROR: cannot open file system
$ mount -o ro,rescue=ibadroots /dev/sda2 /mnt
$ findmnt /mnt
TARGET SOURCE    FSTYPE OPTIONS
/mnt   /dev/sda2 btrfs
ro,relatime,rescue=ignorebadroots,space_cache,subvolid=5,subvol=/
$ dmesg|grep BTRFS
[    7.166566] BTRFS: device label gentoo devid 1 transid 2375312
/dev/sda2 scanned by systemd-udevd (147)
[  990.864811] BTRFS info (device sda2): ignoring bad roots
[  990.864836] BTRFS info (device sda2): disk space caching is enabled
[  990.864849] BTRFS info (device sda2): has skinny extents
[  990.910642] BTRFS warning (device sda2): sda2 checksum verify
failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
[  990.920955] BTRFS warning (device sda2): sda2 checksum verify
failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
[  990.990469] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
0, flush 0, corrupt 5, gen 0
[  990.992263] BTRFS error (device sda2): qgroup generation mismatch,
marked as inconsistent
```

It works!
now can I boot my computer from disk not live USB?

Thanks!

On 7/15/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>
> On 2021/7/14 下午9:52, Zhenyu Wu wrote:
>> I found btrfs-5.12 in archlinux (surprisedly)
>>
>> When I try to mount with ro, rescue=ibadroots, I will get
>> ```
>> wrong fs type, bad option, bad superblock on
>> /dev/sda2, missing codepage or helper program, or other error.
>> ```
>>
>> dmesg will output
>> ```
>> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
>> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
>> [ 1087.646735] BTRFS info (device sda2): has skinny extents
>> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>> 0, flush 0, corrupt 5, gen 0
>> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>> block group used, have 1073754112 expect [0, 1073741824)
>> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
>> tree block corruption detected
>> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>> block group used, have 1073754112 expect [0, 1073741824)
>> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
>> tree block corruption detected
>> [ 1087.849006] BTRFS error (device sda2): failed to read block groups: -5
>> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
>> ```
>> does it mean my extent tree is still intact? so I need to btrfs ins
>> dump-tree, btrfs-map-logical?
>> thanks!
>
> Yep, you need to corrupt the extent tree to rescue the data, ironically.
>
> Thanks,
> Qu
>>
>> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>
>>>
>>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>>> ```
>>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>>> 'ibadroots'
>>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>>> ```
>>>>
>>>> Does ibadroots need a newer version of btrfs? My btrfs version is
>>>> 5.10.1.
>>>
>>> Oh, that support is added in v5.11...
>>>
>>> You may want to grab a liveCD from some rolling release.
>>>
>>> But even with v5.11, it may not help much, as that option won't help if
>>> your extent tree is still intact.
>>>
>>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>>> then corrupt the extent tree root completely (using btrfs-map-logical to
>>> get the physical offset, then dd to destory the first 4 bytes of both
>>> copy), then the option would properly work.
>>>
>>> Thanks,
>>> Qu
>>>>
>>>> Thanks!
>>>>
>>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>>
>>>>>
>>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>>> sorry for late:(
>>>>>>
>>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks
>>>>>> same
>>>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>>>> --init-extent-tree` output a lot of non-ascii character (maybe
>>>>>> because
>>>>>> ansi escape code mess the terminal)
>>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>>> failed.
>>>>>>
>>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>>
>>>>>> ```
>>>>>> $ hdparm -W0 /dev/sda
>>>>>> /dev/sda:
>>>>>>     setting drive write-caching to 0 (off)
>>>>>>     write-caching =  0 (off)
>>>>>> ```
>>>>>>
>>>>>> But now the btrfs partition still cannot be mounted.
>>>>>>
>>>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>>>> error message. And dmesg will output
>>>>>> ```
>>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root
>>>>>> at
>>>>>> mount time
>>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is
>>>>>> enabled
>>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>> invalid
>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>
>>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>>> then.
>>>>>
>>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>>>> can be mounted RO, then rescue your data.
>>>>>
>>>>> Thanks,
>>>>> Qu
>>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>>>> tree block corruption detected
>>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>> invalid
>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>>>> tree block corruption detected
>>>>>> [250062.291943] BTRFS error (device sda2): failed to read block
>>>>>> groups:
>>>>>> -5
>>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>>> ```
>>>>>>
>>>>>> If don't usebackuproot, dmesg will output the same log except the
>>>>>> first
>>>>>> 2
>>>>>> lines.
>>>>>>
>>>>>> Now btrfs check can check this partition:
>>>>>>
>>>>>> ```
>>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>>> # see attachment
>>>>>> ```
>>>>>>
>>>>>> Does my disk have any hope to be rescued?
>>>>>> thanks!
>>>>>>
>>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>>> Sorry for my disturbance.
>>>>>>>>> After a dirty reboot because of a computer crash, my btrfs
>>>>>>>>> partition
>>>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>>>> rescue zero-log` cannot work.
>>>>>>>>> ```
>>>>>>>>> $ uname -r
>>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>> 961764
>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>> 961764
>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>> 961764
>>>>>>>>> Ignoring transid failure
>>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>>> ERROR: cannot open file system
>>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>>> # see attachment
>>>>>>>>> ```
>>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>>
>>>>>>>>> Thanks for any help!
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>>
>>>>>>>>
>>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>>>> You
>>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>>
>>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>>> transid
>>>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>>> unfortately
>>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>>> unwritten
>>>>>>>> content is lost. The problem here is the re-ordering. The
>>>>>>>> superblock
>>>>>>>> is
>>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>>> crash).
>>>>>>>
>>>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>>>> consideration.
>>>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>>
>>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>>> disk
>>>>>>> re-order or not, we should only see either the newer data after the
>>>>>>> flush, or the older data before the flush.
>>>>>>>
>>>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>>>> its
>>>>>>> flush command.
>>>>>>> Thus it's possible some disks, especially some cheap RAID cards,
>>>>>>> tend
>>>>>>> to
>>>>>>> just ignore such flush commands, thus leaves the data corrupted
>>>>>>> after
>>>>>>> a
>>>>>>> power loss.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Qu
>>>>>>>
>>>>>>>>
>>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be
>>>>>>>> worth
>>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>>>> not
>>>>>>>> persistent and can get reset if the disk looses power, goes to
>>>>>>>> sleep,
>>>>>>>> etc.
>>>>>>>
>>>>>
>>>>>
>>>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-15  5:17                 ` Zhenyu Wu
@ 2021-07-15  5:22                   ` Qu Wenruo
  2021-07-15 12:47                     ` Zhenyu Wu
  0 siblings, 1 reply; 17+ messages in thread
From: Qu Wenruo @ 2021-07-15  5:22 UTC (permalink / raw)
  To: Zhenyu Wu, Qu Wenruo; +Cc: Forza, linux-btrfs



On 2021/7/15 下午1:17, Zhenyu Wu wrote:
> ```
> $ btrfs ins dump-tree -t root /dev/sda2|grep -A3 EXTENT_TREE|grep
> bytenr|tr -d '\t'|cut -d' ' -f6 > num
> $ btrfs-map-logical -l `cat num` /dev/sda2|cut -d' ' -f6 > phy
> $ xfs_io -f -c "pwrite `tail -n1 phy` 4" /dev/sda2
> wrote 4/4 bytes at offset 499117572096
> 4.000000 bytes, 1 ops; 0.3517 sec (11.370161 bytes/sec and 2.8425 ops/sec)
> $ xfs_io -f -c "pwrite `head -n1 phy` 4" /dev/sda2
> # same as above
> $ btrfs check /dev/sda2
> Opening filesystem to check...
> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433
> Csum didn't match
> ERROR: could not setup extent tree
> ERROR: cannot open file system
> $ mount -o ro,rescue=ibadroots /dev/sda2 /mnt
> $ findmnt /mnt
> TARGET SOURCE    FSTYPE OPTIONS
> /mnt   /dev/sda2 btrfs
> ro,relatime,rescue=ignorebadroots,space_cache,subvolid=5,subvol=/
> $ dmesg|grep BTRFS
> [    7.166566] BTRFS: device label gentoo devid 1 transid 2375312
> /dev/sda2 scanned by systemd-udevd (147)
> [  990.864811] BTRFS info (device sda2): ignoring bad roots
> [  990.864836] BTRFS info (device sda2): disk space caching is enabled
> [  990.864849] BTRFS info (device sda2): has skinny extents
> [  990.910642] BTRFS warning (device sda2): sda2 checksum verify
> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
> [  990.920955] BTRFS warning (device sda2): sda2 checksum verify
> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
> [  990.990469] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
> 0, flush 0, corrupt 5, gen 0
> [  990.992263] BTRFS error (device sda2): qgroup generation mismatch,
> marked as inconsistent
> ```
> 
> It works!
> now can I boot my computer from disk not live USB?

This is only RO mount, and can no longer be mounted back to RW, not to 
mention it needs kernel newer than 5.11.

This is mostly only for you to grab your data.

Thanks,
Qu
> 
> Thanks!
> 
> On 7/15/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>
>>
>> On 2021/7/14 下午9:52, Zhenyu Wu wrote:
>>> I found btrfs-5.12 in archlinux (surprisedly)
>>>
>>> When I try to mount with ro, rescue=ibadroots, I will get
>>> ```
>>> wrong fs type, bad option, bad superblock on
>>> /dev/sda2, missing codepage or helper program, or other error.
>>> ```
>>>
>>> dmesg will output
>>> ```
>>> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
>>> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
>>> [ 1087.646735] BTRFS info (device sda2): has skinny extents
>>> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>>> 0, flush 0, corrupt 5, gen 0
>>> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>> block group used, have 1073754112 expect [0, 1073741824)
>>> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
>>> tree block corruption detected
>>> [ 1087.849006] BTRFS error (device sda2): failed to read block groups: -5
>>> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
>>> ```
>>> does it mean my extent tree is still intact? so I need to btrfs ins
>>> dump-tree, btrfs-map-logical?
>>> thanks!
>>
>> Yep, you need to corrupt the extent tree to rescue the data, ironically.
>>
>> Thanks,
>> Qu
>>>
>>> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>
>>>>
>>>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>>>> ```
>>>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>>>> 'ibadroots'
>>>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>>>> ```
>>>>>
>>>>> Does ibadroots need a newer version of btrfs? My btrfs version is
>>>>> 5.10.1.
>>>>
>>>> Oh, that support is added in v5.11...
>>>>
>>>> You may want to grab a liveCD from some rolling release.
>>>>
>>>> But even with v5.11, it may not help much, as that option won't help if
>>>> your extent tree is still intact.
>>>>
>>>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>>>> then corrupt the extent tree root completely (using btrfs-map-logical to
>>>> get the physical offset, then dd to destory the first 4 bytes of both
>>>> copy), then the option would properly work.
>>>>
>>>> Thanks,
>>>> Qu
>>>>>
>>>>> Thanks!
>>>>>
>>>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>>>> sorry for late:(
>>>>>>>
>>>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks
>>>>>>> same
>>>>>>> as my situation. But in my computer (boot from live usb) `btrfs check
>>>>>>> --init-extent-tree` output a lot of non-ascii character (maybe
>>>>>>> because
>>>>>>> ansi escape code mess the terminal)
>>>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>>>> failed.
>>>>>>>
>>>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>>>
>>>>>>> ```
>>>>>>> $ hdparm -W0 /dev/sda
>>>>>>> /dev/sda:
>>>>>>>      setting drive write-caching to 0 (off)
>>>>>>>      write-caching =  0 (off)
>>>>>>> ```
>>>>>>>
>>>>>>> But now the btrfs partition still cannot be mounted.
>>>>>>>
>>>>>>> when I try to mount it with `usebackuproot`, it will output the same
>>>>>>> error message. And dmesg will output
>>>>>>> ```
>>>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root
>>>>>>> at
>>>>>>> mount time
>>>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is
>>>>>>> enabled
>>>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0,
>>>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>> invalid
>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>
>>>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>>>> then.
>>>>>>
>>>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if it
>>>>>> can be mounted RO, then rescue your data.
>>>>>>
>>>>>> Thanks,
>>>>>> Qu
>>>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read time
>>>>>>> tree block corruption detected
>>>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>> invalid
>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read time
>>>>>>> tree block corruption detected
>>>>>>> [250062.291943] BTRFS error (device sda2): failed to read block
>>>>>>> groups:
>>>>>>> -5
>>>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>>>> ```
>>>>>>>
>>>>>>> If don't usebackuproot, dmesg will output the same log except the
>>>>>>> first
>>>>>>> 2
>>>>>>> lines.
>>>>>>>
>>>>>>> Now btrfs check can check this partition:
>>>>>>>
>>>>>>> ```
>>>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>>>> # see attachment
>>>>>>> ```
>>>>>>>
>>>>>>> Does my disk have any hope to be rescued?
>>>>>>> thanks!
>>>>>>>
>>>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>>>> Sorry for my disturbance.
>>>>>>>>>> After a dirty reboot because of a computer crash, my btrfs
>>>>>>>>>> partition
>>>>>>>>>> cannot be mounted. The same thing happened before, but now `btrfs
>>>>>>>>>> rescue zero-log` cannot work.
>>>>>>>>>> ```
>>>>>>>>>> $ uname -r
>>>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>> 961764
>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>> 961764
>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>> 961764
>>>>>>>>>> Ignoring transid failure
>>>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>>>> ERROR: cannot open file system
>>>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>>>> # see attachment
>>>>>>>>>> ```
>>>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>>>
>>>>>>>>>> Thanks for any help!
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi!
>>>>>>>>>
>>>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk healthy?
>>>>>>>>> You
>>>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>>>
>>>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>>>> transid
>>>>>>>>> failed can happen when the disk re-orders writes in its write cache
>>>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>>>> unfortately
>>>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>>>> unwritten
>>>>>>>>> content is lost. The problem here is the re-ordering. The
>>>>>>>>> superblock
>>>>>>>>> is
>>>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>>>> crash).
>>>>>>>>
>>>>>>>> To be extra accurate, all filesysmtems have taken the re-order into
>>>>>>>> consideration.
>>>>>>>> Thus we have flush (or called barrier) command to force the disk to
>>>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>>>
>>>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>>>> disk
>>>>>>>> re-order or not, we should only see either the newer data after the
>>>>>>>> flush, or the older data before the flush.
>>>>>>>>
>>>>>>>> But unfortunately, hardware is unreliable, sometimes even lies about
>>>>>>>> its
>>>>>>>> flush command.
>>>>>>>> Thus it's possible some disks, especially some cheap RAID cards,
>>>>>>>> tend
>>>>>>>> to
>>>>>>>> just ignore such flush commands, thus leaves the data corrupted
>>>>>>>> after
>>>>>>>> a
>>>>>>>> power loss.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Qu
>>>>>>>>
>>>>>>>>>
>>>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be
>>>>>>>>> worth
>>>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting is
>>>>>>>>> not
>>>>>>>>> persistent and can get reset if the disk looses power, goes to
>>>>>>>>> sleep,
>>>>>>>>> etc.
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>
> 


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

* Re: btrfs cannot be mounted or checked
  2021-07-15  5:22                   ` Qu Wenruo
@ 2021-07-15 12:47                     ` Zhenyu Wu
  2021-07-15 12:50                       ` Qu Wenruo
  0 siblings, 1 reply; 17+ messages in thread
From: Zhenyu Wu @ 2021-07-15 12:47 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Qu Wenruo, Forza, linux-btrfs

Does it mean the broken disk cannot be recovered? Can the disk be
continued to use? should I change a new disk or format the partition?

Thanks!

On 7/15/21, Qu Wenruo <wqu@suse.com> wrote:
>
>
> On 2021/7/15 下午1:17, Zhenyu Wu wrote:
>> ```
>> $ btrfs ins dump-tree -t root /dev/sda2|grep -A3 EXTENT_TREE|grep
>> bytenr|tr -d '\t'|cut -d' ' -f6 > num
>> $ btrfs-map-logical -l `cat num` /dev/sda2|cut -d' ' -f6 > phy
>> $ xfs_io -f -c "pwrite `tail -n1 phy` 4" /dev/sda2
>> wrote 4/4 bytes at offset 499117572096
>> 4.000000 bytes, 1 ops; 0.3517 sec (11.370161 bytes/sec and 2.8425
>> ops/sec)
>> $ xfs_io -f -c "pwrite `head -n1 phy` 4" /dev/sda2
>> # same as above
>> $ btrfs check /dev/sda2
>> Opening filesystem to check...
>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>> 0xe6568433
>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>> 0xe6568433
>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>> 0xe6568433
>> Csum didn't match
>> ERROR: could not setup extent tree
>> ERROR: cannot open file system
>> $ mount -o ro,rescue=ibadroots /dev/sda2 /mnt
>> $ findmnt /mnt
>> TARGET SOURCE    FSTYPE OPTIONS
>> /mnt   /dev/sda2 btrfs
>> ro,relatime,rescue=ignorebadroots,space_cache,subvolid=5,subvol=/
>> $ dmesg|grep BTRFS
>> [    7.166566] BTRFS: device label gentoo devid 1 transid 2375312
>> /dev/sda2 scanned by systemd-udevd (147)
>> [  990.864811] BTRFS info (device sda2): ignoring bad roots
>> [  990.864836] BTRFS info (device sda2): disk space caching is enabled
>> [  990.864849] BTRFS info (device sda2): has skinny extents
>> [  990.910642] BTRFS warning (device sda2): sda2 checksum verify
>> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
>> [  990.920955] BTRFS warning (device sda2): sda2 checksum verify
>> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
>> [  990.990469] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>> 0, flush 0, corrupt 5, gen 0
>> [  990.992263] BTRFS error (device sda2): qgroup generation mismatch,
>> marked as inconsistent
>> ```
>>
>> It works!
>> now can I boot my computer from disk not live USB?
>
> This is only RO mount, and can no longer be mounted back to RW, not to
> mention it needs kernel newer than 5.11.
>
> This is mostly only for you to grab your data.
>
> Thanks,
> Qu
>>
>> Thanks!
>>
>> On 7/15/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>
>>>
>>> On 2021/7/14 下午9:52, Zhenyu Wu wrote:
>>>> I found btrfs-5.12 in archlinux (surprisedly)
>>>>
>>>> When I try to mount with ro, rescue=ibadroots, I will get
>>>> ```
>>>> wrong fs type, bad option, bad superblock on
>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>> ```
>>>>
>>>> dmesg will output
>>>> ```
>>>> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
>>>> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
>>>> [ 1087.646735] BTRFS info (device sda2): has skinny extents
>>>> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>>>> 0, flush 0, corrupt 5, gen 0
>>>> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
>>>> tree block corruption detected
>>>> [ 1087.849006] BTRFS error (device sda2): failed to read block groups:
>>>> -5
>>>> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
>>>> ```
>>>> does it mean my extent tree is still intact? so I need to btrfs ins
>>>> dump-tree, btrfs-map-logical?
>>>> thanks!
>>>
>>> Yep, you need to corrupt the extent tree to rescue the data, ironically.
>>>
>>> Thanks,
>>> Qu
>>>>
>>>> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>
>>>>>
>>>>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>>>>> ```
>>>>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>>>>> 'ibadroots'
>>>>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>>>>> ```
>>>>>>
>>>>>> Does ibadroots need a newer version of btrfs? My btrfs version is
>>>>>> 5.10.1.
>>>>>
>>>>> Oh, that support is added in v5.11...
>>>>>
>>>>> You may want to grab a liveCD from some rolling release.
>>>>>
>>>>> But even with v5.11, it may not help much, as that option won't help
>>>>> if
>>>>> your extent tree is still intact.
>>>>>
>>>>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>>>>> then corrupt the extent tree root completely (using btrfs-map-logical
>>>>> to
>>>>> get the physical offset, then dd to destory the first 4 bytes of both
>>>>> copy), then the option would properly work.
>>>>>
>>>>> Thanks,
>>>>> Qu
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>>>>> sorry for late:(
>>>>>>>>
>>>>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks
>>>>>>>> same
>>>>>>>> as my situation. But in my computer (boot from live usb) `btrfs
>>>>>>>> check
>>>>>>>> --init-extent-tree` output a lot of non-ascii character (maybe
>>>>>>>> because
>>>>>>>> ansi escape code mess the terminal)
>>>>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>>>>> failed.
>>>>>>>>
>>>>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>>>>
>>>>>>>> ```
>>>>>>>> $ hdparm -W0 /dev/sda
>>>>>>>> /dev/sda:
>>>>>>>>      setting drive write-caching to 0 (off)
>>>>>>>>      write-caching =  0 (off)
>>>>>>>> ```
>>>>>>>>
>>>>>>>> But now the btrfs partition still cannot be mounted.
>>>>>>>>
>>>>>>>> when I try to mount it with `usebackuproot`, it will output the
>>>>>>>> same
>>>>>>>> error message. And dmesg will output
>>>>>>>> ```
>>>>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root
>>>>>>>> at
>>>>>>>> mount time
>>>>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is
>>>>>>>> enabled
>>>>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr
>>>>>>>> 0,
>>>>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>>> invalid
>>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>>
>>>>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>>>>> then.
>>>>>>>
>>>>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if
>>>>>>> it
>>>>>>> can be mounted RO, then rescue your data.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Qu
>>>>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read
>>>>>>>> time
>>>>>>>> tree block corruption detected
>>>>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>>> invalid
>>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read
>>>>>>>> time
>>>>>>>> tree block corruption detected
>>>>>>>> [250062.291943] BTRFS error (device sda2): failed to read block
>>>>>>>> groups:
>>>>>>>> -5
>>>>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>>>>> ```
>>>>>>>>
>>>>>>>> If don't usebackuproot, dmesg will output the same log except the
>>>>>>>> first
>>>>>>>> 2
>>>>>>>> lines.
>>>>>>>>
>>>>>>>> Now btrfs check can check this partition:
>>>>>>>>
>>>>>>>> ```
>>>>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>>>>> # see attachment
>>>>>>>> ```
>>>>>>>>
>>>>>>>> Does my disk have any hope to be rescued?
>>>>>>>> thanks!
>>>>>>>>
>>>>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>>>>> Sorry for my disturbance.
>>>>>>>>>>> After a dirty reboot because of a computer crash, my btrfs
>>>>>>>>>>> partition
>>>>>>>>>>> cannot be mounted. The same thing happened before, but now
>>>>>>>>>>> `btrfs
>>>>>>>>>>> rescue zero-log` cannot work.
>>>>>>>>>>> ```
>>>>>>>>>>> $ uname -r
>>>>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>> 961764
>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>> 961764
>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>> 961764
>>>>>>>>>>> Ignoring transid failure
>>>>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>>>>> ERROR: cannot open file system
>>>>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>>>>> # see attachment
>>>>>>>>>>> ```
>>>>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>>>>
>>>>>>>>>>> Thanks for any help!
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi!
>>>>>>>>>>
>>>>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk
>>>>>>>>>> healthy?
>>>>>>>>>> You
>>>>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>>>>
>>>>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>>>>> transid
>>>>>>>>>> failed can happen when the disk re-orders writes in its write
>>>>>>>>>> cache
>>>>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>>>>> unfortately
>>>>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>>>>> unwritten
>>>>>>>>>> content is lost. The problem here is the re-ordering. The
>>>>>>>>>> superblock
>>>>>>>>>> is
>>>>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>>>>> crash).
>>>>>>>>>
>>>>>>>>> To be extra accurate, all filesysmtems have taken the re-order
>>>>>>>>> into
>>>>>>>>> consideration.
>>>>>>>>> Thus we have flush (or called barrier) command to force the disk
>>>>>>>>> to
>>>>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>>>>
>>>>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>>>>> disk
>>>>>>>>> re-order or not, we should only see either the newer data after
>>>>>>>>> the
>>>>>>>>> flush, or the older data before the flush.
>>>>>>>>>
>>>>>>>>> But unfortunately, hardware is unreliable, sometimes even lies
>>>>>>>>> about
>>>>>>>>> its
>>>>>>>>> flush command.
>>>>>>>>> Thus it's possible some disks, especially some cheap RAID cards,
>>>>>>>>> tend
>>>>>>>>> to
>>>>>>>>> just ignore such flush commands, thus leaves the data corrupted
>>>>>>>>> after
>>>>>>>>> a
>>>>>>>>> power loss.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Qu
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be
>>>>>>>>>> worth
>>>>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting
>>>>>>>>>> is
>>>>>>>>>> not
>>>>>>>>>> persistent and can get reset if the disk looses power, goes to
>>>>>>>>>> sleep,
>>>>>>>>>> etc.
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>
>

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

* Re: btrfs cannot be mounted or checked
  2021-07-15 12:47                     ` Zhenyu Wu
@ 2021-07-15 12:50                       ` Qu Wenruo
  0 siblings, 0 replies; 17+ messages in thread
From: Qu Wenruo @ 2021-07-15 12:50 UTC (permalink / raw)
  To: Zhenyu Wu, Qu Wenruo; +Cc: Forza, linux-btrfs



On 2021/7/15 下午8:47, Zhenyu Wu wrote:
> Does it mean the broken disk cannot be recovered?

If you mean the fs, I'd say it may be possible to recover to fully
working stage, but that would need quite time for us developer to get a
binary dump of your fs and test on that.

If you mean the physical disk, I'd say it's already showing dangerous
sign in its smartctl, you'd better consider to replace it.

Thanks,
Qu

> Can the disk be
> continued to use? should I change a new disk or format the partition?
>
> Thanks!
>
> On 7/15/21, Qu Wenruo <wqu@suse.com> wrote:
>>
>>
>> On 2021/7/15 下午1:17, Zhenyu Wu wrote:
>>> ```
>>> $ btrfs ins dump-tree -t root /dev/sda2|grep -A3 EXTENT_TREE|grep
>>> bytenr|tr -d '\t'|cut -d' ' -f6 > num
>>> $ btrfs-map-logical -l `cat num` /dev/sda2|cut -d' ' -f6 > phy
>>> $ xfs_io -f -c "pwrite `tail -n1 phy` 4" /dev/sda2
>>> wrote 4/4 bytes at offset 499117572096
>>> 4.000000 bytes, 1 ops; 0.3517 sec (11.370161 bytes/sec and 2.8425
>>> ops/sec)
>>> $ xfs_io -f -c "pwrite `head -n1 phy` 4" /dev/sda2
>>> # same as above
>>> $ btrfs check /dev/sda2
>>> Opening filesystem to check...
>>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>>> 0xe6568433
>>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>>> 0xe6568433
>>> checksum verify failed on 1370128760832 wanted 0xcdcdcdcd found
>>> 0xe6568433
>>> Csum didn't match
>>> ERROR: could not setup extent tree
>>> ERROR: cannot open file system
>>> $ mount -o ro,rescue=ibadroots /dev/sda2 /mnt
>>> $ findmnt /mnt
>>> TARGET SOURCE    FSTYPE OPTIONS
>>> /mnt   /dev/sda2 btrfs
>>> ro,relatime,rescue=ignorebadroots,space_cache,subvolid=5,subvol=/
>>> $ dmesg|grep BTRFS
>>> [    7.166566] BTRFS: device label gentoo devid 1 transid 2375312
>>> /dev/sda2 scanned by systemd-udevd (147)
>>> [  990.864811] BTRFS info (device sda2): ignoring bad roots
>>> [  990.864836] BTRFS info (device sda2): disk space caching is enabled
>>> [  990.864849] BTRFS info (device sda2): has skinny extents
>>> [  990.910642] BTRFS warning (device sda2): sda2 checksum verify
>>> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
>>> [  990.920955] BTRFS warning (device sda2): sda2 checksum verify
>>> failed on 1370128760832 wanted 0xcdcdcdcd found 0xe6568433 level 2
>>> [  990.990469] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>>> 0, flush 0, corrupt 5, gen 0
>>> [  990.992263] BTRFS error (device sda2): qgroup generation mismatch,
>>> marked as inconsistent
>>> ```
>>>
>>> It works!
>>> now can I boot my computer from disk not live USB?
>>
>> This is only RO mount, and can no longer be mounted back to RW, not to
>> mention it needs kernel newer than 5.11.
>>
>> This is mostly only for you to grab your data.
>>
>> Thanks,
>> Qu
>>>
>>> Thanks!
>>>
>>> On 7/15/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>
>>>>
>>>> On 2021/7/14 下午9:52, Zhenyu Wu wrote:
>>>>> I found btrfs-5.12 in archlinux (surprisedly)
>>>>>
>>>>> When I try to mount with ro, rescue=ibadroots, I will get
>>>>> ```
>>>>> wrong fs type, bad option, bad superblock on
>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>> ```
>>>>>
>>>>> dmesg will output
>>>>> ```
>>>>> [ 1087.646701] BTRFS info (device sda2): ignoring bad roots
>>>>> [ 1087.646725] BTRFS info (device sda2): disk space caching is enabled
>>>>> [ 1087.646735] BTRFS info (device sda2): has skinny extents
>>>>> [ 1087.770464] BTRFS info (device sda2): bdev /dev/sda2 errs: wr 0, rd
>>>>> 0, flush 0, corrupt 5, gen 0
>>>>> [ 1087.834263] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>> [ 1087.834550] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [ 1087.848452] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824, invalid
>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>> [ 1087.848762] BTRFS error (device sda2): block=273006592 read time
>>>>> tree block corruption detected
>>>>> [ 1087.849006] BTRFS error (device sda2): failed to read block groups:
>>>>> -5
>>>>> [ 1087.851674] BTRFS error (device sda2): open_ctree failed
>>>>> ```
>>>>> does it mean my extent tree is still intact? so I need to btrfs ins
>>>>> dump-tree, btrfs-map-logical?
>>>>> thanks!
>>>>
>>>> Yep, you need to corrupt the extent tree to rescue the data, ironically.
>>>>
>>>> Thanks,
>>>> Qu
>>>>>
>>>>> On 7/14/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>
>>>>>>
>>>>>> On 2021/7/14 下午5:58, Zhenyu Wu wrote:
>>>>>>> ```
>>>>>>> [  301.533172] BTRFS info (device sda2): unrecognized rescue option
>>>>>>> 'ibadroots'
>>>>>>> [  301.533209] BTRFS error (device sda2): open_ctree failed
>>>>>>> ```
>>>>>>>
>>>>>>> Does ibadroots need a newer version of btrfs? My btrfs version is
>>>>>>> 5.10.1.
>>>>>>
>>>>>> Oh, that support is added in v5.11...
>>>>>>
>>>>>> You may want to grab a liveCD from some rolling release.
>>>>>>
>>>>>> But even with v5.11, it may not help much, as that option won't help
>>>>>> if
>>>>>> your extent tree is still intact.
>>>>>>
>>>>>> You may want to use "btrfs ins dump-tree" to locate your extent tree,
>>>>>> then corrupt the extent tree root completely (using btrfs-map-logical
>>>>>> to
>>>>>> get the physical offset, then dd to destory the first 4 bytes of both
>>>>>> copy), then the option would properly work.
>>>>>>
>>>>>> Thanks,
>>>>>> Qu
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> On 7/14/21, Qu Wenruo <wqu@suse.com> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> On 2021/7/14 下午4:49, Zhenyu Wu wrote:
>>>>>>>>> sorry for late:(
>>>>>>>>>
>>>>>>>>> I found <https://bbs.archlinux.org/viewtopic.php?id=233724> looks
>>>>>>>>> same
>>>>>>>>> as my situation. But in my computer (boot from live usb) `btrfs
>>>>>>>>> check
>>>>>>>>> --init-extent-tree` output a lot of non-ascii character (maybe
>>>>>>>>> because
>>>>>>>>> ansi escape code mess the terminal)
>>>>>>>>> after several days it outputs `7/7`and `killed`. The solution looks
>>>>>>>>> failed.
>>>>>>>>>
>>>>>>>>> I'm sorry because my live usb don't have smartctl :(
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> $ hdparm -W0 /dev/sda
>>>>>>>>> /dev/sda:
>>>>>>>>>       setting drive write-caching to 0 (off)
>>>>>>>>>       write-caching =  0 (off)
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> But now the btrfs partition still cannot be mounted.
>>>>>>>>>
>>>>>>>>> when I try to mount it with `usebackuproot`, it will output the
>>>>>>>>> same
>>>>>>>>> error message. And dmesg will output
>>>>>>>>> ```
>>>>>>>>> [250062.064785] BTRFS warning (device sda2): 'usebackuproot' is
>>>>>>>>> deprecated, use 'rescue=usebackuproot' instead
>>>>>>>>> [250062.064788] BTRFS info (device sda2): trying to use backup root
>>>>>>>>> at
>>>>>>>>> mount time
>>>>>>>>> [250062.064789] BTRFS info (device sda2): disk space caching is
>>>>>>>>> enabled
>>>>>>>>> [250062.064790] BTRFS info (device sda2): has skinny extents
>>>>>>>>> [250062.208403] BTRFS info (device sda2): bdev /dev/sda2 errs: wr
>>>>>>>>> 0,
>>>>>>>>> rd 0, flush 0, corrupt 5, gen 0
>>>>>>>>> [250062.277045] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>>>> invalid
>>>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>>>
>>>>>>>> Looks like a bad extent tree re-initialization, a bug in btrfs-progs
>>>>>>>> then.
>>>>>>>>
>>>>>>>> For now, you can try to mount with "ro,rescue=ibadroots" to see if
>>>>>>>> it
>>>>>>>> can be mounted RO, then rescue your data.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Qu
>>>>>>>>> [250062.277048] BTRFS error (device sda2): block=273006592 read
>>>>>>>>> time
>>>>>>>>> tree block corruption detected
>>>>>>>>> [250062.291924] BTRFS critical (device sda2): corrupt leaf: root=2
>>>>>>>>> block=273006592 slot=17 bg_start=1104150528 bg_len=1073741824,
>>>>>>>>> invalid
>>>>>>>>> block group used, have 1073754112 expect [0, 1073741824)
>>>>>>>>> [250062.291927] BTRFS error (device sda2): block=273006592 read
>>>>>>>>> time
>>>>>>>>> tree block corruption detected
>>>>>>>>> [250062.291943] BTRFS error (device sda2): failed to read block
>>>>>>>>> groups:
>>>>>>>>> -5
>>>>>>>>> [250062.292897] BTRFS error (device sda2): open_ctree failed
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> If don't usebackuproot, dmesg will output the same log except the
>>>>>>>>> first
>>>>>>>>> 2
>>>>>>>>> lines.
>>>>>>>>>
>>>>>>>>> Now btrfs check can check this partition:
>>>>>>>>>
>>>>>>>>> ```
>>>>>>>>> $ btrfs check /dev/sda2 2>&1|tee check.txt
>>>>>>>>> # see attachment
>>>>>>>>> ```
>>>>>>>>>
>>>>>>>>> Does my disk have any hope to be rescued?
>>>>>>>>> thanks!
>>>>>>>>>
>>>>>>>>> On 7/11/21, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 2021/7/11 下午7:37, Forza wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 2021-07-11 10:59, Zhenyu Wu wrote:
>>>>>>>>>>>> Sorry for my disturbance.
>>>>>>>>>>>> After a dirty reboot because of a computer crash, my btrfs
>>>>>>>>>>>> partition
>>>>>>>>>>>> cannot be mounted. The same thing happened before, but now
>>>>>>>>>>>> `btrfs
>>>>>>>>>>>> rescue zero-log` cannot work.
>>>>>>>>>>>> ```
>>>>>>>>>>>> $ uname -r
>>>>>>>>>>>> 5.10.27-gentoo-x86_64
>>>>>>>>>>>> $ btrfs rescue zero-log /dev/sda2
>>>>>>>>>>>> Clearing log on /dev/sda2, previous log_root 0, level 0
>>>>>>>>>>>> $ mount /dev/sda2 /mnt/gentoo
>>>>>>>>>>>> mount: /mnt/gentoo: wrong fs type, bad option, bad superblock on
>>>>>>>>>>>> /dev/sda2, missing codepage or helper program, or other error.
>>>>>>>>>>>> $ btrfs check /dev/sda2
>>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>>> 961764
>>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>>> 961764
>>>>>>>>>>>> parent transid verify failed on 34308096 wanted 962175 found
>>>>>>>>>>>> 961764
>>>>>>>>>>>> Ignoring transid failure
>>>>>>>>>>>> leaf parent key incorrect 34308096
>>>>>>>>>>>> ERROR: failed to read block groups: Operation not permitted
>>>>>>>>>>>> ERROR: cannot open file system
>>>>>>>>>>>> $ dmesg 2>&1|tee dmesg.txt
>>>>>>>>>>>> # see attachment
>>>>>>>>>>>> ```
>>>>>>>>>>>> Like `mount -o ro,usebackuproot` cannot work, too.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for any help!
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Hi!
>>>>>>>>>>>
>>>>>>>>>>> Parent transid failed is hard to recover from, as mentioned on
>>>>>>>>>>> https://btrfs.wiki.kernel.org/index.php/FAQ#How_do_I_recover_from_a_.22parent_transid_verify_failed.22_error.3F
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I see you have "corrupt 5" sectors in dmesg. Is your disk
>>>>>>>>>>> healthy?
>>>>>>>>>>> You
>>>>>>>>>>> can check with "smartctl -x /dev/sda" to determine the health.
>>>>>>>>>>>
>>>>>>>>>>> One way of avoiding this error is to disable write-cache. Parent
>>>>>>>>>>> transid
>>>>>>>>>>> failed can happen when the disk re-orders writes in its write
>>>>>>>>>>> cache
>>>>>>>>>>> before flushing to disk. This violates barriers, but it is
>>>>>>>>>>> unfortately
>>>>>>>>>>> common. If you have a crash, SATA bus reset or other issues,
>>>>>>>>>>> unwritten
>>>>>>>>>>> content is lost. The problem here is the re-ordering. The
>>>>>>>>>>> superblock
>>>>>>>>>>> is
>>>>>>>>>>> written out before other metadata (which is now lost due to the
>>>>>>>>>>> crash).
>>>>>>>>>>
>>>>>>>>>> To be extra accurate, all filesysmtems have taken the re-order
>>>>>>>>>> into
>>>>>>>>>> consideration.
>>>>>>>>>> Thus we have flush (or called barrier) command to force the disk
>>>>>>>>>> to
>>>>>>>>>> write all its cache back to disk or at least non-volatile cache.
>>>>>>>>>>
>>>>>>>>>> Combined with mandatory metadata CoW, it means, no matter what the
>>>>>>>>>> disk
>>>>>>>>>> re-order or not, we should only see either the newer data after
>>>>>>>>>> the
>>>>>>>>>> flush, or the older data before the flush.
>>>>>>>>>>
>>>>>>>>>> But unfortunately, hardware is unreliable, sometimes even lies
>>>>>>>>>> about
>>>>>>>>>> its
>>>>>>>>>> flush command.
>>>>>>>>>> Thus it's possible some disks, especially some cheap RAID cards,
>>>>>>>>>> tend
>>>>>>>>>> to
>>>>>>>>>> just ignore such flush commands, thus leaves the data corrupted
>>>>>>>>>> after
>>>>>>>>>> a
>>>>>>>>>> power loss.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Qu
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> You disable write cache with "hdparm -W0 /dev/sda". It might be
>>>>>>>>>>> worth
>>>>>>>>>>> adding this to a cron-job every 5 minutes or so, as the setting
>>>>>>>>>>> is
>>>>>>>>>>> not
>>>>>>>>>>> persistent and can get reset if the disk looses power, goes to
>>>>>>>>>>> sleep,
>>>>>>>>>>> etc.
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>>
>>
>>

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

end of thread, other threads:[~2021-07-15 12:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11  8:59 btrfs cannot be mounted or checked Zhenyu Wu
2021-07-11 11:37 ` Forza
2021-07-11 12:00   ` Qu Wenruo
2021-07-14  8:49     ` Zhenyu Wu
2021-07-14  8:58       ` Qu Wenruo
2021-07-14  9:58         ` Zhenyu Wu
2021-07-14 10:01           ` Qu Wenruo
2021-07-14 11:37             ` Zhenyu Wu
2021-07-14 12:00               ` Qu Wenruo
2021-07-14 13:52             ` Zhenyu Wu
2021-07-14 15:00               ` Zhenyu Wu
2021-07-14 22:35               ` Qu Wenruo
2021-07-15  5:17                 ` Zhenyu Wu
2021-07-15  5:22                   ` Qu Wenruo
2021-07-15 12:47                     ` Zhenyu Wu
2021-07-15 12:50                       ` Qu Wenruo
2021-07-14 10:04           ` Nikolay Borisov

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.