You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that both log2ram and zramswap (from the zram-tools package) want to use /dev/zram0, but log2ram service starts earlier in boot and claims it first, so after installing log2ram, zramswap service always fails.
The text was updated successfully, but these errors were encountered:
upon much deeper inspection into /usr/local/bin/log2ram I see:
create_zram_log_drive() {
# Check Zram Class created
if [ ! -d "/sys/class/zram-control" ]; then
modprobe zram
RAM_DEV='0'
else
RAM_DEV=$(cat /sys/class/zram-control/hot_add)
fi
echo "$COMP_ALG" >"/sys/block/zram${RAM_DEV}/comp_algorithm"
echo "$LOG_DISK_SIZE" >"/sys/block/zram${RAM_DEV}/disksize"
echo "$SIZE" >"/sys/block/zram${RAM_DEV}/mem_limit"
mke2fs -t ext4 "/dev/zram${RAM_DEV}"
}
where in /usr/sbin/zramswap there is only:
readonly SWAP_DEV="/dev/zram0"
this seems to me that log2ram uses the first (zram0) when zram module hasn't been loaded (which is always the case at startup), and creates new zram devices afterwards (restarts?), where zramswap (which loads later at boot) seems to always assume that zram module has never been loaded and claims the first device - is this accurate?
if this is true, then maybe the real issue is in the zram-tools package, but that would need a change in the debian package
It seems that both log2ram and zramswap (from the zram-tools package) want to use /dev/zram0, but log2ram service starts earlier in boot and claims it first, so after installing log2ram, zramswap service always fails.
The text was updated successfully, but these errors were encountered: