From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Confining scrub to a subvolume
Date: Wed, 30 Dec 2015 18:26:39 +0000 (UTC) [thread overview]
Message-ID: <pan$88aff$ee7e2e75$cb54e003$bedb8f3a@cox.net> (raw)
In-Reply-To: 20151230173949.GH4227@twin.jikos.cz
David Sterba posted on Wed, 30 Dec 2015 18:39:49 +0100 as excerpted:
> On Wed, Dec 30, 2015 at 01:00:34AM +0100, Sree Harsha Totakura wrote:
>> Is it possible to confine scrubbing to a subvolume instead of the whole
>> file system?
>
> No. Srub reads the blocks from devices (without knowing which files own
> them) and compares them to the stored checksums.
Of course if like me you prefer not to have all your data eggs in one
filesystem basket and have used partitions (or LVM) and multiple
independent btrfs, in which case you scrub the filesystem you want, and
don't worry about the others. =:^)
It definitely helps with maintenance time -- on SSDs with all under 50
GiB partitions, scrub times per btrfs are typically under a minute, and
btrfs check and balance times are similarly short. Plus, arranging to
have additional partitions exactly the same size to use as backups works
pretty nicely as well. =:^) OTOH, people routinely report days for
multi-terabyte btrfs maintenance commands on spinning rust. =:^(
Tho I do still have my media partition, along with backups, on reiserfs
on spinning rust. I should think about switching that over one of these
days...
>> [...] Therefore, I would like to scrub the photos and documents
>> subvolumes more often than the backups subvolume. Would this be
>> possible with the current tools?
>
> The closest would be to read the files and look for any reported errors.
That should work. Cat the files to /dev/null and check dmesg. For
single mode it should check the only copy. For raid1/10 or dup, running
two checks, ensuring one is even-PID while the other is odd-PID, should
work to check both copies, since the read-scheduler assigns copy based on
even/odd PID. Errors will show up in dmesg, as well as cat's STDERR.
Pretty clever thinking there. =:^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-12-30 18:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 0:00 Confining scrub to a subvolume Sree Harsha Totakura
2015-12-30 17:39 ` David Sterba
2015-12-30 18:26 ` Duncan [this message]
2015-12-30 19:28 ` Christoph Anton Mitterer
2015-12-30 20:57 ` Duncan
2015-12-30 21:12 ` Christoph Anton Mitterer
2016-01-04 11:01 ` Sree Harsha Totakura
2016-01-06 8:06 ` Duncan
2015-12-30 19:26 ` Christoph Anton Mitterer
2016-01-05 9:40 ` David Sterba
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='pan$88aff$ee7e2e75$cb54e003$bedb8f3a@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.