Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Alex Powell <alexj.powellalt@googlemail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: Unable to delete device
Date: Sun, 10 Nov 2019 11:48:36 +0800
Message-ID: <c0479d4c-5163-8a5c-3a0a-58a4f5f0f75f@oracle.com> (raw)
In-Reply-To: <CAKGv6CrZ6bpMFtWJ5grJ8tsuV1GehEP07QaAmyZWkhj-ixTchw@mail.gmail.com>

On 11/10/19 9:14 AM, Alex Powell wrote:
> Hi all,
> I had a disk fail on my BTRFS RAID5 array. It is still mounting but
> there are bad sectors which will switch the array to read only mode
> when used.
> 
> I used "btrfs device delete /dev/sdd /mnt/data" to remove it from the
> array. However it seems that it is only partially removing it from the
> array and when it gets to the bad sectors it fails.
> 
> localhost ~ # btrfs device delete /dev/sdd /mnt/data
> ERROR: error removing device '/dev/sdd': Input/output error

  Could you please provide 'btrfs dev df <mnt>' we need to know the
  allocated chunk profiles.

  If its only RAID5, we continue to reconstruct the RAID5 for failed IO
  during the delete. But here its may be that there are IO errors from
  more than one device in the RAID5, which unfortunately is a fatal
  error.

  You could confirm the devices involved in the errors from the syslog
  and 'btrfs device stats <mnt>'.

> What is best practice for removing the drive from the array in this situation?

  Device replace is better as it will continue to fulfill the raid5
  redundancy promises. Yeah but you need the spare device, which is
  a good practice in the data centers.

HTH.

Thanks, Anand

> Kind Regards,
> Alex Powell
> 




      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10  1:14 Alex Powell
2019-11-10  3:41 ` Qu Wenruo
2019-11-10  3:48 ` Anand Jain [this message]

Reply instructions:

You may reply publically 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=c0479d4c-5163-8a5c-3a0a-58a4f5f0f75f@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=alexj.powellalt@googlemail.com \
    --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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git