All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Sylvain Leroux <sylvain@chicoree.fr>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Can't remount a BTRFS partition read write after a drive failure
Date: Tue, 16 May 2017 22:10:49 -0600	[thread overview]
Message-ID: <CAJCQCtSggDc1F=efwzWQU99r4UsC6MB+_jEw0Uor7JmRkhH1Jw@mail.gmail.com> (raw)
In-Reply-To: <84408781-722d-6c87-b510-0497c4f36443@chicoree.fr>

On Tue, May 16, 2017 at 6:56 AM, Sylvain Leroux <sylvain@chicoree.fr> wrote:
> Hi,
> I'm investigating BTRFS using an external USB HDD on a Linux Debian
> Stretch/Sid system.
>
> 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.
>
>
> I believe this may be caused by BTRFS having issues since the kernel
> assign a different device name to the drive when it bring it back
> inline? Or BTRFS didn't realize the "original" drive has gone away?
>
>
> Attached are the dmesg output corresponding to my issue.
> Initially, the drive was mounted rw and associated to the /dev/sdb
> device, the btrfs partition being /dev/sdb1
> After the failure, I power cycled the drive, and the kernel brought it
> back as /dev/sdc
>
> I can mount /dev/sdc1 read only.
> But I'm unable to mount it read-write. Interestingly, the message in
> dmesg still mention /dev/sdb1 as the device whereas it should be /dev/sdc1.
>
>
>
> sylvain@bulbizarre:~$ uname -a
> Linux bulbizarre 4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30)
> x86_64 GNU/Linux
> sylvain@bulbizarre:~$ btrfs --version
> btrfs-progs v4.7.3
> sylvain@bulbizarre:~$ sudo btrfs fi show
> Label: 'G-Drive'  uuid: 9465dad3-6604-4437-883e-f66386d69ac8
>     Total devices 1 FS bytes used 503.34GiB
>     devid    1 size 931.51GiB used 507.02GiB path /dev/sdc1
>
>
>
> Any clue to help me mounting back the disk without having to restart the
> system would be greatly appreciated!
> Regards,
> - Sylvain.


Seems normal to me. The device is seriously misbehaving. Btrfs gets
confused. And it goes read-only to avoid causing more problems by
adding writes based on confusing to the misbehaving and unreliable
drive.


-- 
Chris Murphy

  reply	other threads:[~2017-05-17  4:10 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 [this message]
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
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='CAJCQCtSggDc1F=efwzWQU99r4UsC6MB+_jEw0Uor7JmRkhH1Jw@mail.gmail.com' \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sylvain@chicoree.fr \
    /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.