On Sep 23, 2013 3:22 AM, "Stefan G. Weichinger" <lists@xunil.at> wrote:
>
> Am 23.09.2013 10:00, schrieb Stefan G. Weichinger:
>
> > Getting that unit-name right is quite annoying ... fiddling with
> > understanding that strange escaping etc ... :-(
>
> I have now:
>
> # cat /etc/systemd/system/dev-disk-by\\x2did-dm\\x2dname\\x2dswap.swap
> [Unit]
> #After=systemd-cryptsetup.service
> After=systemd-cryptsetup@swap.service
>
> [Swap]
> What=/dev/disk/by-id/dm-name-swap
>
> see the comment, I tried both because the swap was not activated after
> boot but it is when I manually start it.
>
> I only have:
>
> # systemctl | grep cry
> cryptsetup.target loaded active active Encrypted Volumes
>
> so I edited the dependency. This gave me encrypted swap once already
> after manually starting the swap-unit.
>
>
> But after booting it still generates another swap.service which makes
> the new unit fail or run into a timeout.
>
> # systemctl | grep swap
> dev-mapper-swap.device loaded inactive dead start
> dev-mapper-swap.device
> systemd-...p@swap.service loaded active exited Cryptography
> Setup for swap
> swap.target loaded active active Swap
>
> oh my ... Glad to have enough RAM for now ;-)
>
> for the records: no swap-stuff in fstab ...
Did you read my next email? There is no need for the extra swap unit. I was missing a couple of kernel options and to compile LVM2 and cryptsetup with some USE flags. Everything works as expected; but you need to put the swap in fstab.
Regards.