Jolla 1 recovery mode, unmoutable filesystem

asked 2020-05-03 15:08:27 +0300

JirikL gravatar image

Hi, I have Jolla 1 Phone. With bad battery, phone x times suddenly turned off. Now is bricked. I go into recovery mode and run option "5 Try btrfs recovery if your device is in bootloop".

This is what I get:

Segmentation fault 
umount: can't unmount /mnt/: Invalid argument
enabling repair mode 
Couldn't open file system

And still (1 hour) running. In dmesg I see:

[  346.826918] device label sailfish devid 1 transid 2727498 /dev/mmcblk0p28
[  346.865405] btrfs: enabling auto recovery
[  346.865405] btrfs: disabling disk space caching
[  346.865435] btrfs: force clearing of disk cache
[  346.865435] btrfs: enabling auto defrag
[  346.995086] btrfs: bdev /dev/mmcblk0p28 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0
[  347.804547] Btrfs detected SSD devices, enabling SSD mode
[  379.044529] mount (198): undefined instruction: pc=c037ca6c
[  379.044559] Code: e1a0000a ebff5295 e3500000 0a000000 (e7f001f2) 

And in iostat I see minimal traffic.

So I run option 4) Shell:

mount -o subvol=@home /dev/mmcblk0p28 /myhome/

Segmentation fault

btrfs fi show
Label: 'sailfish'  uuid: 86180ca0-d351-4551-b262-22b49e1adf47
        Total devices 1 FS bytes used 4.73GiB
        devid    1 size 13.75GiB used 13.75GiB path /dev/mmcblk0p28
After segfault I must run recovery mode again.
/ # btrfs check /dev/mmcblk0p28
parent transid verify failed on 94920704 wanted 2727500 found 2727499
parent transid verify failed on 94920704 wanted 2727500 found 2727499
parent transid verify failed on 94920704 wanted 2727500 found 2727499
parent transid verify failed on 94920704 wanted 2727500 found 2727499
Ignoring transid failure
Checking filesystem on /dev/mmcblk0p28
UUID: 86180ca0-d351-4551-b262-22b49e1adf47
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
checking root refs
checking quota groups
Transid errors in file system
Counts for qgroup id: 264 are different
our:            referenced 876449792 referenced compressed 876449792
disk:           referenced 876449792 referenced compressed 876449792
our:            exclusive 872464384 exclusive compressed 872464384
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 872460288 exclusive compressed 872460288
Counts for qgroup id: 265 are different
our:            referenced 73646080 referenced compressed 73646080
disk:           referenced 73646080 referenced compressed 73646080
our:            exclusive 15380480 exclusive compressed 15380480
disk:           exclusive 4096 exclusive compressed 4096
diff:           exclusive 15376384 exclusive compressed 15376384
found 2915179508 bytes used err is 1
total csum bytes: 4715584
total tree bytes: 235204608
total fs tree bytes: 214499328
total extent tree bytes: 12795904
btree space waste bytes: 70058462
file data blocks allocated: 4970160128
 referenced 4793737216
Btrfs v3.16

What I do next? Thanks.

edit retag flag offensive close delete

Comments

@JirikL In the following post I describe my personal experience with BTRFS I had few years ago with Jolla1. I hope it will help you.

https://together.jolla.com/question/185240/btrfs-problem-home-dir-gone/

In the forum also there are several posts that describe few ideas and solutions.

nas ( 2020-05-03 15:51:21 +0300 )edit

Yes, I read your post and many others, But I can't mount anyway:

/ # mkdir myjolla
/ # mount /dev/mmcblk0p28 /myjolla/
Segmentation fault
JirikL ( 2020-05-06 10:20:44 +0300 )edit

I copy image /dev/mmcblk0p28 to PC. One small step:

losetup --find --show /tmp/jolla.img
/dev/loop0
/ # btrfs rescue zero-log /dev/loop0
parent transid verify failed on 94920704 wanted 2727500 found 2727499
parent transid verify failed on 94920704 wanted 2727500 found 2727499
parent transid verify failed on 94920704 wanted 2727500 found 2727499
Ignoring transid failure
Clearing log on /dev/loop4, previous log_root 94920704, level 0

Now is possible to mount, but only readonly.

/ # mount /dev/loop0 /myjolla/
mount: /myjolla: mount(2) system call failed: No space left on device.
/ # mount -o recovery /dev/loop0 /myjolla
mount: /myjolla: mount(2) system call failed: No space left on device.
/ # mount -o ro,recovery /dev/loop0 /myjolla

And when I want add some space (test with loopback device):

/ # btrfs device add /dev/loop1 /myjolla
ERROR: error adding device '/dev/loop1': Read-only file system
JirikL ( 2020-05-11 13:54:04 +0300 )edit