mount -t btrfs -o usebackuproot /dev/sda2 /sysroot
If this works, your should be able to boot your Linux.
Surfing the web I found a lot of answers recommending to clear btrfs' internal log by using btrfs-zero-log. I thought btrfsck could help but eventually I discovered the official recommendation which is to first just start a btrfs scrub before taking other actions!
So just run btrfs scrub /path/to/mountpoint if you too can still mount your filesystem. And maybe it works like in my case.
First run this command:
sudo btrfs rescue super-recover -v /dev/sda2
If it tells you “All supers are valid, no need to recover”, you need to run the following command to clear the filesystem log tree:
sudo btrfs rescue zero-log /dev/sda2
Now you should be able to mount your Btrfs file system.
–
logs were full with parent transid verify failed on 109973766144 wanted 1823 found 1821
dmesg was full with BTRFS info (device sda): no csum found for inode 16485445 start 73728 and BTRFS warning (device sda): csum failed ino 16485465 off 36864 csum 2268363541 expected csum 0
configuration of my system
NAS with 3 nfs shares
BTRFS file system
Rockstor Operating System
RAID 10 setup
additional information
the btrfs mount became read only
btrfs-scrub failed with ERROR: scrubbing /dev/md124p2 failed for device id 1: ret=-1, errno=5
I solved it by deleting the nfs export ie. from /etc/export/ and then remounting the volumes and voila everything became ok
UPDATE 29 Jan 2018: after working for a few days it went back exactly to the same state
–
parent transid verify failed on 29605888 wanted 50 found 46
For me the btrfs is not mountable anymore so btrfs scrub is no option.
Also my /etc/exports are empty.
I tried btrfsck --init-extent-tree /dev/sda4 but I still get errors.
btrfs check(main+0x82)[0x411ba2]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f8210fab555]
btrfs check[0x411ca8]
Aborted
Link to Screenshot (Updload wasn't possible):
Screenshot
It seems the only solution is to restore the data to another disk by
btrfs restore /dev/sda4 /mnt/anotherdisk/folder
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.