linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Pierre Couderc <pierre@couderc.eu>,
	linux-btrfs@vger.kernel.org,
	Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Subject: Re: What are the maintenance recommendation ?
Date: Sun, 30 Jun 2019 15:20:22 +0800	[thread overview]
Message-ID: <2798e32e-92cb-529e-e0bc-8e79a3a5ff69@gmx.com> (raw)
In-Reply-To: <f9ceb3c8-b557-16d6-3f21-f2de34dfae9c@couderc.eu>


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



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.

For the maintenance recommends, Zygo Blaxell should has a pretty good
ideas on this topic.

> 
> 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
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.

Thanks,
Qu

> 
> Erros occurs fairly often on big disks...
> 
> Thanks
> 
> PC
> 


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

  reply	other threads:[~2019-06-30  7:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 18:50 What are the maintenance recommendation ? Pierre Couderc
2019-06-30  7:20 ` Qu Wenruo [this message]
2019-07-01 11:11   ` Pierre Couderc
2019-07-01 12:58     ` Qu Wenruo
2019-07-03  4:37 ` Zygo Blaxell
2019-07-05  8:13   ` Pierre Couderc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2798e32e-92cb-529e-e0bc-8e79a3a5ff69@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pierre@couderc.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).