ShadowKat Studios
Blog
Projects
About

Adventures in btrfs

btrfs is quite possibly the greatest filesystem ever. Okay, I can’t really say that because I haven’t tried zfs yet (one day…), but it has some really cool features.

So, in the time I had off I reinstalled my laptop to be even more paranoid, the details I will not get into. However, I will say that I installed Arch, Debian and a copy of Windows 7. Let me tell you, partitioning and not breaking Windows is a real pain. Did you know Windows doesn’t like it if you overwrite the System Reserved partition?

Anyway, the Windows is boring. Some of the interesting things I did are:

How does that work?
Well, btrfs has a cool system of subvolumes, which can be mounted independantly of each other. So, I have the debian system as the root of the filesystem, and /var/lib/lxc/arch/rootfs as a subvolume containing a bootable arch system.
I also did the same thing with /boot - except Arch is the one in control here, mainly because it’s easier to do fun stuff with the bootloader on Arch. The /boot partition also has subvolumes - one named debian at present, as I can use that to load the debian kernel and initramfs without doing weirder stuff with other filesystems.

So, depending on the OS running at the time, you have two possible FS layouts:

So this is how I have two distros on the same filesystem. You can also run Arch as an LXC container from Debian, ‘cause why not?
My next experiment will be installing NixOS on the same filesystem, we’ll see how well that works.

By Izaya

Tags: tech linux software

<---
Fediring
--->

© ShadowKat Studios
The software used to generate this page is licensed under the Mozilla Public License version 2 and can be found here