Ubuntu Version
Ubuntu 24.04 LTS
Desktop Environment (if applicable)
Other
Problem Description
Thanks for reading my topic.
Please HELP ME !
Here is machine mainboard A960D SB710 SATA2 AMD FX 6300 and HDD WD WD20PURX-89G3VY0 SATA 3 2,5 TB.
OS Linux Lubuntu 24.04.3 kernel 6.14.
That HDD is new, but had happened issues possibly related with SATA cable. HDD not has bad clusters.
That HDD has a BTRFS partition 1,2 TB formated using kernel 6.14 using the command below
mkfs.btrfs -d single -M --csum xxhash -n 4096 -s 4096 -L BTRFS -o mixed-bg -o skinny-metadata -o no-holes -o block-group-tree /dev/sda7
option “-M” means data and metadata mixed in same block group
configured in fstab to mount in OS boot startup using the default settings plus noatime,noautodefrag,commit=6,compress-force=zstd:15,max_inline=0 using mount point /BTRFS
I have used that settings since before 2022 without any issues in other HDD.
I had started the OS and that partition was automatically mounted in mount point /BTRFS. Not any write or move operations was done and not any softwares appimage had used that partition. Then of several minutes the HDD had stopped any read task and the OS was totally halted not being possible open the start menu or alternate to others softwares.
Thus was forced a machine reset. When the OS was restarted the partition not was mounted and trying “sudo mount -a” was showed a message about error more or less
parent transid in XXXXXXXXXXX (several numbers) want 750 found 752.
Then was used the command “sudo mount -o ro,usebackuproot /dev/sda7 /mnt” and not was mounted.
Then was used the command “sudo btrfs zero-log /dev/sda7” and finally the partition was mounted.
Thus I had used the command
sudo btrfs check --readonly /dev/sda3
being showed a high number of lines about error … I not remember exactly the information … was more or less the information below, but not exactly with that numbers.
ref mismatch on [3307208704 9437184] extent item 0, found 1
data extent[3307208704, 9437184] referencer count mismatch (root 5 owner 1920 offset 726663168) wanted 0 have 1
backpointer mismatch on [3307208704 9437184]
adding new data backref on 3307208704 root 5 owner 1920 offset 726663168 found 1
I not had done a repair command. I want first to do a backup before running repair task.
Thus I had started to backup all files to another partition in same HDD, but was removed in /ect/fstab the lines about mounting /dev/sda7 so waiting manual mount avoiding any others issues. Then copy of 100 GB happen the same problem OS halted and not being possible access to the HDD.
The same problem again … not was done any written or move operations in partition sda7 being the partition had happened the issue. Only was done read access for less of 120 GB and was mounted with noatime not changed or created any directories and not changes in files directories properties too … not is possible mount being showed the message below … I not remember exactly in the lines about extent and ctree, but is more or less
parent transid in XXXXXXXXXXX (several numbers) want 750 found 752.
ERROR Could find extend tree
ERROR Could find ctree
parent transid number are 2 units. The maximum secure number is 20 units.
If it had been the message below, it would have been worse
parent transid verify failed on 4200775680 wanted 1781 found 29226
parent transid verify failed on 4200775680 wanted 1781 found 29226
Ignoring transid failure
ERROR: root [1 0] level 0 does not match 1
Couldn’t read tree root
ERROR]: cannot open file system
The command “sudo btrfs zero-log /dev/sda7” not works and is showed the same message above.
“btrfs rescue super-recover” show all super are valid.
I’m very concerned about using the commands below in case something goes wrong.
“btrfs rescue clear-ino-cache”
“btrfs rescue clear-space-cache” ( I remember before 2022 testing that command was damaged the file system losing all files ).
“btrfs rescue clear-uuid-tree”
“btrfs check --init-extent-tree” ( create a new extent tree ).
I not known others command to use.
Please help me … How fix it ?
I not known any software to fix that type of problem.
I think to do copy that partition to another HDD and then run the command in way more secure.
I not understand how a file system is damaged being accessed only for read and even if had happened any HDD issues for example SATA cable problem not has any protection to avoid that terrible error.
That file system is much suggested, but I never had seen an file system much prone to problems. FAT32, NTFS and ext are simple to fix and not are extremely damaged if happen an HDD issue.
I remember accessing the internet an information about linux kernel recent release allowing BTRFS partition to be mounted if the superblock is damaged.
That information is true ? If yes what the kernel version ? Need enable configure an option to use that feature ?
Thanks for reading my topic. Have a nice week.