metal-stack / mini-lab

a small, virtual setup to locally run the metal-stack
MIT License
55 stars 13 forks source link

Use ext4 options #150

Closed ulrichSchreiner closed 4 months ago

ulrichSchreiner commented 4 months ago

When firecracker creates a blockdevice for KVM it formats it with EXT4. The options for the filesystems are normally in /etc/mke2fs.conf . On my system (ARCH) i have the settings

ext4 = {
  features = has_journal,extent,huge_file,flex_bg,metadata_csum,metadata_csum_seed,64bit,dir_nlink,extra_isize,orphan_file
}

After the creation firecracker exports the contents of the given VM-container-image to this blockdevice and starts a KVM process.

In our case the VM is a very old cumulus image and the kernel in this image cannot handle the mountoption metadata_csum so the VM does not start and the whole minilab does not work.

This PR bundles a custom configuration file which is referenced by MKE2FS_CONFIG in the makefile, so all processes started by the Make-process will inherit this.

In cases where one already has a blockdevice with this new mount-option: you can remove the device from /var/lib/firecracker (if you do nothing with firecracker except minilab, you can simply delete all contents). after this, start minilab and firecracker will create a new blockdevice with ext4 but not the problematic FS-options.