systemd is activating swap twice, through both fstab and gpt generators
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Debian) |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
systemd is activating swap twice, via its sda name and its uuid.
It looks like it's because two swap units are being generated.
# journalctl | grep swap | grep -v unit_create_cgroups
Dec 05 04:30:40 yoga.lenovo systemd[1]: Activating swap Swap Partition...
Dec 05 04:30:40 yoga.lenovo systemd[1]: Activating swap /dev/disk/
Dec 05 04:30:40 yoga.lenovo swapon[396]: swapon: /dev/disk/
Dec 05 04:30:40 yoga.lenovo systemd[1]: dev-disk-
Dec 05 04:30:40 yoga.lenovo systemd[1]: Failed to activate swap /dev/disk/
Dec 05 04:30:40 yoga.lenovo systemd[1]: Unit dev-disk-
Dec 05 04:30:40 yoga.lenovo systemd[1]: Activated swap Swap Partition.
Dec 05 04:30:40 yoga.lenovo kernel: Adding 8298492k swap on /dev/sda3. Priority:-1 extents:1 across:8298492k SSFS
# systemctl status dev-sda3.swap
● dev-sda3.swap - Swap Partition
Loaded: loaded (/run/systemd/
Active: active since Fri 2014-12-05 04:30:40 EST; 27min ago
What: /dev/sda3
Docs: man:systemd-
Process: 395 ExecActivate=
Dec 05 04:30:40 yoga.lenovo systemd[1]: Activating swap Swap Partition...
Dec 05 04:30:40 yoga.lenovo systemd[1]: Activated swap Swap Partition.
# systemctl status dev-disk-
● dev-disk-
Loaded: loaded
Active: inactive (dead)
What: /dev/disk/
# swapon -s
Filename Type Size Used Priority
/dev/sda3 partition 8298492 0 -1
# blkid /dev/sda3
/dev/sda3: UUID="73d341f1-
# find /run -name "*73d341f1*"
/run/systemd/
/run/systemd/
/run/udev/
# find /run -name "*sda3*"
/run/systemd/
/run/systemd/
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 217-3ubuntu1
ProcVersionSign
Uname: Linux 3.16.0-25-generic x86_64
ApportVersion: 2.14.7-0ubuntu10
Architecture: amd64
CurrentDmesg: Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: No such file or directory
Date: Fri Dec 5 04:51:30 2014
MachineType: LENOVO 20266
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/25/2014
dmi.bios.vendor: LENOVO
dmi.bios.version: 76CN35WW
dmi.board.
dmi.board.name: Yoga2
dmi.board.vendor: LENOVO
dmi.board.version: 31900058STD
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 20266
dmi.product.
dmi.sys.vendor: LENOVO
mtime.conffile.
Changed in systemd (Debian): | |
status: | Unknown → Confirmed |
Changed in systemd (Debian): | |
status: | Confirmed → Fix Released |
(I can't find the option to tag this report with "systemd-boot". Is this a question of Launchpad permissions or am I too stupid to find the right thing to click?)
I saw that "/lib/systemd/ system- generators/ " has systemd- fstab-generator and systemd- gpt-auto- generator so I disabled swap in my fstab:
# grep swap /etc/fstab eedc-43fc- 9e53-ba4194dae3 fb none swap sw 0 0
#UUID=73d341f1-
And swap's now activated once:
# journalctl | grep swap | grep -v unit_create_cgroups
Dec 06 04:21:00 yoga.lenovo systemd[1]: Activating swap Swap Partition...
Dec 06 04:21:00 yoga.lenovo kernel: Adding 8298492k swap on /dev/sda3. Priority:-1 extents:1 across:8298492k SSFS
Dec 06 04:21:00 yoga.lenovo systemd[1]: Activated swap Swap Partition.
# swapon -s
Filename Type Size Used Priority
/dev/sda3 partition 8298492 0 -1
# find /run -name "*73d341f1*" links/\ x2fdisk\ x2fby-uuid\ x2f73d341f1- eedc-43fc- 9e53-ba4194dae3 fb
/run/udev/
# find /run -name "*sda3*" generator. late/swap. target. wants/dev- sda3.swap generator. late/dev- sda3.swap
/run/systemd/
/run/systemd/