Want to create btrfs top level 5 subvolume in an already installed system

Well as the title says. I want to create a top level 5 btrfs subvolume without having to use a live usb to do that. Is there any way to do it?
Edit: The btrfs partition is mounted at “/”

Sure.

sudo mkdir /mnt/btrfsroot
sudo mount /dev/mybtrfsdevice /mnt/btrfsroot -o subvolid=5
sudo btrfs subvolume create /mnt/btrfsroot/mysubvolname

Replace /dev/mybtrfsdevice with your actual device. i.e. /dev/sda2

Replace “mysubvolume” with whatever you want the toplevel subvolume to be named.

2 Likes

The problem is that the btrfs partition is mounted already at /

That doesn’t matter. It can be mounted more than once.

Thanks, I didn’t know that. Can other file systems be mounted more than once too like ext4 etc

Yes. Although, I haven’t tested every single one. :sweat_smile: