Bug 1008707

Summary: swap space mentioned in fstab is not used
Product: Red Hat Enterprise Linux 7 Reporter: Harald Hoyer <harald>
Component: systemdAssignee: systemd-maint
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bruno, dennis, johannbg, lnykryn, mbanas, msekleta, nonamedotc, plautrba, salinasv, systemd-maint-list, systemd-maint, todoleza, vpavlin, zbyszek
Target Milestone: beta   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-207-4.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1008604 Environment:
Last Closed: 2014-06-13 11:07:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1008604    
Bug Blocks:    

Description Harald Hoyer 2013-09-16 22:30:10 UTC
+++ This bug was initially created as a clone of Bug #1008604 +++

Swap space in  Fedora 20 is not detected. 

/etc/fstab

/dev/mapper/luks-UUID2 /                       ext4
defaults,x-systemd.device-timeout=0 1 1
UUID=UUID-BOOT         /boot                   ext4 defaults        1 2
/dev/mapper/luks-UUID1 swap                    swap
defaults,x-systemd.device-timeout=0 0 0 

/etc/crypttab
luks-UUID1 UUID=UUID1 none
luks-UUID2 UUID=UUID2 none 

If I type swapon -s - it shows nothing. But if I do swapon -a and then
check, swap is used.

# swapon -a

# swapon -s
Filename                Type        Size    Used    Priority
/dev/dm-1                                  partition    7810044 0    -1 

The same setup works on Fedora 19 without problems.

Expected results:
Swap should be detected and used.

I do not know what other information would be needed. I can provide other information/files as needed.

This has now happened on multiple installations.

--- Additional comment from Orion Poplawski on 2013-09-16 13:37:23 EDT ---

Pretty sure systemd handles this.  I don't see a dev-*.swap unit anymore as well.

# systemctl | grep swap
swap.target                 loaded active active    Swap

UUID=202dbc9b-291c-428e-bcb0-f4fab2b8d84e swap                    swap    defaults        0 0

--- Additional comment from Piotr Drąg on 2013-09-16 15:29:39 EDT ---

The issue is known upstream https://bugs.freedesktop.org/show_bug.cgi?id=69291 and has been fixed in this commit http://cgit.freedesktop.org/systemd/systemd/commit/?id=4e82fe5213bedcb70e25c0270e516d5f2706d8c8

Comment 1 Bruno Wolff III 2013-09-17 12:23:26 UTC
systemd-207-2.fc21.i686 fixed this for me in rawhide.

Comment 2 Jorge Villaseñor 2013-09-18 06:36:11 UTC
It looks this one is duplicated of
https://bugzilla.redhat.com/show_bug.cgi?id=1008604

Comment 3 Lukáš Nykrýn 2013-10-17 09:49:12 UTC
This patch should be included in the last build.

Comment 4 Tomas Dolezal 2013-11-20 16:39:54 UTC
VERIFIED, swap is active after reboot

using luks partition encryption

pkg: systemd-207-8.el7.x86_64

verification output:
# swapon -s
Filename				Type		Size	Used	Priority
/dev/dm-0                              	partition	836604	0	-1

# systemctl | grep swap
dev-dm\x2d0.swap            loaded active active    /dev/dm-0
swap.target                 loaded active active    Swap

# cat /etc/fstab <(echo ----) /etc/crypttab 
<comment ommited>

/dev/mapper/luks-538eccdc-4872-4e87-bd13-6d81f20577fc /                       xfs     defaults,x-systemd.device-timeout=0 1 1
UUID=58c8d68b-00d3-4f92-b025-e6df6ec1f5f2 /boot                   xfs     defaults        1 2
/dev/mapper/luks-7849872c-b4fe-4d9e-a395-de40e2bc7daa swap                    swap    defaults,x-systemd.device-timeout=0 0 0
----
luks-7849872c-b4fe-4d9e-a395-de40e2bc7daa UUID=7849872c-b4fe-4d9e-a395-de40e2bc7daa none 
luks-538eccdc-4872-4e87-bd13-6d81f20577fc UUID=538eccdc-4872-4e87-bd13-6d81f20577fc none

Comment 5 Ludek Smid 2014-06-13 11:07:52 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.