* [BUG?] btrfs scrub -d doesn't scan all devices
@ 2015-12-27 3:38 Christoph Anton Mitterer
2015-12-27 7:22 ` Duncan
0 siblings, 1 reply; 9+ messages in thread
From: Christoph Anton Mitterer @ 2015-12-27 3:38 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
Hey.
I've just noted the following behaviour:
# btrfs scrub start -Bdr /
scrub device /dev/sda2 (id 1) done
scrub started at Sun Dec 27 01:59:05 2015 and finished after 00:04:04
total bytes scrubbed: 29.39GiB with 0 errors
scrub device /dev/sdb2 (id 2) done
scrub started at Sun Dec 27 01:59:05 2015 and finished after 00:04:08
total bytes scrubbed: 29.39GiB with 0 errors
=> that works as expected
However:
# btrfs scrub start -Bdr /dev/disk/by-label/system
scrub device /dev/sdb2 (id 2) done
scrub started at Sun Dec 27 01:53:18 2015 and finished after 00:04:01
total bytes scrubbed: 29.37GiB with 0 errors
=> seems to scan only sdb2 (which is where /dev/disk/by-label/system points to)
at least, no output is given for sda2
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-27 3:38 [BUG?] btrfs scrub -d doesn't scan all devices Christoph Anton Mitterer
@ 2015-12-27 7:22 ` Duncan
2015-12-28 1:21 ` Christoph Anton Mitterer
0 siblings, 1 reply; 9+ messages in thread
From: Duncan @ 2015-12-27 7:22 UTC (permalink / raw)
To: linux-btrfs
Christoph Anton Mitterer posted on Sun, 27 Dec 2015 04:38:56 +0100 as
excerpted:
> I've just noted the following behaviour:
>
> # btrfs scrub start -Bdr /
> scrub device /dev/sda2 (id 1) done
> scrub started at Sun Dec 27 01:59:05 2015
> and finished after 00:04:04
> total bytes scrubbed: 29.39GiB with 0 errors
> scrub device /dev/sdb2 (id 2) done
> scrub started at Sun Dec 27 01:59:05 2015
> and finished after 00:04:08
> total bytes scrubbed: 29.39GiB with 0 errors
>
> => that works as expected
>
> However:
> # btrfs scrub start -Bdr /dev/disk/by-label/system
> scrub device /dev/sdb2 (id 2) done
> scrub started at Sun Dec 27 01:53:18 2015
> and finished after 00:04:01
> total bytes scrubbed: 29.37GiB with 0 errors
> => seems to scan only sdb2 (which is where /dev/disk/by-label/system
> points to) at least, no output is given for sda2
I'd call that NOTABUG. As the btrfs-scrub manpage suggests:
* When you point scrub at a mountpoint, it scrubs all devices composing
that filesystem.
(The manpage specifically says "all devices of the filesystem identified
by <path>". Emphasis on _ALL_DEVICES_ if given a normal path.)
* When you point scrub at a specific device, it scrubs that specific
device.
(The manpage continues ... "or on a single <device>." Emphasis on
_SINGLE_DEVICE_ if given a device node.)
Since /dev/disk/by-*/* are symlinks to various block-device nodes, it
follows that if you point scrub at them, only the device pointed at is
scrubbed, exactly as one might expect based on the manpage.
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-27 7:22 ` Duncan
@ 2015-12-28 1:21 ` Christoph Anton Mitterer
2015-12-28 1:25 ` Christoph Anton Mitterer
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Christoph Anton Mitterer @ 2015-12-28 1:21 UTC (permalink / raw)
To: Duncan, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]
On Sun, 2015-12-27 at 07:22 +0000, Duncan wrote:
> I'd call that NOTABUG. As the btrfs-scrub manpage suggests:
>
> * When you point scrub at a mountpoint, it scrubs all devices
> composing
> that filesystem.
Uhm,.. mine doesn't contain this,... neither do those of the master or
devel branches from David's repo... or am I just blind?
Actually it says:
>DESCRIPTION
> btrfs scrub is used to scrub a btrfs filesystem, which will read all
> data from all disks and verify checksums.
Also, if it would allow to only selectively scrub parts of the fs (e.g.
just some devices or subpaths/subvols/files) than the whole syntax for
cancel, break, etc. would become ambiguous.
> Since /dev/disk/by-*/* are symlinks to various block-device nodes,
> it
> follows that if you point scrub at them, only the device pointed at
> is
> scrubbed, exactly as one might expect based on the manpage.
Sure... that was clear... but I have another manpage than yours...
perhaps some distro specific patch?
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 1:21 ` Christoph Anton Mitterer
@ 2015-12-28 1:25 ` Christoph Anton Mitterer
2015-12-28 1:36 ` Chris Murphy
2015-12-28 3:30 ` Duncan
2015-12-28 1:27 ` Chris Murphy
2015-12-28 3:16 ` Duncan
2 siblings, 2 replies; 9+ messages in thread
From: Christoph Anton Mitterer @ 2015-12-28 1:25 UTC (permalink / raw)
To: Duncan, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 709 bytes --]
Hey.
Just noted, mine says this:
>Start a scrub on all devices of the filesystem identified by <path>
>or on a single <device>. If a scrub is already running, the new one
>fails.
still not the text you quoted,... but there it is.
Anyway... it still contradicts the main description which implies that
a scrub always scrubs everything,... so I'd still call that a
documentation bug.
Further,...
- Eithr btrfs start allows multiple devices to be specified (which
isn't documented either,
- or it should allow that.
- or using -d makes no sense when the scrub is launched on a device
(instead of a mount point) and should thus fail or give at least a
warning.
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 1:21 ` Christoph Anton Mitterer
2015-12-28 1:25 ` Christoph Anton Mitterer
@ 2015-12-28 1:27 ` Chris Murphy
2015-12-28 3:16 ` Duncan
2 siblings, 0 replies; 9+ messages in thread
From: Chris Murphy @ 2015-12-28 1:27 UTC (permalink / raw)
To: Christoph Anton Mitterer; +Cc: Duncan, Btrfs BTRFS
On Sun, Dec 27, 2015 at 6:21 PM, Christoph Anton Mitterer
<calestyo@scientia.net> wrote:
> On Sun, 2015-12-27 at 07:22 +0000, Duncan wrote:
>> I'd call that NOTABUG. As the btrfs-scrub manpage suggests:
>>
>> * When you point scrub at a mountpoint, it scrubs all devices
>> composing
>> that filesystem.
> Uhm,.. mine doesn't contain this,... neither do those of the master or
> devel branches from David's repo... or am I just blind?
>
> Actually it says:
>>DESCRIPTION
>> btrfs scrub is used to scrub a btrfs filesystem, which will read all
>> data from all disks and verify checksums.
>
> Also, if it would allow to only selectively scrub parts of the fs (e.g.
> just some devices or subpaths/subvols/files) than the whole syntax for
> cancel, break, etc. would become ambiguous.
>
>> Since /dev/disk/by-*/* are symlinks to various block-device nodes,
>> it
>> follows that if you point scrub at them, only the device pointed at
>> is
>> scrubbed, exactly as one might expect based on the manpage.
> Sure... that was clear... but I have another manpage than yours...
> perhaps some distro specific patch?
Fedora carries pretty much unmodified upstream btrfs-progs and I see
what both of you are seeing (I have 4.3.1).
The description does somewhat confusingly say "btrfs scrub is used to
scrub a btrfs filesystem, which will read all data from all disks and
verify checksums" but under subcommand > start it contains the
following qualification as the first sentence:
Start a scrub on all devices of the filesystem identified by <path> or
on a single <device>.
--
Chris Murphy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 1:25 ` Christoph Anton Mitterer
@ 2015-12-28 1:36 ` Chris Murphy
2015-12-28 3:30 ` Duncan
1 sibling, 0 replies; 9+ messages in thread
From: Chris Murphy @ 2015-12-28 1:36 UTC (permalink / raw)
To: Christoph Anton Mitterer; +Cc: Duncan, Btrfs BTRFS
On Sun, Dec 27, 2015 at 6:25 PM, Christoph Anton Mitterer
<calestyo@scientia.net> wrote:
> Hey.
>
> Just noted, mine says this:
>>Start a scrub on all devices of the filesystem identified by <path>
>>or on a single <device>. If a scrub is already running, the new one
>>fails.
> still not the text you quoted,... but there it is.
>
> Anyway... it still contradicts the main description which implies that
> a scrub always scrubs everything,... so I'd still call that a
> documentation bug.
>
>
> Further,...
> - Eithr btrfs start allows multiple devices to be specified (which
> isn't documented either,
> - or it should allow that.
> - or using -d makes no sense when the scrub is launched on a device
> (instead of a mount point) and should thus fail or give at least a
> warning.
https://bugzilla.kernel.org/show_bug.cgi?id=110051
--
Chris Murphy
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 1:21 ` Christoph Anton Mitterer
2015-12-28 1:25 ` Christoph Anton Mitterer
2015-12-28 1:27 ` Chris Murphy
@ 2015-12-28 3:16 ` Duncan
2 siblings, 0 replies; 9+ messages in thread
From: Duncan @ 2015-12-28 3:16 UTC (permalink / raw)
To: linux-btrfs
Christoph Anton Mitterer posted on Mon, 28 Dec 2015 02:21:28 +0100 as
excerpted:
> On Sun, 2015-12-27 at 07:22 +0000, Duncan wrote:
>> I'd call that NOTABUG. As the btrfs-scrub manpage suggests:
>>
>> * When you point scrub at a mountpoint, it scrubs all devices composing
>> that filesystem.
> Uhm,.. mine doesn't contain this,... neither do those of the master or
> devel branches from David's repo... or am I just blind?
I see that Chris Murphy just filed a bug on it with the particulars, but
just to clear this up...
That's my paraphrase of what it says, thus the "suggests", but I do
specifically quote, with "the manpage specifically says" and quote marks,
so it's pretty hard to miss, which I /thought/, along with "suggests",
should make it clear that I was NOT specifically quoting the manpage in
the bullet-point.
Apparently not...
> Actually it says:
>>DESCRIPTION
>> btrfs scrub is used to scrub a btrfs filesystem, which
>> will read all data from all disks and verify checksums.
Look under scrub start... as you did in a followup...
>> Since /dev/disk/by-*/* are symlinks to various block-device nodes, it
>> follows that if you point scrub at them, only the device pointed at is
>> scrubbed, exactly as one might expect based on the manpage.
> Sure... that was clear... but I have another manpage than yours...
> perhaps some distro specific patch?
No, just both a slightly more specific part of the manpage, under scrub
start, and a mistake in believing "suggests" implies or explicitly
specifies a direct quote, even when a direct quote is later actually
made, complete with quotation marks and "the manpage specifically says"
attribution.
btrfs-progs v4.3.1, if it matters.
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 1:25 ` Christoph Anton Mitterer
2015-12-28 1:36 ` Chris Murphy
@ 2015-12-28 3:30 ` Duncan
2015-12-28 4:37 ` Christoph Anton Mitterer
1 sibling, 1 reply; 9+ messages in thread
From: Duncan @ 2015-12-28 3:30 UTC (permalink / raw)
To: linux-btrfs
Christoph Anton Mitterer posted on Mon, 28 Dec 2015 02:25:37 +0100 as
excerpted:
>>> (The manpage specifically says "all devices of the filesystem
>>> identified by <path>". Emphasis on _ALL_DEVICES_ if given a
>>> normal path.)
>>> (The manpage continues ... "or on a single <device>." Emphasis
>>> on _SINGLE_DEVICE_ if given a device node.)
> Just noted, mine says this:
>>Start a scrub on all devices of the filesystem identified by <path>
>>or on a single <device>. If a scrub is already running, the new one
>>fails.
> still not the text you quoted,... but there it is.
The text I directly quoted... with quotation marks and "the manpage
specifically says", is in my quote above, added back in here and marked
off as the third level quote.
The material within my quotation marks is found verbatim within your
quote of the manpage. So how is it not the text I quoted?
It's in quotation marks attributed with "the manpage specifically says",
my own rewording is marked as the manpage _"suggests"_ (with the choice
of "suggests" as opposed to "says" and quote marks rather strongly
implying that part is _not_ a direct quote), how could I _possibly_ make
it any clearer than that?
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] btrfs scrub -d doesn't scan all devices
2015-12-28 3:30 ` Duncan
@ 2015-12-28 4:37 ` Christoph Anton Mitterer
0 siblings, 0 replies; 9+ messages in thread
From: Christoph Anton Mitterer @ 2015-12-28 4:37 UTC (permalink / raw)
To: Duncan, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Mon, 2015-12-28 at 03:30 +0000, Duncan wrote:
> So how is it not the text I quoted?
Uhm... I just thought you meant that:
> * When you point scrub at a mountpoint, it scrubs all devices
> composing
> that filesystem.
to be the quote which I couldn't find after a quick cross reading...
Sorry for my confusion :-)
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-12-28 4:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-27 3:38 [BUG?] btrfs scrub -d doesn't scan all devices Christoph Anton Mitterer
2015-12-27 7:22 ` Duncan
2015-12-28 1:21 ` Christoph Anton Mitterer
2015-12-28 1:25 ` Christoph Anton Mitterer
2015-12-28 1:36 ` Chris Murphy
2015-12-28 3:30 ` Duncan
2015-12-28 4:37 ` Christoph Anton Mitterer
2015-12-28 1:27 ` Chris Murphy
2015-12-28 3:16 ` Duncan
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).