From: Dmitry Katsubo <dma_k@mail.ru>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Failover for unattached USB device
Date: Wed, 24 Oct 2018 17:03:26 +0200 [thread overview]
Message-ID: <3051750f58524cceed2a69fcf43bae31@mail.ru> (raw)
In-Reply-To: <dac5a4c5-e40d-a332-420f-f5517730a5f4@mail.ru>
On 2018-10-17 00:14, Dmitry Katsubo wrote:
> As a workaround I can monitor dmesg output but:
>
> 1. It would be nice if I could tell btrfs that I would like to mount
> read-only
> after a certain error rate per minute is reached.
> 2. It would be nice if btrfs could detect that both drives are not
> available and
> unmount (as mount read-only won't help much) the filesystem.
>
> Kernel log for Linux v4.14.2 is attached.
I wonder if somebody could further advise the workaround. I understand
that running
btrfs volume over USB devices is not good, but I think btrfs could play
some role
as well.
In particular I wonder if btrfs could detect that all devices in RAID1
volume became
inaccessible and instead of reporting increasing "write error" counter
to kernel log simply
render the volume as read-only. "inaccessible" could be that if the same
block cannot be
written back to minimum number of devices in RAID volume, so btrfs gives
up.
Maybe someone can advise some sophisticated way of quick checking that
filesystems is
healthy? Right now the only way I see is to make a tiny write (like
create a file and
instantly remove it) to make it die faster... Checking for write IO
errors in "btrfs
dev stats /mnt/backups" output could be an option provided that delta is
computed for
some period of time and write errors counter increase for both devices
in the volume
(as apparently I am not interested in one failing block which btrfs
tries to write
again and again increasing the write errors counter).
Thanks for any feedback.
--
With best regards,
Dmitry
next prev parent reply other threads:[~2018-10-24 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 22:14 Failover for unattached USB device Dmitry Katsubo
2018-10-24 15:03 ` Dmitry Katsubo [this message]
2018-10-24 18:05 ` Chris Murphy
2018-10-25 9:47 ` Dmitry Katsubo
2018-10-25 18:34 ` Chris Murphy
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=3051750f58524cceed2a69fcf43bae31@mail.ru \
--to=dma_k@mail.ru \
--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 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).