I'm attempting to setup an Ubuntu server with the following disks:
/dev/sda is a 2TB disk, which will host much of the OS. It is currently partitioned as follows:
/dev/sda1: EFI Boot partition (488.3GB), mounted as
/dev/sda2: LVM partition, added to
mymachine_vgLVM volume group.
mymachine_vg contains just a single partition (
/dev/sda2), with two logical volumes:
mymachine_swap: a 122.1GB swap partition (
mymachine_root: a 1.4TB BTRFS partition (
/dev/dm-1), mounted as
I also have two 8TB drives,
/dev/sdc that I want to operate as a RAID1 array under BTRFS. I formatted these drives as follows (all commands listed as run as
root, unless stated otherwise):
mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc
I've installed a base Ubuntu system, and only the
/dev/sda disk's partitions, etc. are currently mounted.
If I run
btrfs filesystem show, I get the following output:
$ btrfs filesystem show Label: none uuid: 357d0492-9802-48f4-9656-4011c32d9e62 Total devices 1 FS bytes used 1.80GiB devid 1 size 1.22TiB used 4.04GiB path /dev/dm-1 Label: none uuid: 0ed53e28-cdee-40e3-9316-69446f34e6af Total devices 2 FS bytes used 640.00KiB devid 1 size 7.28TiB used 2.03GiB path /dev/sdb devid 2 size 7.28TiB used 2.01GiB path /dev/sdc Btrfs v3.12
Ideally, what I'd like to achieve is to use the RAID1 array for the
/srv directories; presumably as BTRFS subvolumes. All the other directories would belong to the root logical volume
Is this possible? If so, what do I need to do in terms of BTRFS configuration, subvolumes, device adding, etc.?
It seems I can only create subvolumes in subdirectories of a mounted device. I'm also unsure of the consequences of adding the RAID1 array to the
Thanks for any assistance you can provide. If you need further information, just ask!
(As further background, I'm replacing a 32-bit Ubuntu 14.03 server which cannot be upgraded to a more recent Ubuntu release because some of the software requires 64-bit operation. This system has to be setup, initially, as a 64-bit Ubuntu 14.03 server so that I can transfer data from the old server, then perform the necessary upgrades. As a result, I'm restricted to the Ubuntu 14.03 version of the
btrfs-tools package. I'm taking the opportunity to switch over to BTRFS as an experimental aside.)