From: Anand Jain <anand.jain@oracle.com>
To: Patrik Lundquist <patrik.lundquist@gmail.com>,
Stephen Williams <stephenw@veryfast.biz>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Possible Raid Bug
Date: Mon, 28 Mar 2016 11:54:15 +0800 [thread overview]
Message-ID: <56F8AAE7.5020201@oracle.com> (raw)
In-Reply-To: <CAA7pwKMnj5+pLoBPg1z3aRQZJ-kWJefSc+Cg6JrhGSzdW4WFnQ@mail.gmail.com>
Hi Patrik,
Thanks for posting a test case. more below.
On 03/26/2016 07:51 PM, Patrik Lundquist wrote:
> So with the lessons learned:
>
> # mkfs.btrfs -m raid10 -d raid10 /dev/sdb /dev/sdc /dev/sdd /dev/sde
>
> # mount /dev/sdb /mnt; dmesg | tail
> # touch /mnt/test1; sync; btrfs device usage /mnt
>
> Only raid10 profiles.
>
> # echo 1 >/sys/block/sde/device/delete
>
> We lost a disk.
>
> # touch /mnt/test2; sync; dmesg | tail
>
> We've got write errors.
>
> # btrfs device usage /mnt
>
> No 'single' profiles because we haven't remounted yet.
>
> # reboot
> # wipefs -a /dev/sde; reboot
>
> # mount -o degraded /dev/sdb /mnt; dmesg | tail
> # btrfs device usage /mnt
>
> Still only raid10 profiles.
>
> # touch /mnt/test3; sync; btrfs device usage /mnt
>
> Now we've got 'single' profiles. Replace now or get hosed.
Since you are replacing the failed device without mount/unmount/reboot,
so this should work.
And you would need those parts of hot spare/auto replace patches only
if the test case had unmount/mount or reboot at this stage.
> # btrfs replace start -B 4 /dev/sde /mnt; dmesg | tail
>
> # btrfs device stats /mnt
>
> [/dev/sde].write_io_errs 0
> [/dev/sde].read_io_errs 0
> [/dev/sde].flush_io_errs 0
> [/dev/sde].corruption_errs 0
> [/dev/sde].generation_errs 0
>
> We didn't inherit the /dev/sde error count. Is that a bug?
No. Its other way, it would have been a bug if the replace-target
inherited the error counters.
> # btrfs balance start -dconvert=raid10,soft -mconvert=raid10,soft
> -sconvert=raid10,soft -vf /mnt; dmesg | tail
>
> # btrfs device usage /mnt
>
> Back to only 'raid10' profiles.
>
> # umount /mnt; mount /dev/sdb /mnt; dmesg | tail
>
> # btrfs device stats /mnt
>
> [/dev/sde].write_io_errs 11
> [/dev/sde].read_io_errs 0
> [/dev/sde].flush_io_errs 2
> [/dev/sde].corruption_errs 0
> [/dev/sde].generation_errs 0
>
> The old counters are back. That's good, but wtf?
No. I doubt if they are old counters. The steps above didn't
show old error counts, but since you have created a file
test3 so there will be some write_io_errors, which we don;t
see after the balance. So I doubt if they are old counter
but instead they are new flush errors.
> # btrfs device stats -z /dev/sde
>
> Give /dev/sde a clean bill of health. Won't warn when mounting again.
Thanks, Anand
next prev parent reply other threads:[~2016-03-28 3:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-25 11:49 Possible Raid Bug Stephen Williams
2016-03-25 12:48 ` Patrik Lundquist
2016-03-25 14:41 ` Duncan
2016-03-25 14:57 ` Patrik Lundquist
2016-03-25 17:20 ` Stephen Williams
2016-03-25 19:57 ` Patrik Lundquist
2016-03-25 20:09 ` Alexander Fougner
2016-03-26 3:08 ` Anand Jain
2016-03-26 11:51 ` Patrik Lundquist
2016-03-26 14:00 ` Stephen Williams
2016-03-26 20:58 ` Chris Murphy
2016-03-27 17:06 ` Stephen Williams
2016-03-26 20:48 ` Chris Murphy
2016-03-28 3:54 ` Anand Jain [this message]
2016-03-28 10:41 ` Patrik Lundquist
2016-03-25 21:34 ` Chris Murphy
2016-03-26 3:56 ` Duncan
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=56F8AAE7.5020201@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=patrik.lundquist@gmail.com \
--cc=stephenw@veryfast.biz \
/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.