Bonjour
J’ai une debian (11.11 , 5.10.160-rockchip-rk356x) sur un orange-pi 3B (serveur auto hébergé)
Par fois, je m’aperçois que l’espace de stockage /var/log (sur l’appareil /dev/zram1) ne dispose que de 0 B (0%) d’espace restant 50 Mo.
Je presume que zram n’alloue pas assez d’espace (50 Mo sur 4 Go dispo
Le /dev/zram0 c’est la RAM, le /dev/zram1 c’est /var/log
# swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 1,9G 18M 5
mount | grep zram
/dev/zram1 on /var/log type ext4 (rw,relatime,discard)
Et confirmé également par
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931,5G 0 disk
└─sda1 8:1 0 931,5G 0 part /diskUSB
mtdblock0 31:0 0 16M 0 disk
mmcblk0 179:0 0 233G 0 disk
├─mmcblk0p1 179:1 0 1G 0 part /boot
└─mmcblk0p2 179:2 0 229,6G 0 part /
mmcblk0boot0 179:32 0 4M 1 disk
mmcblk0boot1 179:64 0 4M 1 disk
zram0 254:0 0 1,9G 0 disk [SWAP]
zram1 254:1 0 50M 0 disk /var/log
Je ne comprends pas pourquoi /var/log est associé à zram et j’aimerais éviter cette configuration mais je ne sais pas où interagir
Comme c’est un orangepi les fichiers de configuration sont assez particuliers
find / -name "*zram*"
/usr/sbin/zramctl
/usr/lib/systemd/system/orangepi-zram-config.service
/usr/lib/orangepi/orangepi-zram-config
/usr/share/man/man8/zramctl.8.gz
/usr/share/bash-completion/completions/zramctl
/sys/kernel/debug/block/zram1
/sys/kernel/debug/block/zram0
/sys/class/block/zram1
/sys/class/block/zram0
/sys/class/zram-control
/sys/devices/virtual/block/zram1
/sys/devices/virtual/block/zram0
/sys/fs/ext4/zram1
/sys/fs/cgroup/system.slice/dev-zram0.swap
/sys/fs/cgroup/system.slice/orangepi-zram-config.service
/sys/block/zram1
/sys/block/zram0
/etc/systemd/system/sysinit.target.wants/orangepi-zram-config.service
/etc/default/orangepi-zram-config
/proc/fs/ext4/zram1
find: ‘/proc/564877’: Aucun fichier ou dossier de ce type
/run/systemd/units/invocation:orangepi-zram-config.service
/dev/zram1
/dev/zram0
Je pense que c’est au niveau donc de /etc/systemd/system/sysinit.target.wants/orangepi-zram-config.service ou /etc/default/orangepi-zram-config
cat /etc/default/orangepi-zram-config
# configuration values for the orangepi-zram-config service
#
# enable the orangepi-zram-config service?
ENABLED=true
# Zram swap enabled by default, unless set to disabled
# SWAP=false
# percentage of zram used as swap compared to physically available DRAM.
# Huge overcommitment (300) is possible and sometimes desirable. See
# https://forum.armbian.com/topic/5565-zram-vs-swap/?do=findComment&comment=61082
# and don't forget to adjust $MEM_LIMIT_PERCENTAGE below too.
# ZRAM_PERCENTAGE=50
# percentage of DRAM available to zram. If this amount is exceeded the zram
# devices used for swap simply behave as if the device is full. You need to
# adjust/increase this value only if you want to work with massive memory
# overcommitment (ZRAM_PERCENTAGE exceeding 150 for example)
# MEM_LIMIT_PERCENTAGE=50
# create how many zram devices max for swap
# ZRAM_MAX_DEVICES=4
# Which algorithm for zram based swapping. Seems lzo is best choice on ARM:
# https://forum.armbian.com/topic/8161-swap-on-sbc/?do=findComment&comment=61668
# SWAP_ALGORITHM=lzo
# Which algorithm to choose for zram based ramlog partition
# RAMLOG_ALGORITHM=zstd
# Which algorithm to choose for zram based /tmp
# TMP_ALGORITHM=zstd
# Size for zram based /tmp, total memory / 2 by default
# TMP_SIZE=500M
# If defined a separate partition will be used as zram backing device. Be CAREFUL
# which partition you assign and read starting from CONFIG_ZRAM_WRITEBACK in
# https://www.kernel.org/doc/Documentation/blockdev/zram.txt
# ZRAM_BACKING_DEV=/dev/nvme0n2
Et
cat /etc/default/orangepi-ramlog
# configuration values for the orangepi-ram-logging service
#
# enable the orangepi-ram-logging service?
ENABLED=true
#
# size of the tmpfs mount -- please keep in mind to adjust /etc/default/orangepi-zram-config too when increasing
SIZE=50M
#
# use rsync instead of cp -r
# requires rsync installed, may provide better performance
# due to copying only new and changed files
USE_RSYNC=true
# If USE_RSYNC is true, additional options may be specified for the rsync
# commands used to synchronize logs to disk from RAM (XTRA_RSYNC_TO) or from
# disk to RAM (XTRA_RSYNC_FROM). These are bash arrays to make specifying
# multiple arguments easy even in the presence of whitespace.
# If you use log rotation programs that datestamp their logs (e.g., runit's
# svlogd or daemontools' multilog), deleting log files while synchronizing is
# likely a good idea.
#XTRA_RSYNC_TO=(--delete)
XTRA_RSYNC_FROM=()
XTRA_RSYNC_FROM=()
Mais franchement je ne vois où ça pourrait se configurer
Si quelqu’un a des idées, je suis toute ouie
Merci d’avance