* Re: Re: btrfs repair and zero-log doesn't seem to do anything
@ 2016-12-05 3:49 Calle Kabo
2016-12-05 5:07 ` Qu Wenruo
0 siblings, 1 reply; 3+ messages in thread
From: Calle Kabo @ 2016-12-05 3:49 UTC (permalink / raw)
To: linux-btrfs
> IMHO there will be 2 alternative method to recover:
>
> 1) Btrfs restore
> The safest method to recover files.
> Although it may need a lot of space to restore recovered data.
>
> 2) Btrfs check --init-extent-tree
> This will use fs tree to try to rebuild the extent tree.
> I don't believe it's only extent tree corrupted, so this may make
> things even *worse*, but at least it won't take several TBs to
> recover data which you may already have backup.
Thanks! I tested restoring a small directory and it worked beautifully.
Is there any way to list the files/directories? I don't think I can
remember all of the paths that were on there...
/Calle
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: btrfs repair and zero-log doesn't seem to do anything
2016-12-05 3:49 Re: btrfs repair and zero-log doesn't seem to do anything Calle Kabo
@ 2016-12-05 5:07 ` Qu Wenruo
2016-12-05 5:50 ` Calle Kabo
0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2016-12-05 5:07 UTC (permalink / raw)
To: Calle Kabo, linux-btrfs
At 12/05/2016 11:49 AM, Calle Kabo wrote:
>
>> IMHO there will be 2 alternative method to recover:
>>
>> 1) Btrfs restore
>> The safest method to recover files.
>> Although it may need a lot of space to restore recovered data.
>>
>> 2) Btrfs check --init-extent-tree
>> This will use fs tree to try to rebuild the extent tree.
>> I don't believe it's only extent tree corrupted, so this may make
>> things even *worse*, but at least it won't take several TBs to
>> recover data which you may already have backup.
>
> Thanks! I tested restoring a small directory and it worked beautifully.
> Is there any way to list the files/directories? I don't think I can
> remember all of the paths that were on there...
>
> /Calle
I'm not familiar with btrfs-restore tool.
But a quick glance at the man page shows there is some options like
-r <rooid>
--path-regex <path>
-d
--list-roots
-D
Those options would help.
Maybe -D would list all the file structures?
And if btrfs restore works perfectly fine without even a problem,
then it seems to indicate that only extent tree is corrupted.
In that case, --init-extent-tree may have a little chance to recover the fs.
(But under most case, maybe over 50%?, it may make things worse)
Thanks,
Qu
> --
> 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] 3+ messages in thread
* Re: btrfs repair and zero-log doesn't seem to do anything
2016-12-05 5:07 ` Qu Wenruo
@ 2016-12-05 5:50 ` Calle Kabo
0 siblings, 0 replies; 3+ messages in thread
From: Calle Kabo @ 2016-12-05 5:50 UTC (permalink / raw)
To: linux-btrfs
> Maybe -D would list all the file structures?
I tried that first but didn't see anything, but when combined with -v it
shows the files that would have been restored.
e.g.
# btrfs restore -v -D --path-regex '^/(|Documents(|/.*))$'
/dev/mapper/data-0 /tmp
Awesome, big thanks for your help!
/Calle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-05 5:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 3:49 Re: btrfs repair and zero-log doesn't seem to do anything Calle Kabo
2016-12-05 5:07 ` Qu Wenruo
2016-12-05 5:50 ` Calle Kabo
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).