All of lore.kernel.org
 help / color / mirror / Atom feed
* Corruption on Big Endian System
@ 2018-03-26 15:00 Ashu Tiwary
  2018-03-27  3:45 ` Anand Jain
  2018-03-27 12:13 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Ashu Tiwary @ 2018-03-26 15:00 UTC (permalink / raw)
  To: linux-btrfs

It appears my system may have hit the issue reverted here (
https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html
) ( [PATCH] Revert "btrfs: use proper endianness accessors for
super_copy" ); system is an IBM OpenPower 720 (Big Endian) running
Fedora 27; kernel was at 4.15.9; attempting to reboot after updating
system (including kernel to 4.15.10) caused system to not be able to
boot:

=====
         Mounting /sysroot...
[   34.644721] BTRFS warning (device dm-3): suspicious: generation <
chunk_root_generation: 15959351903540740096 < 17261735521269317632
[   34.644761] BTRFS info (device dm-3): disk space caching is enabled
[   34.644771] BTRFS info (device dm-3): has skinny extents
[   34.645925] BTRFS critical (device dm-3): unable to find logical
71472550772736 length 65536
[   34.645941] BTRFS critical (device dm-3): unable to find logical
71472550772736 length 65536
[   34.645952] BTRFS error (device dm-3): failed to read chunk root
[   34.807156] BTRFS error (device dm-3): open_ctree failed
[FAILED] Failed to mount /sysroot.
=====

It appears there is a manual method available to repair the corrupted
superblock: can that be made available?

Thanks,

-Ashu

--
Ashu Tiwary
ashuatibm@gmail.com

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

* Re: Corruption on Big Endian System
  2018-03-26 15:00 Corruption on Big Endian System Ashu Tiwary
@ 2018-03-27  3:45 ` Anand Jain
  2018-03-27 12:13 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: Anand Jain @ 2018-03-27  3:45 UTC (permalink / raw)
  To: Ashu Tiwary, linux-btrfs




