From Fedora Project Wiki

(wording)
Line 3: Line 3:
  
 
|setup=
 
|setup=
# A system with swap-on-zram [[QA:Testcase SwapOnZRAM install and enable|installed and enabled]].
+
# Make sure your system has swap-on-zram [[QA:Testcase SwapOnZRAM install and enable|installed and enabled]].
  
 
|actions=
 
|actions=

Revision as of 18:41, 1 July 2020

Description

Test disabling swap-on-zram permanently.

Setup

  1. Make sure your system has swap-on-zram installed and enabled.

How to test

  1. Remove the swap-on-zram default configuration:
    sudo dnf remove zram-generator-defaults

    Alternatively, you can override the default config file with an empty one:

    sudo touch /etc/systemd/zram-generator.conf
  2. Reboot.
  3. Confirm that swap-on-zram is not active. zramctl should not list the /dev/zram0 device:
    $ zramctl
    

    swapon should not list this device either, only disk swap partitions:

    $ swapon
    NAME      TYPE       SIZE USED PRIO
    /dev/sda5 partition 10.4G   0B   -2
    

    The service should be marked as inactive (dead):

    $ sudo systemctl status swap-create@zram0.service
    ● swap-create@zram0.service - Create swap on /dev/zram0
         Loaded: loaded (/usr/lib/systemd/system/swap-create@.service; static; vendor preset: disabled)
         Active: inactive (dead)
           Docs: man:zram-generator(8)
                 man:zram-generator.conf(5)
    
  4. Return your system back to original state (install the removed package or remove the newly created config override).

Expected Results

  1. After removing the default configuration, swap-on-zram should not be active and its device should not be visible in zramctl and swapon commands output.