All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Timothy Normand Miller <theosib@gmail.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs-image gets stuck, using 100%, looping on bad file descriptor
Date: Thu, 20 Aug 2015 07:38:54 -0400	[thread overview]
Message-ID: <55D5BC4E.9080806@gmail.com> (raw)
In-Reply-To: <CAK7bmU8RK25Zd=sgni1i3M17=mY9xRecFtn+e=Mj03DwjMSBTw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

On 2015-08-18 22:55, Timothy Normand Miller wrote:
> On Tue, Aug 18, 2015 at 10:48 PM, Qu Wenruo <quwenruo@cn.fujitsu.com> wrote:
>>
>>
>> Timothy Normand Miller wrote on 2015/08/18 22:46 -0400:
>>>
>>> On Tue, Aug 18, 2015 at 9:32 PM, Qu Wenruo <quwenruo@cn.fujitsu.com>
>>> wrote:
>>>>
>>>> Hi Timothy,
>>>>
>>>> Although I have replied to the bugzilla, IMHO it's more appropriate to
>>>> discuss it in mail list, as it's not a kernel bug.
>>>>
>>>
>>> All four devices were online.  The "missing" one was a drive that
>>> died, which was replaced by a new one, but btrfs wouldn't finish the
>>> deletion of the missing device.
>>>
>> By replaced, did you mean "btrfs replace"? Or just change the physical disk
>> without using "btrfs replace"?
>
> Here's what happened:
>
> - A drive started throwing bad sectors.  Somehow this caused metadata
> on other drives to get messed up.
> - I took that drive offline and mounted degraded (it's a 4-drive RAID1)
> - I did a "btrfs add" on a new drive and then a "btrfs delete missing"
> - The replacement drive failed during the replacement operation, and
> everything went to crap.
> - With some help, I got a kernel patch that allowed me to mount the
> original three drives with TWO missing devices.
> - I added a brand new drive and then did "delete missing" again.  This
> time, the first "delete missing" was successful, but it didn't fully
> balance the drives, and there was another missing device, so I had to
> do a "delete missing" again, and that failed.
>
Just for reference, I've found that it is usually safer to delete the 
missing device first if possible, then add the new one and re-balance. 
There seem to be some edge-cases in the code for deleting missing devices.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  parent reply	other threads:[~2015-08-20 11:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18 15:40 btrfs-image gets stuck, using 100%, looping on bad file descriptor Timothy Normand Miller
2015-08-19  1:32 ` Qu Wenruo
2015-08-19  2:46   ` Timothy Normand Miller
2015-08-19  2:48     ` Qu Wenruo
2015-08-19  2:55       ` Timothy Normand Miller
2015-08-19  5:22         ` Qu Wenruo
2015-08-19 16:18           ` Timothy Normand Miller
2015-08-20 11:38         ` Austin S Hemmelgarn [this message]
2015-08-20 13:08           ` Timothy Normand Miller
2015-08-20 13:12             ` Austin S Hemmelgarn
2015-08-21  1:32 ` Qu Wenruo

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=55D5BC4E.9080806@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    --cc=theosib@gmail.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.