linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* is this the right place for a question on how to repair a broken btrfs file system?
@ 2019-12-05 20:00 Christian Wimmer
  2019-12-05 20:24 ` Hugo Mills
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Wimmer @ 2019-12-05 20:00 UTC (permalink / raw)
  To: linux-btrfs

Hi, my name is Chris, 

is this the right place for asking on support on how to repair a broken btrfs?

There is no hardware problem, just that the power went out and now I can not mount any more.

Who is the best specialist that could help here?

Of course I already scanned the WEB some hours and tried all not-destructive commands without success.

Thanks for any help,

Chris


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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-05 20:00 is this the right place for a question on how to repair a broken btrfs file system? Christian Wimmer
@ 2019-12-05 20:24 ` Hugo Mills
  2019-12-05 20:42   ` Christian Wimmer
  2019-12-05 22:01   ` Christian Wimmer
  0 siblings, 2 replies; 10+ messages in thread
From: Hugo Mills @ 2019-12-05 20:24 UTC (permalink / raw)
  To: Christian Wimmer; +Cc: linux-btrfs

On Thu, Dec 05, 2019 at 05:00:40PM -0300, Christian Wimmer wrote:
> Hi, my name is Chris, 
> 
> is this the right place for asking on support on how to repair a broken btrfs?
> 
> There is no hardware problem, just that the power went out and now I can not mount any more.

   What does dmesg say when you try to mount the FS?

> Who is the best specialist that could help here?
> 
> Of course I already scanned the WEB some hours and tried all not-destructive commands without success.

   "Non-destructive" is a fairly limited of things, and most of the
