On Tue, Nov 20, 2012 at 2:30 AM, Lennart Poettering
wrote:
> If this is upstream in the kernel I think the nicest way to handle this
> would be to extend util-linux to learn a new "zram" option or so we can
> just add to the fstab lines, which sets up everything as needed. This
> would then be sim
On Mon, 19.11.12 22:47, Maksim 'max_posedon' Melnikau (maxpose...@gmail.com)
wrote:
> # cat /etc/fstab | grep swap
> /dev/zram0swapswap
> sw,pri=1 0 0
> /dev/zram1swapswap
> 1. this service is kind of duplicating swap.target
> 2. echo inside duplicates things, which tmpfiles.d could do
Maybe.
IMO semantically, you have new device, that should be configured
before use. It can appears after loading module. As for man 7 bootup,
there is no deps between early targets.
On Mon, Nov 19, 2012 at 11:16 PM, Oleksii Shevchuk wrote:
> That's enough for me:
> # cat /etc/systemd/system/zram-swap\@.service
>...
This is exactly what I dislike a bit,
1. this service is kind of duplicating swap.target
2. echo inside duplicates things, which tmpfiles.d could do
3. service st
That's enough for me:
# cat /etc/udev/rules.d/01-zram.rules
KERNEL=="zram[0-9]", ENV{SYSTEMD_WANTS}="zram-swap@zram%n.service",
TAG+="systemd"
# cat /etc/systemd/system/zram-swap\@.service
[Unit]
Description=Setup swap on zram based device %i
BindsTo=dev-%i.swap
After=dev-%i.device
Requires=de