All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Leroux <sylvain@chicoree.fr>
To: "Ivan Sizov <sivan606@gmail.com>;Chris Murphy" <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Can't remount a BTRFS partition read write after a drive failure
Date: Thu, 18 May 2017 09:22:55 +0200	[thread overview]
Message-ID: <d76bbe8f-af4a-36a0-2eb0-45384a8fee79@chicoree.fr> (raw)
In-Reply-To: <CAMG9ccz555xia-FpqGsoy-uzYXcyYwG6H0EC18O2AC9yLUuBpg@mail.gmail.com>

On 05/17/2017 09:19 AM, Ivan Sizov wrote:
> > The drive is not reliable. And I noticed when there is an error and the
> > USB device appears to be dead to the kernel, I am later unable to
> > remount rw the drive. I can mount it read only though.
> > This seems to be a systematic behavior. And it occasionally happens when
> > the computer wake up from sleep and the drive is still attached.
> > Power cycling the disk do not change anything, but restarting the
> > computer "solves" the issue.
>
> (Maybe offtop) Seems like your disk's USB-SATA controller is almost
dead. You shouldn't further use it with USB because this lead to data
corruption. Detach HDD from case and plug directly to a SATA port or
replace the controller.


Thank you Chris, Ivan, for your answers.

I understand the drive appears dead to the kernel and the safest
solution is to mount back the drive read only.

But...

To give you more details about my particular use case, we are
investigating the resilience of various FS to hardware failures. The
disk is (presumably) working but we are using a modified USB cable to
produce bus errors on purpose.

If I understand it well, when we switch the cable to "faulty mode", the
kernels detects usb errors or something, consider the device as dead,
and try to reset the bus. On that event, the drive will remount ro.

However, when we switch back the cable to "Normal mode", we are unable
to forcefully remount the drive rw. Even if we replace our cable by a
genuine one, and/or if we power cycle the drive. BTRFS just refuse to
remount rw that drive. FWIW, BTRFS is the only filesystems we've tested
considering a faulty drive as _definitively_ faulty without any hope for
the administrator to override that.


Here we are in a very special use case. But I think we would see a
similar behavior if some drive case or cable was dying, the
administrator replaced it, but was unable to remount rw the drive after
having fixed the problem. Or did I missed something?


-- 
-- Sylvain Leroux
-- sylvain@chicoree.fr
-- http://www.chicoree.fr



  parent reply	other threads:[~2017-05-18 10:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 12:56 Can't remount a BTRFS partition read write after a drive failure Sylvain Leroux
2017-05-17  4:10 ` Chris Murphy
2017-05-17  9:22 ` Duncan
2017-05-17 15:21 ` Ivan Sizov
     [not found] ` <CAMG9ccz555xia-FpqGsoy-uzYXcyYwG6H0EC18O2AC9yLUuBpg@mail.gmail.com>
2017-05-18  7:22   ` Sylvain Leroux [this message]
2017-05-19  2:23     ` Duncan
2017-05-20  9:11       ` Sylvain Leroux

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=d76bbe8f-af4a-36a0-2eb0-45384a8fee79@chicoree.fr \
    --to=sylvain@chicoree.fr \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /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.