linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unable to delete device
@ 2019-11-10  1:14 Alex Powell
  2019-11-10  3:41 ` Qu Wenruo
  2019-11-10  3:48 ` Anand Jain
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Powell @ 2019-11-10  1:14 UTC (permalink / raw)
  To: linux-btrfs

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

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

Kind Regards,
Alex Powell

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unable to delete device
  2019-11-10  1:14 Unable to delete device Alex Powell
@ 2019-11-10  3:41 ` Qu Wenruo
  2019-11-10  3:48 ` Anand Jain
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2019-11-10  3:41 UTC (permalink / raw)
  To: Alex Powell, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 1024 bytes --]



On 2019/11/10 上午9:14, 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.

Nope, regular sector shouldn't cause RO mount.

Dmesg please for the RO (transaction abort).

> 
> 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

This is another different problem.
Dmesg please.

This can be caused by bad sector + failed to rebuild data.
Please keep in mind RAID5 of btrfs can't handle write hole yet, thus
it's not ensured to tolerant one corrupted disk.

Thanks,
Qu
> 
> What is best practice for removing the drive from the array in this situation?
> 
> Kind Regards,
> Alex Powell
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unable to delete device
  2019-11-10  1:14 Unable to delete device Alex Powell
  2019-11-10  3:41 ` Qu Wenruo
@ 2019-11-10  3:48 ` Anand Jain
  1 sibling, 0 replies; 3+ messages in thread
From: Anand Jain @ 2019-11-10  3:48 UTC (permalink / raw)
  To: Alex Powell, linux-btrfs

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
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-10  3:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10  1:14 Unable to delete device Alex Powell
2019-11-10  3:41 ` Qu Wenruo
2019-11-10  3:48 ` Anand Jain

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).