Using Multiple Storage Pools with LXD

Get Started
15 minutes
  • 3 Learning Objectives

About this Hands-on Lab

As of LXD 2.5, LXD offers the ability to manage the storage backends and pools used to store container data, allowing for greater stability, enhanced speeds, and convenient configuration. In this lab, we update a misconfigured storage pool, create an experimental storage block, and add a final storage block for backups.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Move the ZFS File System
  1. View the current storage configuration for the server:

    lxc storage list
  1. We want to edit the default storage pool so it’s using /dev/nvme1n1 instead of working locally:

    lxc storage set default source /dev/nvme1n1

    Alternatively, edit via lxc storage edit default, updating the file:

    size: 5GB
    source: /dev/nvme1n1
    zfs.pool_name: default
  2. Confirm the change:

    lxc storage list
Create a btrfs File System

Create a file system, using the btrfs backend on /dev/nvme2n1, using 5GB of space:

  lxc storage create experimental btrfs source=/dev/nvme2n1 size=5
Create a Directory File System

Create a file system using the directory storage backend:

lxc storage create backups dir

Additional Resources

As part of your team's efforts to lift-and-shift a number of legacy applications on to LXC, you want to test btrfs, versus ZFS, as a potential backend for container storage. Additionally, you have been tasked with creating a backups script. Prepare your dev environment by ensuring the already-created ZFS pool is set to /dev/nvme1n1 and create a 5G btrfs pool (called experimental) on /dev/nvme2n1. Additionally, create a backups storage space on localhost using directory storage.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?