On 03/26/2018 11:00 PM, Ashu Tiwary wrote:
> It appears my system may have hit the issue reverted here (
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html
> ) ( [PATCH] Revert "btrfs: use proper endianness accessors for
> super_copy" ); system is an IBM OpenPower 720 (Big Endian) running
> Fedora 27; kernel was at 4.15.9; attempting to reboot after updating
> system (including kernel to 4.15.10) caused system to not be able to
> boot:

  Sorry for the inconvenience. Can you please provide:
    btrfs in dump-super -af <dev>

  David has a tool to fix it. I can't find in his github. David?

Thanks, Anand

> =====
>           Mounting /sysroot...
> [   34.644721] BTRFS warning (device dm-3): suspicious: generation <
> chunk_root_generation: 15959351903540740096 < 17261735521269317632
> [   34.644761] BTRFS info (device dm-3): disk space caching is enabled
> [   34.644771] BTRFS info (device dm-3): has skinny extents
> [   34.645925] BTRFS critical (device dm-3): unable to find logical
> 71472550772736 length 65536
> [   34.645941] BTRFS critical (device dm-3): unable to find logical
> 71472550772736 length 65536
> [   34.645952] BTRFS error (device dm-3): failed to read chunk root
> [   34.807156] BTRFS error (device dm-3): open_ctree failed
> [FAILED] Failed to mount /sysroot.
> =====
> 
> It appears there is a manual method available to repair the corrupted
> superblock: can that be made available?
> 
> Thanks,
> 
> -Ashu
> 
> --
> Ashu Tiwary
> ashuatibm@gmail.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: Corruption on Big Endian System
  2018-03-26 15:00 Corruption on Big Endian System Ashu Tiwary
  2018-03-27  3:45 ` Anand Jain
@ 2018-03-27 12:13 ` David Sterba
  2018-03-29  3:27   ` Ashu Tiwary
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2018-03-27 12:13 UTC (permalink / raw)
  To: Ashu Tiwary; +Cc: linux-btrfs

On Mon, Mar 26, 2018 at 10:00:04AM -0500, Ashu Tiwary wrote:
> It appears my system may have hit the issue reverted here (
> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html
> ) ( [PATCH] Revert "btrfs: use proper endianness accessors for
> super_copy" ); system is an IBM OpenPower 720 (Big Endian) running
> Fedora 27; kernel was at 4.15.9; attempting to reboot after updating
> system (including kernel to 4.15.10) caused system to not be able to
> boot:
> 
> =====
>          Mounting /sysroot...
> [   34.644721] BTRFS warning (device dm-3): suspicious: generation <
> chunk_root_generation: 15959351903540740096 < 17261735521269317632
> [   34.644761] BTRFS info (device dm-3): disk space caching is enabled
> [   34.644771] BTRFS info (device dm-3): has skinny extents
> [   34.645925] BTRFS critical (device dm-3): unable to find logical
> 71472550772736 length 65536
> [   34.645941] BTRFS critical (device dm-3): unable to find logical
> 71472550772736 length 65536
> [   34.645952] BTRFS error (device dm-3): failed to read chunk root
> [   34.807156] BTRFS error (device dm-3): open_ctree failed
> [FAILED] Failed to mount /sysroot.
> =====
> 
> It appears there is a manual method available to repair the corrupted
> superblock: can that be made available?

Yes, details below.

Quick check from your logs:

chunk_root_generation: 15959351903540740096 = 0xdd7b020000000000
should be: 162781 = 0x0x27bdd

tree root block pointer: 71472550772736 = 0x410100000000
should be: 21037056 = 0x1410000

The tool is available in the branch devel in my repos.  Setup repository
unless you already have one:

$ git clone git://github.com/kdave/btrfs-progs
$ cd btrfs-progs
$ git checkout devel
$ ./autogen.sh
$ ./configure

Build the tool:

$ make btrfs-sb-mod

Use it (replace the path with the real one) and save the output in case
something goes unexpectedly wrong:

device=/path/to/the/device
./btrfs-sb-mod $device root @0
./btrfs-sb-mod $device generation @0
./btrfs-sb-mod $device chunk_root @0
./btrfs-sb-mod $device chunk_root_generation @0
./btrfs-sb-mod $device cache_generation @0
./btrfs-sb-mod $device uuid_tree_generation @0

It prints the current and new values so it's reversible, besides that
the byteswap can be run twice to get back to the starting point.

Then the filesystem should be mountable again.

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

* Re: Corruption on Big Endian System
  2018-03-27 12:13 ` David Sterba
@ 2018-03-29  3:27   ` Ashu Tiwary
  0 siblings, 0 replies; 4+ messages in thread
From: Ashu Tiwary @ 2018-03-29  3:27 UTC (permalink / raw)
  To: linux-btrfs

On Tue, Mar 27, 2018 at 7:13 AM, David Sterba <dsterba@suse.cz> wrote:
> On Mon, Mar 26, 2018 at 10:00:04AM -0500, Ashu Tiwary wrote:
>> It appears my system may have hit the issue reverted here (
>> https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg74621.html
>> ) ( [PATCH] Revert "btrfs: use proper endianness accessors for
>> super_copy" ); system is an IBM OpenPower 720 (Big Endian) running
>> Fedora 27; kernel was at 4.15.9; attempting to reboot after updating
>> system (including kernel to 4.15.10) caused system to not be able to
>> boot:
>>
>> =====
>>          Mounting /sysroot...
>> [   34.644721] BTRFS warning (device dm-3): suspicious: generation <
>> chunk_root_generation: 15959351903540740096 < 17261735521269317632
>> [   34.644761] BTRFS info (device dm-3): disk space caching is enabled
>> [   34.644771] BTRFS info (device dm-3): has skinny extents
>> [   34.645925] BTRFS critical (device dm-3): unable to find logical
>> 71472550772736 length 65536
>> [   34.645941] BTRFS critical (device dm-3): unable to find logical
>> 71472550772736 length 65536
>> [   34.645952] BTRFS error (device dm-3): failed to read chunk root
>> [   34.807156] BTRFS error (device dm-3): open_ctree failed
>> [FAILED] Failed to mount /sysroot.
>> =====
>>
>> It appears there is a manual method available to repair the corrupted
>> superblock: can that be made available?
>
> Yes, details below.
>
> Quick check from your logs:
>
> chunk_root_generation: 15959351903540740096 = 0xdd7b020000000000
> should be: 162781 = 0x0x27bdd
>
> tree root block pointer: 71472550772736 = 0x410100000000
> should be: 21037056 = 0x1410000
>
> The tool is available in the branch devel in my repos.  Setup repository
> unless you already have one:
>
> $ git clone git://github.com/kdave/btrfs-progs
> $ cd btrfs-progs
> $ git checkout devel
> $ ./autogen.sh
> $ ./configure
>
> Build the tool:
>
> $ make btrfs-sb-mod
>
> Use it (replace the path with the real one) and save the output in case
> something goes unexpectedly wrong:
>
> device=/path/to/the/device
> ./btrfs-sb-mod $device root @0
> ./btrfs-sb-mod $device generation @0
> ./btrfs-sb-mod $device chunk_root @0
> ./btrfs-sb-mod $device chunk_root_generation @0
> ./btrfs-sb-mod $device cache_generation @0
> ./btrfs-sb-mod $device uuid_tree_generation @0
>
> It prints the current and new values so it's reversible, besides that
> the byteswap can be run twice to get back to the starting point.
>
> Then the filesystem should be mountable again.


Hi,

That utility worked perfectly (it took me some time as I had to find
another system on which to build the recovery tool).

Thanks,

-Ashu

--
Ashu Tiwary
ashuatibm@gmail.com

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

end of thread, other threads:[~2018-03-29  3:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 15:00 Corruption on Big Endian System Ashu Tiwary
2018-03-27  3:45 ` Anand Jain
2018-03-27 12:13 ` David Sterba
2018-03-29  3:27   ` Ashu Tiwary

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.