I thought raid0 "striped" the data across two or more devices to
increase total capacity, for example when adding a new device to an
existing filesystem. But that is not apparently what I ended up with.

Before:
btrfs device usage /mnt/backup/
/dev/sdc1, ID: 1
   Device size:           300.00GiB
   Device slack:              0.00B
   Data,single:           226.01GiB
   Metadata,DUP:            8.00GiB
   System,DUP:             64.00MiB
   Unallocated:            65.93GiB

/dev/sdc2, ID: 2
   Device size:           300.00GiB
   Device slack:              0.00B
   Data,single:             1.00GiB
   Unallocated:           299.00GiB

Then, I ran command:
btrfs balance start -dconvert=raid0 -mconvert=raid1 /mnt/backup

And what I ended up with seems to be double the amount of data used,
like what I think would happen with raid1, not raid0:

btrfs device usage /mnt/backup/
/dev/sdc1, ID: 1
   Device size:           300.00GiB
   Device slack:              0.00B
   Data,RAID0:            228.00GiB
   Metadata,RAID1:          5.00GiB
   System,RAID1:           64.00MiB
   Unallocated:            66.94GiB

/dev/sdc2, ID: 2
   Device size:           300.00GiB
   Device slack:              0.00B
   Data,RAID0:            228.00GiB
   Metadata,RAID1:          5.00GiB
   System,RAID1:           64.00MiB
   Unallocated:            66.94GiB

Or, am I misinterpreting what I am seeing? Thank you.

# uname -a
Linux tux 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01
+0000 x86_64 GNU/Linux
# btrfs --version
btrfs-progs v5.9
# btrfs fi show
Label: none  uuid: c0f4c8e2-b580-4c0d-9562-abdb933b9625
        Total devices 1 FS bytes used 13.11GiB
        devid    1 size 449.51GiB used 14.01GiB path /dev/sda3

Label: none  uuid: 4fe39403-7ba1-4f22-972f-5041e3b6ff6f
        Total devices 1 FS bytes used 37.36GiB
        devid    1 size 600.00GiB used 40.02GiB path /dev/sdb1

Label: none  uuid: 1751eeca-c1a2-47bb-906b-c7199b09eb6d
        Total devices 2 FS bytes used 229.57GiB
        devid    1 size 300.00GiB used 233.06GiB path /dev/sdc1
        devid    2 size 300.00GiB used 233.06GiB path /dev/sdc2

# btrfs fi df /mnt/backup
Data, RAID0: total=456.00GiB, used=226.65GiB
System, RAID1: total=64.00MiB, used=64.00KiB
Metadata, RAID1: total=5.00GiB, used=2.92GiB
GlobalReserve, single: total=401.84MiB, used=0.00B

Reply via email to