On 06/11/2016 12:10 AM, ojab // wrote:
On Fri, Jun 10, 2016 at 9:56 PM, Hans van Kranenburg
<hans.van.kranenb...@mendix.com> wrote:
You can work around it by either adding two disks (like Henk said), or by
temporarily converting some chunks to single. Just enough to get some free
space on the first two disks to get a balance going that can fill the third
one. You don't have to convert all of your data or metadata to single!

Something like:

btrfs balance start -v -dconvert=single,limit=10 /mnt/xxx/

Unfortunately it fails even if I set limit=1:
$ sudo btrfs balance start -v -dconvert=single,limit=1 /mnt/xxx/
Dumping filters: flags 0x1, state 0x0, force is off
  DATA (flags 0x120): converting, target=281474976710656, soft is off, limit=1
ERROR: error during balancing '/mnt/xxx/': No space left on device
There may be more info in syslog - try dmesg | tail

Ah, apparently the balance operation *always* wants to allocate some new empty space before starting to look more close at the task you give it...

This means that it's trying to allocate a new set of RAID0 chunks first... and that's exactly the opposite of what we want to accomplish here.

If you really can add only one extra device now, there's always a more dirty way to get the job done.

What you can do for example is:
- partition the new disk in two partitions
- add them both to the filesystem (btrfs doesn't know both block devices are on the same physical disk, ghehe)
- convert a small number of data blocks to single
- then device delete the third disk again so the single chunks move back to the two first disks
- add the third disk back as one whole block device
- etc...

:D

Moo,

--
Hans van Kranenburg - System / Network Engineer
T +31 (0)10 2760434 | hans.van.kranenb...@mendix.com | www.mendix.com
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to