3

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?

6

The btrfs balance command applies to filesystems as shown by the help even thought the "filesystem" parameter is optional:

# btrfs balance start --help
usage: btrfs [filesystem] balance start [options] <path>

Until there is a "btrfs subvolume balance" command then I suspect this feature doesn't exist.

(Above based on Btrfs Btrfs v0.19)

  • correct: this feature is planned but not yet implemented (also looking forward to this) – wuppi Sep 5 '16 at 7:47
0

I am just moving to btrfs and I have exactly the same request. The only solution I came up, is the obvious one: just create two separate/independent btrfs filesystemes (i.e. top-level subvolumes), one for each raid-level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.