On 24/09/2021 21:30, Canek Peláez Valdés wrote:
On Fri, Sep 24, 2021 at 2:25 PM antlists <[email protected]
<mailto:[email protected]>> wrote:
This is weird ...
My /home directory is set up somewhat strangely, as in I've got two raw
partitions, I've put dm-integrity on them, raided them together, then
put lvm on top of that.
Which got me into a bind with fstab. I've created a systemd service,
which fires up dm-integrity on those two partitions. But I get the
impression it doesn't run until fstab completes. Catch-22 - fstab tries
to mount /home, but it can't until dm-integrity has made the volume
appear!
Have you tried using Before=local-fs.target in the service? Or even
Before=local-fs-pre.target?
Bear in mind, integritysetup is not in my initrd, so ...
It looks to me like grub switches to the real root partition read-only
before firing stuff off, so if I tell my integritysetup.service to run
before local-fs.target, does that mean everything should be working
before systemd runs fstab?
Bear in mind dm-integrity is on my raw partitions, and I'm running lvm
and md-raid, I'm guessing they're part of local-fs-pre.target? So I
really need to run dm-integrity before that? Or preferably add
dm-integrity TO that - how do I do that?
The problem is this isn't all that discoverable - even digging around
/etc/systemd, it's hard to find clues ...
Cheers,
Wol