From Fedora Project Wiki

Revision as of 18:46, 5 April 2022 by Fifofonix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Install and validate Fedora CoreOS with swap on zram enabled

Setup

  1. Download and verify the latest FCOS next image (pick the right image for your environment).
  2. Read background on zram here.
  3. Figure out how you'd like to configure your initial zram device.
  4. Read other possible post-boot tests as described here.

How to test

  1. Create an Ignition file.
  2. Configure Zram device validating instructions here.
  3. Launch your Fedora CoreOS system using this Ignition file. See the Quickstart and the provisioning docs for a guide how to launch FCOS in most environments (bare metal, virtual, cloud, etc).

Expected Results

  1. Verify you can SSH successfully into your FCOS system and that it is on the expected version.
    $ ssh 172.25.81.173
    Fedora CoreOS 36.20220325.1.0
    Tracker: https://github.com/coreos/fedora-coreos-tracker
    Discuss: https://discussion.fedoraproject.org/tag/coreos
    
    Last login: Mon Apr  4 14:42:45 2022 from 156.111.209.231
    
  2. Verify the zram configuration injected by ignition is as expected.
    [core@d-zram-test-1 ~]$ cat /etc/systemd/zram-generator.conf
    # This config file enables a /dev/zram0 device with the default settings
    [zram0]
    
  3. Verify zram has been correctly defined as a swap partition and to the expected size

    The default is min(ram/4,4096) which in our 16GB machine instance means 4G.

    [core@d-zram-test-1 ~]$ zramctl --output-all
    zramctl --output-all
    NAME       DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED MIGRATED MOUNTPOINT
    /dev/zram0       4G   4K   80B lzo-rle         4          0   12K        0B      12K       0B [SWAP]
    [core@d-zram-test-1 ~]$ swapon
    NAME       TYPE      SIZE USED PRIO
    /dev/zram0 partition   4G   0B  100
    
  4. Verify the linked documentation makes sense, nothing is obviously missing, and the instructions are clear.