-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
as inspiration, my /usr/local/bin/overlay-zram
#!/bin/bash -xv
set -e # die if one step fails
echo "called $0 $@"
dir=$(basename "$@")
zram=/tmp/zram
modprobe -v zram
zramdev=$(zramctl --find --size 20GiB --algorithm lz4)
mkfs.ext4 -O ^has_journal ${zramdev}
mkdir -pv ${zram}
mount -vo discard,dax,noatime ${zramdev} ${zram}
mkdir -pv "/tmp/${dir}-union" "${zram}/${dir}"/{.work,.upper}
modprobe -v overlay
mount -vt overlay overlay -o "lowerdir=${@},upperdir=${zram}/${dir}/.upper,workdir=${zram}/${dir}/.work" "/tmp/${dir}-union"
chown -v --reference="${@}" "/tmp/${dir}-union"
Compression ratio can be looked at with zramctl
..
hard to know if it's worth the fuzz without trying..
Metadata
Metadata
Assignees
Labels
No labels