From Fedora Project Wiki

(initial writeup)
 
Line 7: Line 7:
 
<li> Permanently disable swap-on-zram.
 
<li> Permanently disable swap-on-zram.
 
<pre> sudo touch /etc/systemd/zram-generator.conf</pre> `or` <pre>sudo dnf remove zram-generator-defaults</pre>
 
<pre> sudo touch /etc/systemd/zram-generator.conf</pre> `or` <pre>sudo dnf remove zram-generator-defaults</pre>
And now reboot.
+
And now <b>reboot</b>.
 
<li> Confirm it's stopped:
 
<li> Confirm it's stopped:
 
<pre>$ zramctl
 
<pre>$ zramctl
Line 20: Line 20:
 
       Docs: man:zram-generator(8)
 
       Docs: man:zram-generator(8)
 
             man:zram-generator.conf(5)
 
             man:zram-generator.conf(5)
$ </pre>
+
</pre>
 
</ol>
 
</ol>
  

Revision as of 06:39, 30 June 2020

Description

Test disable swap-on-zram permanently.


How to test

  1. swap-on-zram should be enabled and running to start this test.
  2. Permanently disable swap-on-zram.
     sudo touch /etc/systemd/zram-generator.conf
    or
    sudo dnf remove zram-generator-defaults

    And now reboot.

  3. Confirm it's stopped:
    $ zramctl
    $ swapon
    NAME      TYPE       SIZE USED PRIO
    /dev/sda5 partition 10.4G   0B   -2
    $ sudo systemctl status swap-create@zram0
    
    ● 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)
    

Expected Results

  1. Status should be inactive (dead).
  2. There should be no /dev/zram0 device listed for the zramctl and swapon commands.