systemd crashing swap partitions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Hi,
systemd still kills the swap device sometimes.
I typically avoid lvm and prefer the partition scheme like
/dev/sda1 unencrypted boot
/dev/sda2 luks-encrypted swap
/dev/sda3 luks-encrypted /root
and haven an /etc/crypttab like
sda2_crypt UUID=a5b1de14-
sda3_crypt UUID=9ec0971c-
Since using systemd it sometimes happens that the system does not boot anymore. Analysis shows that for some reason the swap partition (the raw partition before encryption) contains just rubbish, and since systemd insists on getting this swap device for dependencies and thus never fulfills it's dependencies.
I have no idea what happens insided that damned systemd, since I did not found any debugging method to see what systemd does. If /etc/crypttab contains a swap tag, systemd tries to run mkswap and something goes wrong every now and then (not always, most of the time it works as expected).
My current guess is that there is some race condition between the normal mount and recreating the swap, and it looks as if systemd has dependencies twice, for the device name (sda2 and sda2_crypt) and the UUID, maybe two processes are spawned instead of one and interfere.
However, it makes systems unstable and unreliable.
regards
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: systemd 229-4ubuntu17
ProcVersionSign
Uname: Linux 4.4.0-66-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Jul 2 09:06:42 2017
MachineType: Medion G24
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /lib/systemd/
[EXTENDED] /lib/systemd/
2 overridden configuration files found.
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/12/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: H61TIW08.111
dmi.board.
dmi.board.name: H61H2-TI2
dmi.board.vendor: Medion
dmi.board.version: 1.0
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Medion
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: G24
dmi.product.
dmi.sys.vendor: Medion
please reopen if this is still an issue