add "discard" option to armbian-ramlog zram mount

When using a zram device mounted and formatted as ext4 it should be mounted using
the "discard" option so that the actual allocated memory is freed and returned to
the system when files are deleted.
This commit is contained in:
5kft 2018-09-15 22:10:44 +00:00
parent 115075f1d6
commit 9c15130252

View File

@ -93,7 +93,7 @@ case "$1" in
case $LOG_TYPE in
zram)
echo -e "Mounting /dev/zram0 as $RAM_LOG \c" | $LOG_OUTPUT
mount /dev/zram0 $RAM_LOG 2>&1 | $LOG_OUTPUT
mount -o discard /dev/zram0 $RAM_LOG 2>&1 | $LOG_OUTPUT
;;
tmpfs)
echo -e "Setting up $RAM_LOG as tmpfs \c" | $LOG_OUTPUT