On 2017年12月31日 03:54, Stirling Westrup wrote:
> Okay, so I've gone back to your earlier suggestion of dumping the
> chunk tree to get info for rebuiling a superblock by hand, but its not
> working.
> 
> /usr/local/bin/btrfs ins dump-tree -t chunk /dev/sdc
> btrfs-progs v4.14
> bytenr mismatch, want=294191104, have=314114048
> Couldn't read tree root
> ERROR: unable to open /dev/sdc
> 
> I get the exact same error (except for device name) for every valid
> device in the FS.

The system is more damaged than your expectation.

Tree root is also corrupted.

Although I could make dump-tree to skip root tree, but even with hand
crafted super, the corrupted tree root is still a big problem.

Thanks,
Qu

> 
> 
> 
> On Thu, Dec 28, 2017 at 9:08 PM, Qu Wenruo <quwenruo.bt...@gmx.com> wrote:
>>
>>
>>
>> Yes, this means you could get the needed device UUID and hand craft a
>> superblock.
>> But I really doubt about the possibility to success.
>>
>> If you really want to do that, there is needed steps for you:
>>
>> 1) Get device info from your existing fs
>>    # btrfs ins dump-tree -t chunk </dev/sda>
>>    And looking for the following thing:
>> ------
>>        item 1 key (DEV_ITEMS DEV_ITEM 2) itemoff 16185 itemsize 98
>>                 devid 2 total_bytes 10737418240 bytes_used 289406976
>>                 io_align 4096 io_width 4096 sector_size 4096 type 0
>>                 generation 0 start_offset 0 dev_group 0
>>                 seek_speed 0 bandwidth 0
>>                 uuid f1d9b288-7865-463f-a65c-ca8b1fbde09b
>>                 fsid 1dd513fb-45f8-404f-ae23-979e3acb78ad
>> ------
>>    Look for the key (DEV_ITEMS DEV_ITEM 2) and grab the "uuid"
>>    "total_bytes" "bytes_used" (other fields are mostly fixed)
>>
>> 2) Fill the fields of dev_item of a good superblock.
>>    If you feel it hard, I could help to do it if you provide the binary
>>    dump of any valid superblock, with above tree dump info.
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to