Created
November 13, 2015 22:14
-
-
Save lobeck/25046e579b337416e65c to your computer and use it in GitHub Desktop.
kickstart file using two disks and btrfs without a partition table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disk 1: /boot and swap | |
# disk 2: btrfs without partitions | |
# | |
# the %pre section will create the brtfs filesystem, the label passed by -L is used to trick anaconda so it will find the filesystem | |
# the part statement below does actually nothing but is required for the subvolumes to be created | |
# otherwise there would be parse errors and anaconda would refuse the installation | |
# | |
part btrfs.10 --fstype=btrfs --noformat --label=docker --onpart=LABEL=docker | |
btrfs / --subvol --name=root docker | |
btrfs /var/log --subvol --name=varlog docker | |
btrfs /var/lib --subvol --name=varlib docker | |
%pre | |
mkfs.btrfs -f -L docker /dev/vdb | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: With this approach, there are two disks required as you can not create a swap file/partition on a brtfs volume - or at least a swap file is not recommended (haven't tested this)
In the past i've used a similar setup for with LVM instead of btrfs in virtual machines. The reason for this has been the lack of "clean" ways to resize partitions containing LVM PVs and to expand the disk anytime without a single reboot / service downtime - additionally with LVM or btrfs you really don't need partitions anymore as they have no real use when you can do many more things using these two storage managers.