Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Probably stupid questions but here goes:

  1. Can btrfs use only a portion of a HDD in a raid "array"?

  2. I have 3 HDDs: 80GB, 160GB, and 200GB external USB. I want to put root+boot in the first 20GB of the smallest drive on EXT4 and use the rest of the free space on all 3 drives for a btrfs "raid10 array". Is this possible?

  3. Is this sane? Would you do it differently?

share|improve this question
add comment

3 Answers

1) Yes
2) Yes
3) Seems sane to me.

share|improve this answer
    
I'm at the point of running "sudo mkfs.btrfs -m raid10 -d raid10 /dev/sda2 /dev/sdb /dev/sdc" but it doesn't honor sda2. I'm hesitant to just put sda because I have not read anything indicating it'll leave current partitions on the drive alone. Further, certain man pages mention options for specifying which block to start at and starting at zero by default. –  bumbling fool Feb 9 '11 at 20:22
add comment

1) Yes, but this can cause problem's in the earlier versions of the FS (pre may 2011).
2) Although this can be done, in hindsight, I should have either used all drives in an array with /boot and everything else on there, or added another smaller driver for /boot & /root
3) Not really... See 2

share|improve this answer
    
re:2, why was this bad? (ie, edit your answer to explain why) –  djeikyb Mar 18 '11 at 22:01
add comment

The "raid10" switch requires minimum of 4 drives according to https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Creating_a_Multi-device_FS . . . but I wonder if you might be able to use md-raid? or even if putting btrFS atop LVM might "trick" btrFS into thinking "bumbling fool" has 4 physical-devices? OTOH, would LVM or md-raid slow btrFS and what would be the point given that ext4 has online-fsck and is roughly as fast as btrFS in a "basket" of wide-ranging benchmarks for general-purpose use (i.e. unless you use your filesystem for a narrow range of tasks in which btrFS is faster than ext4)?

"sudo mkfs.btrfs raid[n]" also cannot yet give one subvolume a different RAID level than other subvolumes according to https://btrfs.wiki.kernel.org/index.php/Project_ideas#Online_raid_config ...but I'm not sure if that means the usage by "bumbling fool" of a hard-partition (for /boot & root) would suddenly make his /boot and root become "not a subvolume" and thus can be a different "mkfs.btrfs raid-level" WHILST ALSO RECOGNIZING & ACCESSING HIS /HOME PARTITIONS?

The problem I see with btrFS lacking this ability to have one large partition per physical-device, then making different raid-levels WITHIN that one partition, is you might as well use ext4 on LVM -- because the main difference of btrFS vs. LVM is that btrFS doesn't have PRE-DEFINED SIZES of /boot (or root) compared to /home, and in contrast LVM might need a LV resized (or deleted) in order to adjust its size relative to other partitions. btrFS loses that advantage --and ext4 has advantages that btrFS hasn't implemented yet, like the online-fsck-- once you strive for differing raid-levels (even if it works to put root & /boot on a separate hard-partition as "bumbling fool" did); also for dm-crypt/LUKS, you might as well use ext4-on-LVM instead of btrFS placed on multiple hard-partitions -- to avoid needing separate passwords for the various hard-partitions.

Until btrFS gets that raid-for-each-subvolume feature I think it isn't ready for "bumbling fool" (or me, since I use dm-crypt & wanna avoid having 3 passwords for 3 hard-partitions on each drive). ...but e.g. if "bumbling fool" just used 4 hard-drives, would his "mkfs.btrfs raid10" idea have worked?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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