[lxc-users] Args for lxd init via script
markc at renta.net
Mon May 22 03:25:09 UTC 2017
On 5/22/17 12:28 PM, Fajar A. Nugraha wrote:
>> Yes but I also want the current disk usage to be available inside
>> the container so that, for instance, df returns realistic results.
> Have you tried lxd with zfs?
Yes, zfs (pool per container) is what I am currently using here...
> Did you mean zfs dataset?
Is that the same thing as a "volume" (as seen by lxd) ?
I would normally use btrfs but it can't provide usage statistics.
> Using separate POOL per container should be possible in newer lxd
> (e.g. in xenial-backports). However that would also negate some
> benefits of using zfs, as you'd need to have separate block
> device/loopback files for each pool.
That's what I suspect, not the best approach.
Besides, I am pretty sure that the performance penalty of using
loopback instead of a block devices would get worse in large numbers.
> Using a default zfs pool, and having separate DATASET (or to be more
> accurate, filesystem) per container, is the default setup. Which
> would provide correct disk usage statistic (e.g. for "df" and such).
I did try something with "volumes" but I got the impression it did not
seem to provide correct "df" results but I was floundering around just
trying to get anything to work (with df) at the time.
> And it's perfectly normal to have several hundred or thousand dataset
> (which would include snapshots as well) on a single pool.
And I'd imagine copying and moving containers would make more sense.
> IIRC ubuntu's roadmap is to integrate lxd (and zfs) into openstack
> (which sould have lots of control panel already).
But unfortunately not in PHP so I can't deploy and extend whatever
control panels openstack offers. As far as I can see, one needs a
minimum of 5 servers just to get started with openstack so that is
180 degrees away from where I am going (super lightweight and simple).
> In the mean time, your best bet is probably create your own (possibly
> based on lxd-webui).
Thanks for the hint. I'm not interested in developing in Angular but
I should be able to get some frontend ideas. Once I have a basic bash
script setup working then I'll create a PHP plugin for my framework.
More information about the lxc-users