[lxc-users] How to have /var, /tmp etc. on separate zfs filesystems in containers?

Korn András korn-lxcusers at elan.rulez.org
Mon Mar 4 17:21:49 UTC 2019


Hi,

I'd like to have separate zfs datasets for /var, /tmp and some other
mountpoints inside my guests.

What's a good way of achieving this?

As far as I could determine from looking at the source, the zfs storage
backend doesn't support anything like it, and lxc-create doesn't run any
hooks.

Should I instead write a wrapper around lxc-create that creates and mounts
my zfs datasets just so, and calls lxc-create with the 'dir' storage
backend?

Or is there a better way?

(Of course I can create the guest first, then move the files around
afterwards, but I'd like to avoid this if possible.)

Thanks!

András

-- 
      The worst part about working for the department of unemployment is
          when you get fired you still have to show up the next day.


More information about the lxc-users mailing list