Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: John Marrett <johnf@zioncluster.ca>,
	Peter Grandi <pg@btrfs.list.sabi.co.uk>
Cc: Linux fs Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS Metadata Corruption Prevents Scrub and btrfs check
Date: Fri, 17 Mar 2017 15:35:03 -0400	[thread overview]
Message-ID: <e1e39916-e223-9ad6-cc3b-454b3560a8fb@gmail.com> (raw)
In-Reply-To: <CAAafysFBYkAe9pgmnky4-Rxd0r1Xau3rb2ueT0Yu+rjDT9+Atw@mail.gmail.com>

On 2017-03-17 15:25, John Marrett wrote:
> Peter,
>
>> Bad news. That means that probably the disk is damaged and
>> further issues may happen.
>
> This system has a long history, I have had a dual drive failure in the
> past, I managed to recover from that with ddrescue. I've subsequently
> copied the contents of the drives to new disks and expanded them. This
> corruption probably stems from issues in the past and not from issues
> with the current drives.
One quick tip on this particular note, when you replace a drive (or copy 
to new larger drives), run:
btrfs device stats -z
To reset the error counters.  This way, you can be sure that the 
counters count errors for the filesystem as it currently exists without 
leftover counts from any previous drive configuration.

Ideally, the tools would reset them when replacing a device on only that 
device, but even if they did, that wouldn't help with simply copying the 
filesystem to a new disk.

The other aspect to this is scrubbing regularly and monitoring both the 
output of scrub and the error counters, so you know _when_ an error 
happened, not just that it happened at some point in the past. 
Personally, I would suggest checking the error counters at least daily, 
possibly more frequently (it's not an expensive operation, and the 
sooner you know about issues the better) and scrubbing at least monthly 
(I scrub daily on most of my systems, but I don't store a large enough 
amount of data for that to have a significant impact on performance).

  reply	other threads:[~2017-03-17 19:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 12:22 BTRFS Metadata Corruption Prevents Scrub and btrfs check John Marrett
2017-03-17 13:51 ` Peter Grandi
2017-03-17 19:25   ` John Marrett
2017-03-17 19:35     ` Austin S. Hemmelgarn [this message]
2017-03-18  0:48     ` Peter Grandi

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=e1e39916-e223-9ad6-cc3b-454b3560a8fb@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=johnf@zioncluster.ca \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pg@btrfs.list.sabi.co.uk \
    /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