Bug 1008707 - swap space mentioned in fstab is not used
swap space mentioned in fstab is not used
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd (Show other bugs)
7.0
x86_64 Linux
unspecified Severity unspecified
: beta
: ---
Assigned To: systemd-maint
Tomas Dolezal
:
Depends On: 1008604
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-16 18:30 EDT by Harald Hoyer
Modified: 2014-06-17 20:35 EDT (History)
14 users (show)

See Also:
Fixed In Version: systemd-207-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1008604
Environment:
Last Closed: 2014-06-13 07:07:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 69291 None None None Never

  None (edit)
Description Harald Hoyer 2013-09-16 18:30:10 EDT
+++ 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 08:23:26 EDT
systemd-207-2.fc21.i686 fixed this for me in rawhide.
Comment 2 Jorge Villaseñor 2013-09-18 02:36:11 EDT
It looks this one is duplicated of
https://bugzilla.redhat.com/show_bug.cgi?id=1008604
Comment 3 Lukáš Nykrýn 2013-10-17 05:49:12 EDT
This patch should be included in the last build.
Comment 4 Tomas Dolezal 2013-11-20 11:39:54 EST
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 07:07:52 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.