3

I'm using btrfs for my home directory, which spans multiple devices. In total I should have around 7.3TB of space - and that's what df shows, but I ran out of space after using only 5.7TB of data:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd3       7.3T  5.7T   63G  99% /home

btrfs has this to say for itself:

# btrfs fi df /home
Data, RAID0: total=5.59TB, used=5.59TB
System, RAID1: total=8.00MB, used=328.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=11.50GB, used=8.22GB

Which is weird, because there should have been enough partitions to support 7.3TB (also, the btrfs data configuration should have been "single" and not RAID0).

Here is what btrfs show says:

# btrfs fi show
Label: none  uuid: 2dd4a2b6-c672-49b1-856b-3abdc12d56a5
    Total devices 9 FS bytes used 5.59TB
    devid    2 size 303.22GB used 303.22GB path /dev/sdb1
    devid    3 size 303.22GB used 303.22GB path /dev/sdb2
    devid    4 size 325.07GB used 324.50GB path /dev/sdb3
    devid    1 size 2.73TB used 1.11TB path /dev/sdc1
    devid    5 size 603.62GB used 589.05GB path /dev/sdd1
    devid    6 size 632.22GB used 617.65GB path /dev/sdd2
    devid    7 size 627.18GB used 612.61GB path /dev/sdd3
    devid    8 size 931.51GB used 931.51GB path /dev/sde1
    devid    9 size 931.51GB used 931.51GB path /dev/sde2

As you can see, devid 1 (which is the last disk I added) has only 1.11TB used out of 2.73TB available in the partition (its a supposedly 3TB drive, but only 2.7TB usable :-[ ).

I've searched far and wide but couldn't figure out how to make btrfs use more of the partition. What am I missing?

Notes:

  1. I'm using Ubuntu 12.04.2 with the current kernel 3.2.0-23.
  2. This is after I've ran btrfs fi resize max /home and btrfs fi balance /home
Guss
  • 3,775

1 Answers1

2

You're using data raid0, which means striped without parity. Once you fill ANY disk in a raid0 array, the array is full because you no longer have room on that disk to write its piece of a stripe.

That ~3TB device is just too much larger than the other devices you have to make full use of it in a btrfs-raid0 practical. To try to force the system to use the whole disk, you'd end up needing to partition it and then add both partitions as separate disks. DON'T DO THAT, by the way, as it will do weird and awful things to performance, which I would assume is pretty critical to you if you're using raid0...?

Another note: 3.2 is a pretty ancient kernel to be running btrfs IMO. Btrfs is still in HEAVY development, and you really should be tracking much newer kernels if you're going to run btrfs.

Using Btrfs with Multiple Devices - Filesystem creation: When you have drives with differing sizes and want to use the full capacity of each drive, you have to use the single profile for the data blocks, rather than raid0:

# Use full capacity of multiple drives with different sizes (metadata mirrored, data not mirrored and not striped)  
mkfs.btrfs -d single /dev/sdb /dev/sdc
bain
  • 12,200
Jim Salter
  • 4,383