Best configuration to create a new LXD Server


I would like to recycling an old media server to LXC platerform with ZFS.

For the moment, I woud like to create this LXC’s containers:

  • MariaDB : 500 GB
  • Nexcloud : 1.5 TB of data
  • Mail server

Do I need to create separated zools to have easy LXC move possibilities?

  • 2 TB for Nextcloud on one drive

  • 1 TB for MariaDB on one drive

  • 500 GB for Mail Server on one drive

  • 500 GB partition for backup on ZFS or Ext4 ?

and install the system on 250 Go on Ext4

During some backup/restore test on empty container, I try lxc import/export commands, but did I need to make ZFS snapshot too ?

My config is:
AMD A6-3500

8 GB


  • 2 * 1 TB
  • 1 * 2 TB
  • 1 * 250GB


I’m no storage guy unfortunatly but I normally set my disks up as simple as possible, no fancy raid5 or raid10’s or whatever, usually raidz1 mirror zfs for 2 disks at a time.

This would then be called zpool1

I would then split it up into datasets, something like

Then you can give your lxd instance its own dataset to slice up using something like

zfs storage create zfs1 zfs source=zpool1/lxd

lxc launch ubuntu:20.04 mycontainer -s zfs1 -n lxdbr0

Then you can use the rest of the zfs zpool as you wish for VM’s/KVM, backups, shared folders etc.

if you have more than 2 disks then maybe create 2 zpool mirrors and move things around between them or use one zpool for backups/long term storage.

1 Like

Regarding backups, its usually a case of either doing a zfs replication using a tool like syncoid, either locally between zpools or to a remote zfs server, and/or doing a zfs send and pigz/tar to an exported file and then copy to backblaze, gdrive or s3fs for some external long term storage.