Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setting up the zram example
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Sat Mar 09, 2024 12:25 pm    Post subject: setting up the zram example Reply with quote

hi .

on my low ram (2gb) system i would like to try the example in gentoos wiki :

Code:

load_on_start="yes"
unload_on_stop="yes"
num_devices="3"

type0="swap"
flag0=
size0="4096"
maxs0=2
algo0=lz4

type1="/tmp"
flag1="ext4"
opts1="noatime"
mode1=777
size1="1024"
labl1="zram-tmp"

type2=/var/tmp/portage
flag2=ext4
opts2="noatime"
size2=8192
algo2=zstd
owgr2="portage:portage"
mode2=775
labl2=zram-var-tmp-portage
back2=/dev/mapper/zram-nvme0n1p4
icmp2=y
idle2=600


but i dont know how to set up the type2 . i have created a new zram-init file with ^ this ,created new partitions for type 1 and 2 . but getting :

Code:

myt100 /home/hedmo # /etc/init.d/zram-init start
 * Loading zram module...                                                                                                                                        [ ok ]
 * Swap->zram0                                                                                                                                                   [ ok ]
 * Mount zram1 /tmp
mke2fs 1.47.0 (5-Feb-2023)                                                                                                                                       [ ok ]
 * Mount zram2 /var/tmp/portage
/sbin/zram-init: line 72: printf: write error: No such file or directory
zram-init:
Warning:
zram-init:
failed to set zram2 backing_dev
/sbin/zram-init: line 72: printf: write error: No such device
zram-init:
Warning:
zram-init:
failed to set zram2 incompressible writeback
mke2fs 1.47.0 (5-Feb-2023)                                                                                                                                       [ ok ]
myt100 /home/hedmo #


i dont know but i think i am missing /dev/mapper/zram-nvme0n1p4 ? . if i am correct how do i set it up correct or what have i done wrong ?

regards hedmo
Back to top
View user's profile Send private message
Hammett
Apprentice
Apprentice


Joined: 26 Jan 2005
Posts: 223
Location: Barcelona, Catalonia

PostPosted: Sat Mar 09, 2024 6:36 pm    Post subject: Reply with quote

Not sure if this is going to help, but my zram config for /tmp/var/portage looks like this (mine is type0 instead of type2)
Code:
type0=/var/tmp/portage
flag0=ext4
size0=24576
mlim0= # no hard memory limit
back0= # no backup device
opts0="nosuid,nodev,noatime,discard" # e.g. "relatime" or "noatime" are also reasonable choices
mode0=1777
owgr0= # No reason to change the default "root:root"
notr0= # keep the default on linux-3.15 or newer
maxs0=12
algo0=zstd
labl0=tmp_dir
uuid0=
args0=


I have no backup device, which seems to cause problems for you. Also is not clear what is line 72 in your config.
_________________
I don't fear the people. I fear the demon inside them.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum