I am setting up a system with two 3TB hard drives as storage backing. As it's a desktop station, I thougth about the following disk setup:
sda
+ /boot with 500MB
+ btrfs for the remaining GBytes
sdb
+ btrfs for all the 3000GB
I then thought about using the single
-mode for data on /
and create a subvolume for /home
(and potentially others) using raid1
as data mode. Is that possible with current (kernel 3.7.X) btrfs? Does anyone have sources for that, I was unable to find anything.
UPDATE: I made a small test setup consisting of two plain files hooked in as loopback devices for playing around. On those files, I created a plain btrfs. Then I did the following:
btrfs subvolume create test
dd if=/dev/urandom of=foo bs=1024 count=1 # use random data to prevent dedup
dd if=/dev/urandom of=test/bar bs=1024 count=1 # use random data to prevent dedup
btrfs balance start -dconvert=raid1 test
btrfs balance start -dconvert=single .
btrfs filesystem df .
That showed the filesystem having all its usage in single mode, instead of partial RAID1 and partial single modeā¦ what did I do wrong?
Best Answer
The btrfs balance command applies to filesystems as shown by the help even thought the "filesystem" parameter is optional:
Until there is a "btrfs subvolume balance" command then I suspect this feature doesn't exist.
(Above based on Btrfs Btrfs v0.19)