Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

systemd-unit for a second LVM

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
rolf3945
Posts: 7
Joined: 2009-06-11 19:29

systemd-unit for a second LVM

#1 Post by rolf3945 »

Given: an encrypted Stretch on SSD, as usual /boot un-encrypted, with an luks-encrypted volume containing a LVM for /root and /swap in the logical volumes. This setup is nicely decrypted, fscked and mounted during boot, the PC is usable afterwards.

Got a second luks encrypted volume on a big disk, also containing a LVM with 2 logical volumes, one of them intended to replace the /home on the SSD. I managed to get the luks container opened during boot with a keyfile, and now I am stuck. There is no more automatic action, I have to enable the LVM with vgscan and vgchange manually, and then I can do a fsck the ext4 filesystem on the LVs and then mount the LVs.

I want this to be happen automatically. As far as I understand the man pages and the Ubuntu Howto, I need to put this into a systemd unit (I am new to this). Reading the stuff has not really helped me, its very theoretical and I am missing practical examples how to handle such a bit more unusual situation. Also the most trusted web search machine has not put up something I could use for such a use case.

Hints how to generate or write a suitable unit are welcome.

Thanks for reading, Rolf

Post Reply