On 2019/7/1 下午7:11, Pierre Couderc wrote:
>
> On 6/30/19 9:20 AM, Qu Wenruo wrote:
>>
>> On 2019/6/30 上午2:50, Pierre Couderc wrote:
>>> 1- Is there a summary of btrfs recommendations for maintenance ?
>>>
>>> I have read somewhere that a monthly btrfs scrub is recommended. Is
>>> there somewhere a reference, an "official" (or not...) guide of all
>>> that is recommended ?
>> I'd say scrub can tell you how bad your disks are.
>> But at least, I'd recommend to do an offline check (btrfs check) and a
>> scrub after every unclean shutdown.
> OK, thank you !
>>
>> For the maintenance recommends, Zygo Blaxell should has a pretty good
>> ideas on this topic.
> Is there some link to these "ideas"...?
>>> I am lost in the wiki...
>>>
>>> 2- Is there a repair guide ? I see all these commands restore, scrub,
>>> rescue. Is there a guide of what to do when a disk has some errors ? The
>>> man does not say when use some command...
>> If you're doing scrub routinely, it should give your a more reliable
>> early warning than SMART.
>>
>> Normally for bad disk(s), you could replace them in advance. E.g when
>> the disk begins to have unrecoverable errors suddenly, it is a good time
^^^ recoverable
>> to replace it.
>>
>> If it's too late that the fs can't be mounted any more, my recommends
>> are:
>> 1. btrfs check --readonly and save the output
>> Sent the output to the mail list for help. The mail list will provide
>> much detailed solution to recover.
>>
>> 2. try to mount the fs RO and save the output
>> Just like step 1.
>>
>> 3. Btrfs-restore if you have enough space
>> The only generic and easy to use way to salvage data.
>>
>> The following methods are only for guys with some btrfs internal
>> knowledge:
>> - mount with usebackroot option
>> - btrfs-find-root paired with btrfs check --chunk-root/--tree-root
>> Both methods are mostly the same, trying to use old roots.
>> Not reliable.
>> - experimental kernel patches to skip extent tree at mount time
>> Kernel equivalent for btrfs-restore. Needs to recompile at least btrfs
>> kernel module. Only works for extent tree related corruption.
>>
> Thank you, I note that
Although I hope you never need any of these recovery steps.
Thanks,
Qu
Attachment:
signature.asc
Description: OpenPGP digital signature
