3

I currently have a btrfs filesystem setup like this:

# btrfs fi df /storage/

Data, RAID1: total=2.33TiB, used=2.32TiB
Data, RAID0: total=2.00GiB, used=2.00GiB
System, RAID1: total=32.00MiB, used=340.00KiB
Metadata, RAID1: total=4.00GiB, used=2.53GiB

and:

# btrfs fi show

Label: none  uuid: 5e63e5b5-48bb-442e-a79c-1c71a22de476
    Total devices 3 FS bytes used 2.33TiB
    devid    1 size 2.73TiB used 1.56TiB path /dev/sda
    devid    2 size 2.73TiB used 1.56TiB path /dev/sdd
    devid    3 size 2.73TiB used 1.55TiB path /dev/sdc

Btrfs v3.12

As you can see I have two data sections, one with most of my data in RAID1 and another one, 2GiB large, with RAID0 configuration. I want to end up will all of my data in RAID1.

I have tried balancing the whole /storage/ filesystem, I have tried, as suggested in another question, the command btrfs balance start -dprofiles=raid0 -dconvert=raid1 /storage/ to convert just the raid0 part to raid1. However, this is the result:

# btrfs balance start -dprofiles=raid0 -dconvert=raid1  /storage/
ERROR: error during balancing '/storage/' - No space left on device
There may be more info in syslog - try dmesg | tail

Checking the syslog as suggested yields:

[432205.142548] QNX4 filesystem 0.2.3 registered. 
[480205.124621] btrfs: relocating block group 4968366997504 flags 9
[480205.286706] btrfs: 1 enospc errors during balance
1

1 Answer 1

1

You probably have found a solution since then. But for all those still looking (like I was 15 min ago) here is an answer (source: https://btrfs.wiki.kernel.org/index.php/Balance_Filters see balancing when file system full)

You need to perform a balance without conversion and using a low value for the usage filter:

btrfs balance start -dusage=0 /storage/

Then you can try to increase the number for usage (e.g. -dusage=10).

Finally you should be able to start your balance with conversion.

See the source for all background explanations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .