All of lore.kernel.org
 help / color / mirror / Atom feed
* Help needed to recover from partition resize/move
@ 2020-04-25 10:24 Yegor Yegorov
  2020-04-25 20:05 ` Chris Murphy
  2020-04-26 11:04 ` Ferry Toth
  0 siblings, 2 replies; 9+ messages in thread
From: Yegor Yegorov @ 2020-04-25 10:24 UTC (permalink / raw)
  To: linux-btrfs

Hi, I have been stupid enough to try to move and extend my btrfs
partition using a GUI software of my distro. The operation ended with
an error. From the logs of the operation, I understood that the
movement of the partition succeeded, but some finishing operation is
failed. I don't have this log anymore, so I can't provide further
information on that.

Now I ended up with btrfs partition that can't be mounted. Here the
output of the various system and btrfs tools:

$> mount -t btrfs /dev/nvme0n1p3 /mnt/
mount: /mnt/: wrong fs type, bad option, bad superblock on
/dev/nvme0n1p3, missing codepage or helper program, or other error.

$>dmesg | tail
[11637.931751] BTRFS info (device nvme0n1p3): disk space caching is enabled
[11637.931754] BTRFS info (device nvme0n1p3): has skinny extents
[11637.936339] BTRFS error (device nvme0n1p3): bad tree block start,
want 1048576 have 6267530653245814412
[11637.936350] BTRFS error (device nvme0n1p3): failed to read chunk root
[11637.950289] BTRFS error (device nvme0n1p3): open_ctree failed
[11637.950893] audit: type=1106 audit(1587809374.388:663): pid=14229
uid=0 auid=1000 ses=2 msg='op=PAM:session_close
grantors=pam_limits,pam_unix,pam_permit acct="root"
exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[11637.951039] audit: type=1104 audit(1587809374.388:664): pid=14229
uid=0 auid=1000 ses=2 msg='op=PAM:setcred
grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo"
hostname=? addr=? terminal=/dev/pts/1 res=success'
[11674.981082] audit: type=1101 audit(1587809411.415:665): pid=14277
uid=1000 auid=1000 ses=2 msg='op=PAM:accounting
grantors=pam_unix,pam_permit,pam_time acct="go4a" exe="/usr/bin/sudo"
hostname=? addr=? terminal=/dev/pts/1 res=success'
[11674.981423] audit: type=1110 audit(1587809411.415:666): pid=14277
uid=0 auid=1000 ses=2 msg='op=PAM:setcred
grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo"
hostname=? addr=? terminal=/dev/pts/1 res=success'
[11674.985959] audit: type=1105 audit(1587809411.422:667): pid=14277
uid=0 auid=1000 ses=2 msg='op=PAM:session_open
grantors=pam_limits,pam_unix,pam_permit acct="root"
exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'

$> btrfs check /dev/nvme0n1p3
Opening filesystem to check...
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
ERROR: cannot open file system

$> btrfs restore /dev/nvme0n1p3 /mnt/
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
Could not open root, trying backup super
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
Could not open root, trying backup super
ERROR: superblock bytenr 274877906944 is larger than device size 188743680000
Could not open root, trying backup super

$> btrfs rescue chunk-recover /dev/nvme0n1p3
Scanning: DONE in dev0
Check chunks successfully with no orphans
Chunk tree recovered successfully

$>btrfs rescue super-recover /dev/nvme0n1p3
All supers are valid, no need to recover

$>btrfs rescue zero-log /dev/nvme0n1p3
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
ERROR: could not open ctree

$>btrfs-find-root /dev/nvme0n1p3
WARNING: cannot read chunk root, continue anyway
Superblock thinks the generation is 49
Superblock thinks the level is 1

$>btrfs check --repair /dev/nvme0n1p3
Starting repair.
Opening filesystem to check...
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
ERROR: cannot open file system


$> btrfs check --repair --init-csum-tree --init-extent-tree /dev/nvme0n1p3
Starting repair.
Opening filesystem to check...
checksum verify failed on 1048576 found 00000067 wanted 0000006E
checksum verify failed on 1048576 found 00000067 wanted 0000006E
bad tree block 1048576, bytenr mismatch, want=1048576, have=6267530653245814412
ERROR: cannot read chunk root
ERROR: cannot open file system




$> uname -a
Linux go4a-HP-Spectre 5.7.0-1-MANJARO #1 SMP PREEMPT Tue Apr 21
20:48:43 UTC 2020 x86_64 GNU/Linux

$> btrfs --version
btrfs-progs v5.6

$>  btrfs fi show
Label: none  uuid: 1e1d4296-9d34-4070-9d8b-18d5dfbad486
        Total devices 1 FS bytes used 85.02GiB
        devid    1 size 97.17GiB used 97.17GiB path /dev/nvme0n1p7

Label: 'data'  uuid: 90e9d74c-3606-4028-9e72-c10e76f44a7c
        Total devices 1 FS bytes used 169.51GiB
        devid    1 size 175.78GiB used 172.02GiB path /dev/nvme0n1p3

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

end of thread, other threads:[~2020-04-26 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 10:24 Help needed to recover from partition resize/move Yegor Yegorov
2020-04-25 20:05 ` Chris Murphy
2020-04-25 21:54   ` Yegor Yegorov
2020-04-26  0:56     ` Chris Murphy
2020-04-26  5:58       ` Andrei Borzenkov
2020-04-26  6:23       ` Yegor Yegorov
2020-04-26  7:36         ` Chris Murphy
2020-04-26 10:03           ` Andrei Borzenkov
2020-04-26 11:04 ` Ferry Toth

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.