Results 1 to 7 of 7

Thread: Swap space is not available after 15.1 installation

  1. #1
    Join Date
    Dec 2008
    Location
    NSW, Australia
    Posts
    86

    Default Swap space is not available after 15.1 installation

    I recently upgraded from 42.3 to 15.1 and have been trying to identify why the system goes into a state where it thrashes the disk for long periods and apparently uses 100% of the CPU. I've been bothering the Forum about an apparent Kmail or Firefox issue, but it seems to be much more fundamental.

    The Gnome system-monitor reports that it's getting low on RAM, and the Kinfocentre memory-display reports the swap-space is "Not available", which seems pretty serious. I remember the installation process asked whether I wanted to increase the swap area to allow for hibernation and I responded 'no' but I didn't expect it to be disabled completely (if that's what Kinfocentre is telling me).

    I'm getting out of my depth here. I can increase the swap area with Partitioner if desirable, but how do I make it available again?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,872
    Blog Entries
    3

    Default Re: Swap space is not available after 15.1 installation

    Code:
    % free
                  total        used        free      shared  buff/cache   available
    Mem:        8030480     1789916     2376092      271816     3864472     5692280
    Swap:      20971516           0    20971516
    Note: the "%" is just my shell prompt (using "csh"). The command is "free".

    That shows how much swap is available and how much is in use.
    Code:
    % cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /dev/dm-2                               partition       20971516        0      -1
    That shows the device used for swap. In this case I am using encrypted swap, which is why it has an odd device name. More typical would be something like "/dev/sda5" for the "Filename" information.

    Please provide similar information for your system.

    Maybe also provide the output from
    Code:
    sudo fdisk -l
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Dec 2008
    Location
    NSW, Australia
    Posts
    86

    Default Re: Swap space is not available after 15.1 installation

    Thanks for your reply, and the output of "free" & "fdisk" is shown below. The partitioner shows a 3Gb swap area, but fstab only has entries for the root and /home partitions. Would editing fstab do the trick?

    # free
    total used free shared buff/cache available
    Mem: 1995292 1263216 139956 184740 592120 384704
    Swap: 0 0 0

    # fdisk -l
    Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
    Disk model: ST3250312AS
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xc8ee8eec

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 2048 292863 290816 142M 83 Linux
    /dev/sda2 * 292864 63215615 62922752 30G 83 Linux
    /dev/sda3 63215616 69513215 6297600 3G 82 Linux swap / Solaris
    /dev/sda4 69513216 488396799 418883584 199.8G 83 Linux

    #
    Cheers, David

  4. #4
    Join Date
    Dec 2008
    Location
    NSW, Australia
    Posts
    86

    Default Re: Swap space is not available after 15.1 installation

    In case anyone else is interested, I managed to convince myself that editing /etc/fstab by inserting a line for the swap area wouldn't do any damage, at least. So I found the UUID with "blkid" and consulted the man entry for fstab, then added the line:
    UUID=<...> none swap defaults 0 0
    So far, so good! The Gnome system monitor indicates the swap file has been used and it appears in Kinfocentre, but not on the system monitor "File Systems" tab.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,378

    Default Re: Swap space is not available after 15.1 installation

    Quote Originally Posted by dlochrin View Post
    So far, so good! The Gnome system monitor indicates the swap file has been used and it appears in Kinfocentre, but not on the system monitor "File Systems" tab.
    I am not a Gnome user (and basicaly do not al sorts of GUI tools to look at those system information), but I guess the tool is right because swap is NOT a file system. Does why show it in a list of file systems?
    Henk van Velden

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,872
    Blog Entries
    3

    Default Re: Swap space is not available after 15.1 installation

    Quote Originally Posted by dlochrin View Post
    In case anyone else is interested, I managed to convince myself that editing /etc/fstab by inserting a line for the swap area wouldn't do any damage, at least. So I found the UUID with "blkid" and consulted the man entry for fstab, then added the line:
    Yes, that was the appropriate change to make. But best to use CODE tags rather than QUOTE tags around that line, when posting.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,592

    Cool Re: Swap space is not available after 15.1 installation

    Quote Originally Posted by dlochrin View Post
    The partitioner shows a 3Gb swap area, but fstab only has entries for the root and /home partitions.
    You could try using the YaST “Expert Partitioner”: <https://doc.opensuse.org/documentati...rtitioner.html>.
    This should point you to including the Swap partition into your system.
    • It'll add a line to your ‘fstab’ which looks something like this: “/dev/disk/by-id/ata-OCZ-VERTEX2_OCZ-HC8068405854W13J-part2 swap swap defaults 0 0”.

    Or, more possibly “/dev/disk/by-uuid/” + the UUID of your Swap partition.
    BTW, when you've finished, you can check the Swap situation as follows:
    Code:
     > cat /proc/swaps 
    Filename                                Type            Size    Used    Priority
    /dev/sda2                               partition       2098172 0       -1
     >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •