On Fri, May 15, 2020 at 7:16 AM antlists <antli...@youngman.org.uk> wrote:
>
> On 15/05/2020 11:20, Neil Bothwick wrote:
> >
> > Or you can create a custom module, they are just shell scripts. I recall
> > reading a blog post by Rich on how to do this a few years ago.
> >
> My custom module calls a shell script, so it shouldn't be that hard from
> what you say. I then need to make sure the program it invokes
> (integritysetup) is in the initramfs?

The actual problem that this module solves is no-doubt long solved
upstream, but here is the blog post on dracut modules (which is fairly
well-documented in the official docs as well):
https://rich0gentoo.wordpress.com/2012/01/21/a-quick-dracut-module/

Basically you have a shell script that tells dracut when building the
initramfs to include in it whatever you need.  Then you have the phase
hooks that actually run whatever you need to run at the appropriate
time during boot (presumably before the mdadm stuff runs).

My example doesn't install any external programs, but there is a
simple syntax for that.

If your module is reasonably generic you could probably get upstream
to merge it as well.

Good luck with it, and I'm curious as to how you like this setup vs
something more "conventional" like zfs/btrfs.  I'm using single-volume
zfs for integrity for my lizardfs chunkservers and it strikes me that
maybe dm-integrity could accomplish the same goal with perhaps better
performance (and less kernel fuss).  I'm not sure I'd want to replace
more general-purpose zfs with this, though the flexibility of
lvm+mdadm is certainly attractive.

-- 
Rich

Reply via email to