All of lore.kernel.org
 help / color / mirror / Atom feed
* Error removing an HDD from a RAID1 BTRFS array
@ 2015-07-28 22:09 Alejandro Recarey
  2015-07-28 23:23 ` Chris Murphy
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Recarey @ 2015-07-28 22:09 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

I setup a btrfs filesystem on 3 disks with raid 1. Somehow, a small
portion (2GiB) got used as RAID0. At the time, no amount of running
balance -dconvert raid1 would change it so I left it as is.

Lately /dev/sda is starting to show SMART errors and general
issues. So I added 2 other disks to the btrfs array, and then proceded
to run `btrfs device delete`. All of the data was moved out of sda
*except* 1 GiB, and the delete fails with this message:

  > # ./btrfs device delete /dev/sda /storage
  ERROR: error removing the device '/dev/sda' - No space left on device

It seems there is a small part of sda that still has a raid0
partition, and that small part cannot be deleted. This is a completely
uninformed assumption! It's just that the 1 GiB space remaining on
disk seems suspicious.

I don't know what files are there, and at this point I really don't
care. I would like to nuke that 1 GiB partition so I can remove /dev/sda and
get my array working correctly.

I tried to run a `balance -dconvert` again, but the command starts
moving my data back *into* sda and I don't trust the disk to die on me
while writing that much data.

Any tips or suggestions are apreciated! Thank you,

Alex

----

My system information:

> # uname -a
Linux nerd-server 3.13.0-48-generic \
   #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC \
   2015 x86_64 x86_64 x86_64 GNU/Linux


> # ./btrfs --version
btrfs-progs v4.1.2


> # ./btrfs fi show
Label: none  uuid: 5e63e5b5-48bb-442e-a79c-1c71a22de476
Total devices 5 FS bytes used 3.86TiB
devid    1 size 2.73TiB used 1.00GiB path /dev/sda
devid    2 size 2.73TiB used 1.97TiB path /dev/sdd
devid    3 size 2.73TiB used 1.81TiB path /dev/sdc
devid    4 size 2.73TiB used 1.97TiB path /dev/sde
devid    5 size 2.73TiB used 1.97TiB path /dev/sdf

btrfs-progs v4.1.2

root@nerd-server ~/src/btrfs-progs
> # ./btrfs fi df /storage
Data, RAID1: total=3.85TiB, used=3.85TiB
Data, RAID0: total=2.00GiB, used=1.54GiB
System, RAID1: total=32.00MiB, used=744.00KiB
Metadata, RAID1: total=6.00GiB, used=4.64GiB

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

* Re: Error removing an HDD from a RAID1 BTRFS array
  2015-07-28 22:09 Error removing an HDD from a RAID1 BTRFS array Alejandro Recarey
@ 2015-07-28 23:23 ` Chris Murphy
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Murphy @ 2015-07-28 23:23 UTC (permalink / raw)
  To: Btrfs BTRFS

On Tue, Jul 28, 2015 at 4:09 PM, Alejandro Recarey <alex@recarey.org> wrote:

>   > # ./btrfs device delete /dev/sda /storage
>   ERROR: error removing the device '/dev/sda' - No space left on device

>> # uname -a
> Linux nerd-server 3.13.0-48-generic \

I can't even begin to tell you how much has changed since this kernel
version, it's also EOL. I suggest 4.1.3 and see if you can delete this
device, because obviously the error is bogus. There's lots of
unallocated space on all drives, including sda, so a no space left on
device is simply wrong.


-- 
Chris Murphy

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

end of thread, other threads:[~2015-07-28 23:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 22:09 Error removing an HDD from a RAID1 BTRFS array Alejandro Recarey
2015-07-28 23:23 ` Chris Murphy

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.