My environment is a (freshly installed) Debian server with ZFS pools. I would like to store files in ZFS and share them using Samba.

My question is which is better from efficiency, effort, and security (for the host) perspectives? Running it natively on the bare-metal Debian host, running it in an LXC container, or running it in a VM? Why do you think one way is better than the others? I’m pretty familiar with VMs, but don’t have much experience or knowledge of containers.

This is what I’m thinking at the moment, but I would appreciate any feedback:

  1. Natively: no resource overhead, medium admin overhead (manual Samba configuration), least secure(?)
  2. LXC: small resource overhead, least admin overhead (preconfigured containers and/or reproducible configs), possibly more security than native(?)
  3. VM: most resource overhead, most admin overhead (not only manual configuration, but also managing virtual disk [including snapshots, backups, etc]), most secure
  • HybridSarcasm@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    5 months ago

    Right. You kind of want your bare metal OS as vanilla as possible. If you need to nuke and pave, you don’t need to worry about re-applying various configs. Additionally, on a theoretical level, if there’s a bug in something on the bare metal OS, the separation provided by VMs and containers should mean it doesn’t affect the the apps in those VMs / containers.

    That seems easier - at least to me - than keeping track of configs in text files or even Ansible playbooks.

    • xapr [he/him]@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Thank you, that makes sense. I figure that separation provided by VMs and containers is also a security advantage, in case the software in them has vulnerabilities.