1ZRAM-GENERATOR(8)                                            ZRAM-GENERATOR(8)
2
3
4

NAME

6       zram-generator - Systemd unit generator for zram swap devices
7

SYNOPSIS

9       /usr/lib/systemd/system-generators/zram-generator TARGET_DIR [2RGET_DIR
10       3RGET_DIR]
11       /usr/lib/systemd/system-generators/zram-generator --setup-device DEVICE
12       /usr/lib/systemd/system-generators/zram-generator --reset-device DEVICE
13

DESCRIPTION

15       zram-generator is a generator that creates  zram  devices  and  systemd
16       units to configure, format, and enable swap on them.
17
18       The  generator  will be invoked by systemd early at boot. The generator
19       will then:
20
21       1.  read  configuration  files  from   {/etc,/lib}/systemd/zram-genera‐
22           tor.conf[.d] (see zram-generator.conf(5) for details);
23
24       2.  generate systemd.swap(5) units into TARGET_DIR and make swap.target
25           depend on them;
26
27       3.  ensure the zram module is loaded and create the requested devices.
28
29
30
31       The generator does nothing if run inside a container (as determined  by
32       systemd-detect-virt(8) --container).
33
34       Setting  the ZRAM_GENERATOR_ROOT environment variable makes the genera‐
35       tor run in test mode, in which case  containerisation  is  ignored  and
36       step 3 is skipped.
37       For  the  ramifications  of ZRAM_GENERATOR_ROOT on config handling, see
38       zram-generator.conf(5).
39
40       The generated dev-zramN.swap units depend on zram-create@zramN.service,
41       which will:
42
43       1.  read   configuration  files  from  {/etc,/lib}/systemd/zram-genera‐
44           tor.conf[.d] (see zram-generator.conf(5) for details);
45
46       2.  set the desired compression algorithm, if any; if the current  ker‐
47           nel  doesn´t  understand  the  specified  algorithm,  a  warning is
48           issued, but execution continues;
49
50       3.  set the desired blockdev size and  format  it  as  swap  with  sys‐
51           temd-makefs(8).
52
53
54
55       When  the unit is stopped, the zram device is reset, freeing memory and
56       allowing the device to be reused.
57
58       zram-generator implements systemd.generator(7).
59

REPORTING BUGS

61       <https://github.com/systemd/zram-generator/issues>
62

SEE ALSO

64       zram-generator.conf(5), systemd.generator(7), systemd.swap(5)
65
66       <https://github.com/systemd/zram-generator>
67
68       Linux   documentation   of   zram:    <https://kernel.org/doc/html/lat
69       est/admin-guide/blockdev/zram.html>
70       and the zram sysfs ABI: <https://kernel.org/doc/Documentation/ABI/test
71       ing/sysfs-block-zram>
72
73
74
75zram-generator 0.2.0               June 2020                 ZRAM-GENERATOR(8)
Impressum