rpi_zram
rpi_zram copied to clipboard
resolve issues with existing swap devices
per Ubuntu: https://askubuntu.com/questions/471912/zram-vs-zswap-vs-zcache-ultimate-guide-when-to-use-which-one
my solution was to turn off non-zram swap devices after initialization:
... swapon -p 5 /dev/zram3
swapon -s for i in $( swapon -s | awk 'NR>1 { print $1 }' | egrep -v zram ) ; do swapoff ${i} ; done swapon -s
Existing swap is disabled before creating the ZRAM swap in PR #3 - I tested your code first but it didn't work. I just took a different approach and instead turned off existing swap before enabling ZRAM.
there wasn't any problem with novas code for my rpi 3b+ it automatically disabled the existing swap before creating the new one