I'm converting an older system from Debian to guix. I've got it all set up with brand new large spinning disks and some SSD partitions to act as bcache cache devices.

When the system boots the bcache devices aren't recognized. If I run

bcache show

I can get a list of devices

and if I run

bcache register X

on all the devices X listed in the list... I can get /dev/mapper/bcache0 and /dev/mapper/bcache1 where my filesystems reside.

Rather than doing this manually on every boot, I'd like guix to register the devices during boot, maybe by including a bcache-registration-service-type in my services?

The actual code to use open-pipe* to run bcache and accomplish the stuff isn't too hard in guile but the part I don't understand is how to hook this registration process into the boot process so that the machine can just come up with bcache devices registered and the relevant fs mounted?

I'm happy to write the necessary code and submit it as a PR, but I need help understanding how guix boots and how the shepherd works enough to figure out how to hook into the boot process.

Can someone describe at high level, the "right way" to get shepherd to call my scheme functions to register the bcaches?



Reply via email to