Officially CentOS8 does not support BTRFS (the RedHat ppl had it as a demo feature on CentOS7 which allowed one to install the os on a root partition with btrfs as the filesystem) so do this at your own peril.
- install CentOS8
- dnf upgrade -y
- get the remi repos for el8 installed
- dnf install kernel-ml
- dnf install btrfs*
- edit /etc/dracut.conf.d/btrfs.conf
add btrfs relevant crap to it like filesystems and modules and whatnot - dracut -f -v /boot/initramfs-$(uname -r).img $(uname -r)
- boot the machine using a livecd that has btrfs
- btrfs-convert /dev/vda2
- /boot/grub2/grub.cfg
insmod btrfs - edit /etc/fstab and adjust uuid for / as well as filesystem type change to btrfs
- selinux might be a problem so disable and boot
- after successfull boot on btrfs touch /.autorelabel and reenable selinux
Considering we’re in 2021 and that many other distros play nice with btrfs I’d say don’t do this using CentOS8 unless you need to run CentOS8 (or a clone like Alma) … there are far better alternatives out there that have integrate btrfs properly (ex. OpenSuse, Ubuntu, etc)
Enjoy!