On 24/09/2021 21:30, Canek Peláez Valdés wrote:
On Fri, Sep 24, 2021 at 2:25 PM antlists <antli...@youngman.org.uk
<mailto:antli...@youngman.org.uk>> 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?
You mean in my integritysetup.service file? No, because in scrabbling
around to try and find out what magic incantation was required, I didn't
find it.
There's a lot of info about how to write a service file, but if you need
to run before or after system service files, it's nowhere near so easy
to find out Before=WHAT or After=WHAT :-)
So I created a systemd mount unit for /home, which only runs after
dm-integrity. Great - I enabled it and it appeared to work!
You removed the /home entry from fstab, right?
mad it noauto, yes ...
Only problem, startplasma-wayland now dumped me at a blank screen.
Now for the weirdo. I disabled it, thinking I would have to log in as
root, mount /home, and go from there. Except that, when I logged in,
/home was mounted and startplasma-wayland worked!
That sounds like /home was still on fstab...
#LABEL=boot /boot ext4 noauto,noatime 1 2
/dev/disk/by-uuid/F436-354A /boot vfat noauto,noatime 1 2
#UUID=58e72203-57d1-4497-81ad-97655bd56494 / ext4
noatime 0 1
#LABEL=swap none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/vg-root/lv-gentoo / ext4 rw 0 0
/dev/vg-home/lv-data /home ext4 noauto,rw 0 0
/dev/disk/by-uuid/e2b75f09-8cb4-4e20-9cfd-21c0aadfa540 none swap
sw,pri=1 0 0
/dev/disk/by-uuid/e03459f5-1f57-485b-92e4-b09cf50534c1 none swap
sw,pri=1 0 0
systemctl tells me mount.home is disabled, but also tells me that it
ran
and mounted the drive.
That should be home.mount. What does systemctl status home.mount says?
anthony@thewolery ~ $ systemctl status home.mount
● home.mount - Mount Home
Loaded: loaded (/etc/systemd/system/home.mount; disabled; vendor
preset: disabled)
Active: active (mounted) since Fri 2021-09-24 20:13:49 BST; 2min
51s ago
Where: /home
What: /dev/mapper/vg--home-lv--data
CPU: 13ms
CGroup: /system.slice/home.mount
Sep 24 20:13:48 thewolery systemd[1]: Mounting Mount Home...
Sep 24 20:13:49 thewolery systemd[1]: Mounted Mount Home.
anthony@thewolery ~ $ cd Scans/HP-M477/
So what on earth is going on, and more importantly, what am I
misunderstanding or doing wrong. I would very much like to know why
it's
working, when I think it shouldn't be!
So fstab says noauto, home.mount is disabled, and /home is mounted on
boot...
Cheers,
Wol