Ubuntu: btrfs partition won't mount after upgrading 64bit Ubuntu 11.10 laptop



Question:

I have tried many ideas from the net, but none of them work.

This looks correct and in good order

**sudo btrfs filesystem show /dev/sda2**  failed to read /dev/sr0  Label: none  uuid: daeedc21-7449-4b4a-ae55-e58a5a28a504      Total devices 1 FS bytes used 4.02GB      devid    1 size 32.60GB used 22.54GB path /dev/sda2  

When I do a scan it returns what looks like a reasonable response:

**sudo btrfsck -s /dev/sda2**  found 4321669120 bytes used err is 0  total csum bytes: 4187576  total tree bytes: 23400448  total fs tree bytes: 12083200  btree space waste bytes: 6789166  file data blocks allocated: 4786331648   referenced 4126896128  Btrfs Btrfs v0.19  

However, even when I use the degraded mount option, I still get an error in the logs, and it would appear that a good superblock can not be found.

**sudo mount -o degraded -t btrfs /dev/sda2 /home**  mount: wrong fs type, bad option, bad superblock on /dev/sda2,         missing codepage or helper program, or other error         In some cases useful info is found in syslog - try         dmesg | tail  or so  

Error seen in the log:

[  647.710937] device fsid 4a4b497421dceeda-4a5285a8ae555ae devid 1 transid 20368 /dev/sda2  [  647.712760] btrfs: allowing degraded mounts  [  647.714378] parent transid verify failed on 7051943936 wanted 20368 found 20375  [  647.714784] parent transid verify failed on 7051943936 wanted 20368 found 20375  [  647.715182] parent transid verify failed on 7051943936 wanted 20368 found 20375  [  647.760270] btrfs: open_ctree failed  [ 1081.410560] device fsid 4a4b497421dceeda-4a5285a8ae555ae devid 1 transid 20368 /dev/sda2  

This lappy has not had any sudden power-offs, and was just shutdown and restarted as normal after the daily updates. I am using a Kingston SSD drive, but have been for months, so don't think this should be a contributing factor.

Any pointers greatly received, as I would prefer to keep using btrfs, rather than having to move back to ext4.


Solution:1

I had this exact same problem and fixed it by running sudo btrfsctl -a (apparently running sudo btrfs device scan will work too, though I haven't tried it).

Unfortunately you need to run that after each boot. I found an automatic solution here, though from what I understand it's a bit of a hack.


Solution:2

try mounting it -o recovery

You can also built the fsck.btrfs tool from here

https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories#btrfs-progs_Git_Repository

which will allow you to ./btrfsck --repair /dev/devicename

note: you also will need to apt-get install build-essential

I was getting kernel "BUG"s, which you are not getting, but after using btrfs for quite a while I finially went back to ext4 after too many problems.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »