linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* `btrfs dev del` fails with `No space left on device`
@ 2016-08-29 16:04 ojab //
  2016-08-29 21:05 ` Chris Murphy
  0 siblings, 1 reply; 7+ messages in thread
From: ojab // @ 2016-08-29 16:04 UTC (permalink / raw)
  To: linux-btrfs

Hi,
[and I hope that this message will not be sent during compose]
I've had BTRFS filesystem with two 1Tb drives (sdb1 & sdc1), data
raid0 & metadata raid1. I need to replace one drive with 2Tb drive, so
I've done `btrfs dev add /dev/sdd /mnt/xxx` and now trying to do
`btrfs dev del /dev/sdc1 /mnt/xxx` which fails due to `ERROR: error
removing device '/dev/sdc1': No space left on device`. Right now FS
looks like:

$ sudo btrfs fi show /mnt/xxx
Label: none  uuid: 8a65465d-1a8c-4f80-abc6-c818c38567c3
           Total devices 3 FS bytes used 1.80TiB
           devid    1 size 931.51GiB used 931.51GiB path /dev/sdc1
           devid    2 size 931.51GiB used 931.51GiB path /dev/sdb1
           devid    3 size 1.82TiB used 0.00B path /dev/sdd1

$ sudo btrfs device usage /mnt/xxx/
/dev/sdb1, ID: 2
   Device size:           931.51GiB
   Device slack:              0.00B
   Data,RAID0:            928.48GiB
   Metadata,RAID1:          3.00GiB
   System,RAID1:           32.00MiB
   Unallocated:             1.01MiB

/dev/sdc1, ID: 1
   Device size:           931.51GiB
   Device slack:            3.50KiB
   Data,RAID0:            928.48GiB
   Metadata,RAID1:          3.00GiB
   System,RAID1:           32.00MiB
   Unallocated:             1.00MiB

/dev/sdd1, ID: 3
   Device size:             1.82TiB
   Device slack:              0.00B
   Unallocated:             1.82TiB

As far as I understand, no data is allocated on `/dev/sdc1`, so it
should be no space for metadata, but I don't really understand how can
I balance only metadata, both:

$ btrfs fi balance start -musage=1 -dusage=0 /mnt/xxx/
$ sudo btrfs fi balance start -musage=1 -dusage=0 -mconvert=raid1 /mnt/xxx/

fails with something like `BTRFS info (device sdb1): 1 enospc errors
during balance` in dmesg.

Is there any way to delete /dev/sdc1 without full rebalance?

//wbr ojab

^ permalink raw reply	[flat|nested] 7+ messages in thread
* `btrfs dev del` fails with `No space left on device`
@ 2016-08-29 16:02 ojab //
  0 siblings, 0 replies; 7+ messages in thread
From: ojab // @ 2016-08-29 16:02 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I've had BTRFS filesystem with two 1Tb drives (sdb1 & sdc1), data
raid0 & metadata raid1. I need to replace one drive with 2Tb drive, so
I've done `btrfs dev add /dev/sdd /mnt/xxx` and now trying to do
`btrfs dev del /dev/sdc1 /mnt/xxx` which fails due to `ERROR: error
removing device '/dev/sdc1': No space left on device`. Right now FS
looks like:

$ sudo btrfs fi show /mnt/xxx
Label: none  uuid: 8a65465d-1a8c-4f80-abc6-c818c38567c3
           Total devices 3 FS bytes used 1.80TiB
           devid    1 size 931.51GiB used 931.51GiB path /dev/sdc1
           devid    2 size 931.51GiB used 931.51GiB path /dev/sdb1
           devid    3 size 1.82TiB used 0.00B path /dev/sdd1

$ sudo btrfs device usage /mnt/xxx/
/dev/sdb1, ID: 2
   Device size:           931.51GiB
   Device slack:              0.00B
   Data,RAID0:            928.48GiB
   Metadata,RAID1:          3.00GiB
   System,RAID1:           32.00MiB
   Unallocated:             1.01MiB

/dev/sdc1, ID: 1
   Device size:           931.51GiB
   Device slack:            3.50KiB
   Data,RAID0:            928.48GiB
   Metadata,RAID1:          3.00GiB
   System,RAID1:           32.00MiB
   Unallocated:             1.00MiB

/dev/sdd1, ID: 3
   Device size:             1.82TiB
   Device slack:              0.00B
   Unallocated:             1.82TiB

As far as I understand, no data is allocated on `/dev/sdc1`, so it
should be no space for metadata, but I don't really understand how can
I balance only metadata:
$btrfs fi balance start -musage=1 -dusage=0 /mnt/torrents/

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

end of thread, other threads:[~2016-08-30 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 16:04 `btrfs dev del` fails with `No space left on device` ojab //
2016-08-29 21:05 ` Chris Murphy
2016-08-30 10:22   ` ojab //
2016-08-30 10:35     ` Hugo Mills
2016-08-30 17:13     ` Chris Murphy
2016-08-30 20:10       ` ojab //
  -- strict thread matches above, loose matches on Subject: below --
2016-08-29 16:02 ojab //

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