Re: Upgraded from Buster to Bullseye, unmountable Btrfs filesystem
From: Qu Wenruo <hidden>
Date: 2021-11-12 00:06:24
On 2021/11/11 21:55, S. wrote:
On 11/11/21 02:11, Qu Wenruo wrote:quoted
quoted
root@OpenMediaVault:~# dd if=/dev/sda3 of=/tmp/mirror1 bs=1 count=16k skip=149487616 16384+0 records in 16384+0 records out 16384 bytes (16 kB, 16 KiB) copied, 0.305711 s, 53.6 kB/sMy bad, this copy should be from /dev/sdb2, not /dev/sda3. No wonder both copy doesn't match.Hi, I really appreciate your help to fix this. I am attaching the new `mirror1` image, generated like this: ------------------------ root@OpenMediaVault:~# dd if=/dev/sdb2 of=/tmp/mirror1 bs=1 count=16k
You missed the "skip=" parameter.
16384+0 records in 16384+0 records out 16384 bytes (16 kB, 16 KiB) copied, 0.274943 s, 59.6 kB/s root@OpenMediaVault:~# rsync -avh /tmp/mirror1 sully@192.168.1.14:/home/sully/Desktop/ Password: sending incremental file list mirror1 sent 16.49K bytes received 35 bytes 3.67K bytes/sec total size is 16.38K speedup is 0.99 ------------------------quoted
# dd if=mirror2 of=/dev/sdb2 bs=1 count=16k skip=149487616 # dd if=mirror2 of=/dev/sda3 bs=1 count=16k skip=170459136
All my bad. The correct command line should be: # dd if=mirror2 of=/dev/sdb2 bs=1 count=16k seek=149487616 # dd if=mirror2 of=/dev/sda3 bs=1 count=16k seek=170459136 Thankfully, even with the wrong command, btrfs has enough space reserved at its beginning, so your fs is still untouched and very safe. Thanks, Qu
After writing out your fixed `mirror2` image with the above commands I get these dmesg errors when attempting to mount it: ------------------------- [ 28.859193] BTRFS info (device sda3): flagging fs with big metadata feature [ 28.866209] BTRFS info (device sda3): disk space caching is enabled [ 28.872507] BTRFS info (device sda3): has skinny extents [ 29.053000] BTRFS critical (device sda3): corrupt leaf: root=9 block=170459136 slot=0, invalid key objectid, have 1101835439474057344 expect to be aligned to 4096 [ 29.067527] BTRFS error (device sda3): block=170459136 read time tree block corruption detected [ 29.120141] BTRFS critical (device sda3): corrupt leaf: root=9 block=170459136 slot=0, invalid key objectid, have 1101835439474057344 expect to be aligned to 4096 [ 29.134781] BTRFS error (device sda3): block=170459136 read time tree block corruption detected [ 29.143568] BTRFS warning (device sda3): failed to read root (objectid=9): -5 [ 29.239873] BTRFS error (device sda3): open_ctree failed ------------------------- Please let me know if you need anything else. Thanks a lot!