Ask Your Question

Swap partition not working

asked 2019-02-25 12:21:42 -0500

equus gravatar image

Hello! I think my swap partition is not enabled. I did some search in DuckDuckGo to understand how to enable it but I'm not confident with the process because I don't know for sure if the information I read applies to my case. How do I make the swap partition works? I'm using Fedora 29. Thank you in advance.

Here is some log info:

[username@localhost ~]$ free
              total        used        free      shared  buff/cache   available
Mem:        7602764     3475196      895188      528888     3232380     3328988
Swap:             0           0           0
[username@localhost ~]$ systemctl status
● - Swap
   Loaded: loaded (/usr/lib/systemd/system/; static; vendor preset: >
   Active: active since Mon 2019-02-25 06:31:54 -03; 8h ago
     Docs: man:systemd.special(7)

Warning: Journal has been rotated since unit was started. Log output is incompl>

[username@localhost ~]$ blkid
[username@localhost ~]$ su
[root@localhost username]# blkid
/dev/sda1: LABEL="Disco 2 Win7" UUID="3ADCD220DCD1D66B" TYPE="ntfs" PARTUUID="7eec331b-01"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="b5ee2e24-8bb9-4108-ae62-5cf26077a53e"
/dev/sdb2: LABEL="Disco 3" UUID="EEB04854B0482605" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="f9ae43b5-7dcc-42dd-9bd3-f71a1b83a3c8"
/dev/sdb4: SEC_TYPE="msdos" UUID="215F-1F70" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="30025d5a-7534-4a42-9748-457ebc262b05"
/dev/sdb5: UUID="09e324ac-ea07-424d-9508-45f37f089b75" TYPE="ext4" PARTUUID="d6420cee-788a-406d-88cb-cf052ff38d6a"
/dev/sdb6: UUID="ttayx8-fqkl-hxFf-T327-Vfo5-VwPE-zoiKRZ" TYPE="LVM2_member" PARTUUID="eab766b1-f597-47dc-9e59-a05fb3fad35e"
/dev/mapper/fedora-root: LABEL="fedora-root" UUID="38dffae5-42ef-45c4-a6bd-7507427c4bd2" TYPE="ext4"
/dev/mapper/fedora-swap: UUID="1e9bbf5d-da7b-401f-8999-085acf39ad61" TYPE="swap"
/dev/mapper/fedora-home: UUID="e3226ce9-2707-48a1-b1a4-c0e47077adbf" TYPE="ext4"
[root@localhost username]# cat /etc/fstab

# /etc/fstab
# Created by anaconda on Sun Dec 23 18:22:43 2018
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
/dev/mapper/fedora-root /                       ext4    defaults        1 1
UUID=09e324ac-ea07-424d-9508-45f37f089b75 /boot                   ext4    defaults        1 2
UUID=215F-1F70          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
/dev/mapper/fedora-home /home                   ext4    defaults        1 2
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-02-25 12:44:09 -0500

hhlp gravatar image

updated 2019-02-25 12:48:00 -0500

@equus -> what about swapon -a refer

swapon is used to specify devices on which paging and swapping are to take place.

-a, --all All devices marked as "swap" in /etc/fstab are made available, except for those with the "noauto" option.

Devices that are already being used as swap are silently skipped.

aditional to this you don't have swap in your /etc/fstab

/dev/mapper/fedora-swap swap                    swap    defaults        0 0


edit flag offensive delete link more


I wrote the text in the /etc/fstab then I entered swapon -a and now I see the available memory when I enter the free command. It worked. Thank you!

equus gravatar imageequus ( 2019-02-25 13:06:31 -0500 )edit

Question Tools

1 follower


Asked: 2019-02-25 12:21:42 -0500

Seen: 54 times

Last updated: Feb 25 '19