On Wed, Aug 24, 2011 at 12:28 AM, Gour-Gadadhara Dasa email@example.com wrote:
On Mon, 22 Aug 2011 14:25:52 -0500 C Anthony Risinger firstname.lastname@example.org wrote:
... tbh, unless you want to get a feel for it, are ready to troubleshoot, or have a specific use-case -- and have some other backup systems in place -- you'll probably just want to roll with "the usual" for now.
Let me say that I'm a bit spoiled with elegant setup I've on FreeBSD with ZFS and would like to mimic it on Linux with btrfs.
Machine is connected to UPS and I've tape backup.
However, I'm still not sure how the setup should be for 2 disks in mirror?
With ZFS, I've everything; iow. root, boot & swap in single pool which is then mirrored to the 2nd disk which is part of the same pool.
With btrfs, I understand I can avoid using separate /boot and have root on btrfs, add two disks as raid-1 under btrfs partition, but wonder whato do in regard to swap considering btrfs does not provide swap space?
Does it mean that I'd have to create separate swap partitions on each disk and put them into raid-1 array with mdadm and then put the rest of the disk(s) as btrfs partion in mirror?
unfortunately you can only do /boot on btrfs if you use a single disk due to bootloader limitations:
... details most of the procedure, but it needs to be updated because until bootloaders and utilities can handle it better, the result is a PITA to work with ... newer btrfs features like compression render your system unbootable unless you manually decompress the kernel image, there is no partition table so you can't modify the disk layout after the fact, etc etc. page needs a warning or something.
swap has been disabled in btrfs because it will corrupt it ... btrfs move blocks around constantly while performing COW and swap file/partition expects stable address block IIRC -- which btrfs does not guarantee or even attempt -- so you end up corrupting the FS *bad*. using a loopback device + swapfile *should* work, but i don't know of anyone actually doing it yet :-)
so yeah, you'd need something like `mdadm` to handle the RAID bits. eventually i hope to get `mkinitcpio-btrfs` updated to do fancy stuff like a 2-stage kexec boot so you CAN boot from a btrfs array ... but idk when that will be :-) ... mostly working ATM but time time time ... there's never enough.
after all that, it might be simpler to just use ext4 since your running softraid anyway ... unless you want to try stuff like compression and snapshots.