easily-findable advice on the web about fixing btrfs filesystems is at
best badly misguided, if not actively wrong. :(

   Can you also tell us exactly what you ran?

   Hugo.

-- 
Hugo Mills             | Is it true that "last known good" on Windows XP
hugo@... carfax.org.uk | boots into CP/M?
http://carfax.org.uk/  |
PGP: E2AB1DE4          |                                       Adrian Bridgett

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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-05 20:24 ` Hugo Mills
@ 2019-12-05 20:42   ` Christian Wimmer
  2019-12-06  0:04     ` Qu Wenruo
  2019-12-05 22:01   ` Christian Wimmer
  1 sibling, 1 reply; 10+ messages in thread
From: Christian Wimmer @ 2019-12-05 20:42 UTC (permalink / raw)
  To: Hugo Mills; +Cc: linux-btrfs

Hi Hugo,

I am so happy to hear your voice!

I would be very happy if you could help me get my filesystem back working.

Here is my setup (little special):

Mac Mini 2018
Inside Mac Mini I run Parallels and inside Parallels I run Suse 15.2
Promise Pegasus R8 with 32TB, divided into a 24TB and 4TB partition formatted under Mac OS.
Inside Promise Pegasus Storage (the 24TB Partition) I have the virtual disc that is attached to the Parallels Linux.
This virtual disc is formatted with btrfs and appears in Linux under:

Disk /dev/sde: 11.7 TiB, 12884901888000 bytes, 25165824000 sectors
Disk model: Linux_raid5_12tb
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 2EFA3FA4-8849-40CE-A065-6CDF3581894B

Device     Start         End     Sectors  Size Type
/dev/sde1   2048 25165821951 25165819904 11.7T Linux filesystem


When I try to mount it this happens:

# mount /dev/sde1 /home/promise/
mount: /home/promise: wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.
# 

dmesg says:
[ 2376.180819] BTRFS info (device sde1): disk space caching is enabled
[ 2376.180820] BTRFS info (device sde1): has skinny extents
[ 2376.275469] BTRFS error (device sde1): bad tree block start 14275350892879035392 5349895454720
[ 2376.283339] BTRFS error (device sde1): bad tree block start 14275350892879035392 5349895454720
[ 2376.344799] BTRFS error (device sde1): open_ctree failed


The command btrfs restore tells:

linux-ze6w:/home/chris # btrfs restore -x /dev/sde1 test/
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
Could not open root, trying backup super
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
Could not open root, trying backup super
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
Could not open root, trying backup super
linux-ze6w:/home/chris # btrfs restore -v /dev/sde1 test/


Now what I did in order for all this to happen was the following:

I was editing a file inside Linux with sublime_text.
Inside this editor I wanted to "replay macro” and the command for it is CTRL-ALT-SHIFT-Q which is the same command for rebooting the MAC.
When I pressed that command it was already too late and my Mac began to reboot, doing a suspend of the virtual machine.
So far so good.
I rebooted the MAC and started Parallels and the suspended Linux woke up again and I entered in the /home/promise directory where /dev/sde1 is mounted and I say only some 
files instead of all 5TB data. Some directories were empty, some had broken links and so on.
So I discovered that something went wrong during reboot and thus I shut down the linux.
When I started linux again, I could not mount any more the promise.

Please help me to get out of this.

I did a backup of the 5,5TB hard disc file of Parallels, so we can play a little.

What would you suggest to do?
Actually I do not need all files of that disc, only some. IS there any chance to mount and copy what I need?

Thanks a lot for your patience and your time for reading this Hugo.

Best regards,

Chris




> On 5. Dec 2019, at 17:24, Hugo Mills <hugo@carfax.org.uk> wrote:
> 
> On Thu, Dec 05, 2019 at 05:00:40PM -0300, Christian Wimmer wrote:
>> Hi, my name is Chris, 
>> 
>> is this the right place for asking on support on how to repair a broken btrfs?
>> 
>> There is no hardware problem, just that the power went out and now I can not mount any more.
> 
>   What does dmesg say when you try to mount the FS?
> 
>> Who is the best specialist that could help here?
>> 
>> Of course I already scanned the WEB some hours and tried all not-destructive commands without success.
> 
>   "Non-destructive" is a fairly limited of things, and most of the
> easily-findable advice on the web about fixing btrfs filesystems is at
> best badly misguided, if not actively wrong. :(
> 
>   Can you also tell us exactly what you ran?
> 
>   Hugo.
> 
> -- 
> Hugo Mills             | Is it true that "last known good" on Windows XP
> hugo@... carfax.org.uk | boots into CP/M?
> http://carfax.org.uk/  |
> PGP: E2AB1DE4          |                                       Adrian Bridgett


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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-05 20:24 ` Hugo Mills
  2019-12-05 20:42   ` Christian Wimmer
@ 2019-12-05 22:01   ` Christian Wimmer
  1 sibling, 0 replies; 10+ messages in thread
From: Christian Wimmer @ 2019-12-05 22:01 UTC (permalink / raw)
  To: Hugo Mills; +Cc: linux-btrfs

Hi Hugo,


just for your information. I run following command on the  backup file:

# btrfs rescue chunk-recover -v /dev/sde1
All Devices:
        Device: id = 1, name = /dev/sde1

Scanning: 575601561600 in dev0chunk-recover.c:129: process_extent_buffer: BUG_ON `exist->nmirrors >= BTRFS_MAX_MIRRORS` triggered, value 1
btrfs(+0x6d3b6)[0x56428c4f03b6]
btrfs(+0x6de31)[0x56428c4f0e31]
/lib64/libpthread.so.0(+0x7569)[0x7f351bee9569]
/lib64/libc.so.6(clone+0x3f)[0x7f351bc209ef]
Aborted (core dumped)


Seems to be a bug in the btrfs program.

# uname -a
Linux linux-ze6w 4.12.14-lp151.28.13-default #1 SMP Wed Aug 7 07:20:16 UTC 2019 (0c09ad2) x86_64 x86_64 x86_64 GNU/Linux
# btrfs version
btrfs-progs v4.19.1 


Best regards,

Chris


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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-05 20:42   ` Christian Wimmer
@ 2019-12-06  0:04     ` Qu Wenruo
  2019-12-06  1:32       ` Christian Wimmer
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qu Wenruo @ 2019-12-06  0:04 UTC (permalink / raw)
  To: Christian Wimmer, Hugo Mills; +Cc: linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 6721 bytes --]



On 2019/12/6 上午4:42, Christian Wimmer wrote:
> Hi Hugo,
> 
> I am so happy to hear your voice!
> 
> I would be very happy if you could help me get my filesystem back working.
> 
> Here is my setup (little special):
> 
> Mac Mini 2018
> Inside Mac Mini I run Parallels and inside Parallels I run Suse 15.2
> Promise Pegasus R8 with 32TB, divided into a 24TB and 4TB partition formatted under Mac OS.
> Inside Promise Pegasus Storage (the 24TB Partition) I have the virtual disc that is attached to the Parallels Linux.
> This virtual disc is formatted with btrfs and appears in Linux under:
> 
> Disk /dev/sde: 11.7 TiB, 12884901888000 bytes, 25165824000 sectors
> Disk model: Linux_raid5_12tb
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: gpt
> Disk identifier: 2EFA3FA4-8849-40CE-A065-6CDF3581894B
> 
> Device     Start         End     Sectors  Size Type
> /dev/sde1   2048 25165821951 25165819904 11.7T Linux filesystem
> 
> 
> When I try to mount it this happens:
> 
> # mount /dev/sde1 /home/promise/
> mount: /home/promise: wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.
> # 
> 
> dmesg says:
> [ 2376.180819] BTRFS info (device sde1): disk space caching is enabled
> [ 2376.180820] BTRFS info (device sde1): has skinny extents
> [ 2376.275469] BTRFS error (device sde1): bad tree block start 14275350892879035392 5349895454720
> [ 2376.283339] BTRFS error (device sde1): bad tree block start 14275350892879035392 5349895454720
> [ 2376.344799] BTRFS error (device sde1): open_ctree failed

For btrfs, we'd recommend to use at least latest LTS kernel.

Although SUSE is supporting BTRFS, its SLE kernel is still a little
older, not the best place to start for data salvage.

For your case, later kernel will output which tree is corrupted, so we
could provide a lot of good info.

> 
> 
> The command btrfs restore tells:
> 
> linux-ze6w:/home/chris # btrfs restore -x /dev/sde1 test/
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
> Couldn't setup device tree

Device tree is completely fine to lose. We can easily rebuild it if it's
the only corruption.

Would you please try the following dump?

# btrfs ins dump-tree -t root /dev/sde1 2>&1
# btrfs ins dump-tree -t extent /dev/sde1 2>&1 >/dev/null
# btrfs ins dump-tree -t chunk /dev/sde1
# btrfs ins dump-tree -t 5 /dev/sde1 2>&1 >/dev/null
# btrfs ins dump-tree -t <subvol_id> /dev/sde1 2>&1 >/dev/null

Except the chunk and root tree dump, we only care about the stderr, to
make sure no tree corruption.

If no other error happened, we can easily ignore device tree error.


Furthermore, for newer btrfs-progs, we will automatically ignore device
tree if we can't read it.
Thus it can continue salvaging your data.

Thanks,
Qu

> Could not open root, trying backup super
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
> Couldn't setup device tree
> Could not open root, trying backup super
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
> Couldn't setup device tree
> Could not open root, trying backup super
> linux-ze6w:/home/chris # btrfs restore -v /dev/sde1 test/
> 
> 
> Now what I did in order for all this to happen was the following:
> 
> I was editing a file inside Linux with sublime_text.
> Inside this editor I wanted to "replay macro” and the command for it is CTRL-ALT-SHIFT-Q which is the same command for rebooting the MAC.
> When I pressed that command it was already too late and my Mac began to reboot, doing a suspend of the virtual machine.
> So far so good.
> I rebooted the MAC and started Parallels and the suspended Linux woke up again and I entered in the /home/promise directory where /dev/sde1 is mounted and I say only some 
> files instead of all 5TB data. Some directories were empty, some had broken links and so on.
> So I discovered that something went wrong during reboot and thus I shut down the linux.
> When I started linux again, I could not mount any more the promise.
> 
> Please help me to get out of this.
> 
> I did a backup of the 5,5TB hard disc file of Parallels, so we can play a little.
> 
> What would you suggest to do?
> Actually I do not need all files of that disc, only some. IS there any chance to mount and copy what I need?
> 
> Thanks a lot for your patience and your time for reading this Hugo.
> 
> Best regards,
> 
> Chris
> 
> 
> 
> 
>> On 5. Dec 2019, at 17:24, Hugo Mills <hugo@carfax.org.uk> wrote:
>>
>> On Thu, Dec 05, 2019 at 05:00:40PM -0300, Christian Wimmer wrote:
>>> Hi, my name is Chris, 
>>>
>>> is this the right place for asking on support on how to repair a broken btrfs?
>>>
>>> There is no hardware problem, just that the power went out and now I can not mount any more.
>>
>>   What does dmesg say when you try to mount the FS?
>>
>>> Who is the best specialist that could help here?
>>>
>>> Of course I already scanned the WEB some hours and tried all not-destructive commands without success.
>>
>>   "Non-destructive" is a fairly limited of things, and most of the
>> easily-findable advice on the web about fixing btrfs filesystems is at
>> best badly misguided, if not actively wrong. :(
>>
>>   Can you also tell us exactly what you ran?
>>
>>   Hugo.
>>
>> -- 
>> Hugo Mills             | Is it true that "last known good" on Windows XP
>> hugo@... carfax.org.uk | boots into CP/M?
>> http://carfax.org.uk/  |
>> PGP: E2AB1DE4          |                                       Adrian Bridgett
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-06  0:04     ` Qu Wenruo
@ 2019-12-06  1:32       ` Christian Wimmer
       [not found]       ` <BD72A51F-A536-428C-9993-91A43C99EE30@icloud.com>
       [not found]       ` <DBA30D34-E186-4359-A8C5-C13C870F1D81@icloud.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Christian Wimmer @ 2019-12-06  1:32 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Hugo Mills, linux-btrfs

Hi Hugo and Qu,

here the output from the commands:

# btrfs ins dump-tree -t root /dev/sde1 2>&1
btrfs-progs v4.19.1 
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
ERROR: unable to open /dev/sde1
# 



# btrfs ins dump-tree -t extent /dev/sde1 2>&1 >/dev/null
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
ERROR: unable to open /dev/sde1
# 


# btrfs ins dump-tree -t chunk /dev/sde1
btrfs-progs v4.19.1 
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
ERROR: unable to open /dev/sde1
# 


# btrfs ins dump-tree -t 5 /dev/sde1 2>&1 >/dev/null
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
bad tree block 5349895454720, bytenr mismatch, want=5349895454720, have=14275350892879035392
Couldn't setup device tree
ERROR: unable to open /dev/sde1
# 


I will try to setup a newer kernel. Which Distro you would suggest for this purpose?
The idea is to download and install a small linux just for recovery purpose for now.

Thanks,

Chris


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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
       [not found]       ` <BD72A51F-A536-428C-9993-91A43C99EE30@icloud.com>
@ 2019-12-06  2:12         ` Qu Wenruo
  2019-12-06  2:13         ` Qu Wenruo
  1 sibling, 0 replies; 10+ messages in thread
From: Qu Wenruo @ 2019-12-06  2:12 UTC (permalink / raw)
  To: Christian Wimmer; +Cc: Hugo Mills, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 2799 bytes --]



On 2019/12/6 上午9:31, Christian Wimmer wrote:
> Hi Hugo and Qu,
> 
> here the output from the commands:
> 
> # btrfs ins dump-tree -t root /dev/sde1 2>&1
> btrfs-progs v4.19.1

Too old. Please use latest version btrfs-progs.

Just as mentioned, SLE is not a good choice for btrfs-progs.

Thanks,
Qu

> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> 
> # btrfs ins dump-tree -t extent /dev/sde1 2>&1 >/dev/null
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t chunk /dev/sde1
> btrfs-progs v4.19.1 
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t 5 /dev/sde1 2>&1 >/dev/null
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> I will try to setup a newer kernel. Which Distro you would suggest for
> this purpose?
> The idea is to download and install a small linux just for recovery
> purpose for now.
> 
> Thanks,
> 
> Chris
> 
> 
> 
>> On 5. Dec 2019, at 21:04, Qu Wenruo <quwenruo.btrfs@gmx.com
>> <mailto:quwenruo.btrfs@gmx.com>> wrote:
>>
>> btrfs ins dump-tree -t root /dev/sde1 2>&1
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
       [not found]       ` <BD72A51F-A536-428C-9993-91A43C99EE30@icloud.com>
  2019-12-06  2:12         ` Qu Wenruo
@ 2019-12-06  2:13         ` Qu Wenruo
  1 sibling, 0 replies; 10+ messages in thread
From: Qu Wenruo @ 2019-12-06  2:13 UTC (permalink / raw)
  To: Christian Wimmer; +Cc: Hugo Mills, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 2959 bytes --]



On 2019/12/6 上午9:31, Christian Wimmer wrote:
> Hi Hugo and Qu,
> 
> here the output from the commands:
> 
> # btrfs ins dump-tree -t root /dev/sde1 2>&1
> btrfs-progs v4.19.1 
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> 
> # btrfs ins dump-tree -t extent /dev/sde1 2>&1 >/dev/null
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t chunk /dev/sde1
> btrfs-progs v4.19.1 
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t 5 /dev/sde1 2>&1 >/dev/null
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> checksum verify failed on 5349895454720 found B80B9FA8 wanted C61C3C00
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> I will try to setup a newer kernel. Which Distro you would suggest for
> this purpose?
> The idea is to download and install a small linux just for recovery
> purpose for now.

Archlinux ISO is good enough if you only want latest btrfs-progs.

For kernel it's just several weeks older, but for your case, kernel
isn't a big concern.
As either you will need to compile kernel with out-of-tree patches, or
Arch kernel will be more than enough.

Thanks,
Qu

> 
> Thanks,
> 
> Chris
> 
> 
> 
>> On 5. Dec 2019, at 21:04, Qu Wenruo <quwenruo.btrfs@gmx.com
>> <mailto:quwenruo.btrfs@gmx.com>> wrote:
>>
>> btrfs ins dump-tree -t root /dev/sde1 2>&1
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
       [not found]       ` <DBA30D34-E186-4359-A8C5-C13C870F1D81@icloud.com>
@ 2019-12-06  3:49         ` Qu Wenruo
  2019-12-06 21:28           ` Christian Wimmer
  0 siblings, 1 reply; 10+ messages in thread
From: Qu Wenruo @ 2019-12-06  3:49 UTC (permalink / raw)
  To: Christian Wimmer; +Cc: Hugo Mills, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 2721 bytes --]



On 2019/12/6 上午11:40, Christian Wimmer wrote:
> Hi Hugo and Qu,
> 
> I installed Arch Linux latest version and here are the results:
> 
> 
> # btrfs ins dump-tree -t root /dev/sde1 2>&1
> btrfs-progs v5.3.1 
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 

My bad, after looking into the code, we skipped all other trees but not
device tree.
That why even latest btrfs-progs won't work.

I have sent a patch to you, which you can apply it on btrfs-progs v5.4,
and compile it (no need to install), then use that compiled btrfs
command to retry.

For recompile btrfs-progs, you may need the following packages (and
groups) under Arch:

# pacman -S base-devel e2fsprogs asciidoc xmlto xmltoman attr libutil-linux

Then you should be able to continue.

Sorry for the inconvenience.

Thanks,
Qu

> 
> 
> 
> # btrfs ins dump-tree -t extent /dev/sde1 2>&1 >/dev/null
> btrfs-progs v5.3.1 
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t chunk /dev/sde1
> btrfs-progs v5.3.1 
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> 
> # btrfs ins dump-tree -t 5 /dev/sde1 2>&1 >/dev/null
> btrfs-progs v5.3.1 
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> checksum verify failed on 5349895454720 found 000000A8 wanted 00000000
> bad tree block 5349895454720, bytenr mismatch, want=5349895454720,
> have=14275350892879035392
> Couldn't setup device tree
> ERROR: unable to open /dev/sde1
> # 
> 
> What could be the next steps?
> 
> 
> Thanks a lot for your patience and help!
> 
> Chris
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

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

* Re: is this the right place for a question on how to repair a broken btrfs file system?
  2019-12-06  3:49         ` Qu Wenruo
@ 2019-12-06 21:28           ` Christian Wimmer
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Wimmer @ 2019-12-06 21:28 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Hugo Mills, linux-btrfs

Hi Qu and Hugo,

I think all the emails to you were rejected by the your mail server.

For this reason I am writing here in plain text what happened.

I could succeed in compiling the latest version of btrfs-progs and I applied the patch you sent and I got a lot of output.

How can I pass this output to you for analysis?

Thanks for your help,

Chris


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

end of thread, other threads:[~2019-12-06 21:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 20:00 is this the right place for a question on how to repair a broken btrfs file system? Christian Wimmer
2019-12-05 20:24 ` Hugo Mills
2019-12-05 20:42   ` Christian Wimmer
2019-12-06  0:04     ` Qu Wenruo
2019-12-06  1:32       ` Christian Wimmer
     [not found]       ` <BD72A51F-A536-428C-9993-91A43C99EE30@icloud.com>
2019-12-06  2:12         ` Qu Wenruo
2019-12-06  2:13         ` Qu Wenruo
     [not found]       ` <DBA30D34-E186-4359-A8C5-C13C870F1D81@icloud.com>
2019-12-06  3:49         ` Qu Wenruo
2019-12-06 21:28           ` Christian Wimmer
2019-12-05 22:01   ` Christian Wimmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).