Your IP : 216.73.216.52


Current Path : /snap/lxd/current/share/lxd-documentation/reference/storage_zfs/
Upload File :
Current File : //snap/lxd/current/share/lxd-documentation/reference/storage_zfs/index.html

<!doctype html>
<html class="no-js" lang="en" data-content_root="../../">
  <head><meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="ZFS - zfs" />
<meta property="og:type" content="website" />
<meta property="og:url" content="/reference/storage_zfs/" />
<meta property="og:site_name" content="LXD documentation" />
<meta property="og:description" content="ZFS combines both physical volume management and a file system. A ZFS installation can span across a series of storage devices and is very scalable, allowing you to add disks to expand the availabl..." />
<meta property="og:image" content="https://documentation.ubuntu.com/lxd/latest/_static/lxd_tag.png" />
<meta property="og:image:alt" content="LXD documentation" />
<meta name="description" content="ZFS combines both physical volume management and a file system. A ZFS installation can span across a series of storage devices and is very scalable, allowing you to add disks to expand the availabl..." />

    <meta property="article:modified_time" content="2026-02-13T13:16:52+00:00" /><link rel="index" title="Index" href="../../genindex/"><link rel="search" title="Search" href="../../search/"><link rel="next" title="Ceph RBD - ceph" href="../storage_ceph/"><link rel="prev" title="LVM - lvm" href="../storage_lvm/">
        <link rel="canonical" href="/reference/storage_zfs/">

    <link rel="shortcut icon" href="../../_static/favicon.ico"><!-- Generated with Sphinx 7.4.7 and Furo 2025.12.19 -->
        <title>ZFS - zfs - LXD documentation</title>
      <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" />
    <link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=7bdb33bb" />
    <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
    <link rel="stylesheet" type="text/css" href="../../_static/config-options.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/related-links.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/terminal.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/youtube.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/sphinx-design.min.css?v=95c83b7e" />
    <link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" />
    <link rel="stylesheet" type="text/css" href="../../_static/lxd_custom.css?v=bfbf4da2" />
    <link rel="stylesheet" type="text/css" href="../../_static/cookie-banner.css?v=b74831ab" />
    <link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=e189117a" />
    <link rel="stylesheet" type="text/css" href="../../_static/header.css?v=a8078839" />
    <link rel="stylesheet" type="text/css" href="../../_static/github_issue_links.css?v=3d761185" />
    <link rel="stylesheet" type="text/css" href="../../_static/furo_colors.css?v=825fec6f" />
    
</head>
  <body>
    <header id="header" class="p-navigation">
  <!-- Google Tag Manager -->
  <script>
    (function(w, d, s, l, i) {
      w[l] = w[l] || [];
      w[l].push({
        'gtm.start': new Date().getTime(),
        event: 'gtm.js'
      });
      var f = d.getElementsByTagName(s)[0];
      var j = d.createElement(s);
      var dl = '';
      if (l != 'dataLayer') {
          dl = '&l=' + l;
      }
      j.async = true;
      j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
      f.parentNode.insertBefore(j, f);
    })(window, document, 'script', 'dataLayer', 'GTM-KNX3CJC');
  </script>
  
  <div class="p-navigation__nav" role="menubar">

    <ul class="p-navigation__links" role="menu">

      <li>
        
        <a class="p-logo" href="https://canonical.com/lxd" aria-current="page">
          <img src="../../_static/lxd_tag.png" alt="Logo" class="p-logo-image">
          <div class="p-logo-text p-heading--4">LXD
          </div>
        </a>
        
      </li>

      <li class="nav-ubuntu-com">
        
        <a href="https://canonical.com/lxd" class="p-navigation__link">canonical.com/lxd</a>
        
      </li>

      <li class="nav-dropdown">
        <a href="#" class="p-navigation__link nav-more-links"
           id="more-resources-toggle"
           aria-haspopup="true"
           aria-expanded="false">
          More resources
        </a>
        <ul class="more-links-dropdown" aria-labelledby="more-resources-toggle">
          
          <li>
            <a href="https://discourse.ubuntu.com/c/lxd/" class="p-navigation__sub-link p-dropdown__link">Discourse</a>
          </li>
          
      
          
      
          
          <li>
            <a href="https://matrix.to/#/#documentation:ubuntu.com" class="p-navigation__sub-link p-dropdown__link">Matrix</a>
          </li>
          
      
          
          <li>
            <a href="https://github.com/canonical/lxd" class="p-navigation__sub-link p-dropdown__link">GitHub</a>
          </li>
          

        </ul>
      </li>

    </ul>
  </div>
</header>
   
    <script>
      document.body.dataset.theme = localStorage.getItem("theme") || "auto";
    </script>
    

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  <symbol id="svg-toc" viewBox="0 0 24 24">
    <title>Contents</title>
    <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
    </svg>
  </symbol>
  <symbol id="svg-menu" viewBox="0 0 24 24">
    <title>Menu</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
      <line x1="3" y1="12" x2="21" y2="12"></line>
      <line x1="3" y1="6" x2="21" y2="6"></line>
      <line x1="3" y1="18" x2="21" y2="18"></line>
    </svg>
  </symbol>
  <symbol id="svg-arrow-right" viewBox="0 0 24 24">
    <title>Expand</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
      <polyline points="9 18 15 12 9 6"></polyline>
    </svg>
  </symbol>
  <symbol id="svg-sun" viewBox="0 0 24 24">
    <title>Light mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
      <circle cx="12" cy="12" r="5"></circle>
      <line x1="12" y1="1" x2="12" y2="3"></line>
      <line x1="12" y1="21" x2="12" y2="23"></line>
      <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
      <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
      <line x1="1" y1="12" x2="3" y2="12"></line>
      <line x1="21" y1="12" x2="23" y2="12"></line>
      <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
      <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
    </svg>
  </symbol>
  <symbol id="svg-moon" viewBox="0 0 24 24">
    <title>Dark mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
      <path stroke="none" d="M0 0h24v24H0z" fill="none" />
      <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
    </svg>
  </symbol>
  <symbol id="svg-sun-with-moon" viewBox="0 0 24 24">
    <title>Auto light/dark, in light mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
      class="icon-custom-derived-from-feather-sun-and-tabler-moon">
      <path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/>
      <line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>
      <line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/>
      <line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/>
      <line x1="19" y1="14.05" x2="20.414" y2="15.464"/>
      <line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/>
      <line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/>
      <line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/>
      <line x1="19" y1="5.05" x2="20.414" y2="3.636"/>
      <circle cx="14.5" cy="9.55" r="3.6"/>
    </svg>
  </symbol>
  <symbol id="svg-moon-with-sun" viewBox="0 0 24 24">
    <title>Auto light/dark, in dark mode</title>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round"
      class="icon-custom-derived-from-feather-sun-and-tabler-moon">
      <path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/>
      <line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/>
      <line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/>
      <line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/>
      <line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/>
      <line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/>
      <line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/>
      <line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/>
      <line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/>
      <circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/>
    </svg>
  </symbol>
  <symbol id="svg-pencil" viewBox="0 0 24 24">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code">
      <path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" />
      <path d="M13.5 6.5l4 4" />
      <path d="M20 21l2 -2l-2 -2" />
      <path d="M17 17l-2 2l2 2" />
    </svg>
  </symbol>
  <symbol id="svg-eye" viewBox="0 0 24 24">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
      stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code">
      <path stroke="none" d="M0 0h24v24H0z" fill="none" />
      <path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" />
      <path
        d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" />
      <path d="M20 21l2 -2l-2 -2" />
      <path d="M17 17l-2 2l2 2" />
    </svg>
  </symbol>
</svg>

<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation" aria-label="Toggle site navigation sidebar">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc" aria-label="Toggle table of contents sidebar">
<label class="overlay sidebar-overlay" for="__navigation"></label>
<label class="overlay toc-overlay" for="__toc"></label>

<a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a>



<div class="page">
  <header class="mobile-header">
    <div class="header-left">
      <label class="nav-overlay-icon" for="__navigation">
        <span class="icon"><svg><use href="#svg-menu"></use></svg></span>
      </label>
    </div>
    <div class="header-center">
      <a href="../../"><div class="brand">LXD documentation</div></a>
    </div>
    <div class="header-right">
      <div class="theme-toggle-container theme-toggle-header">
        <button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
          <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
          <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
          <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
          <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
        </button>
      </div>
      <label class="toc-overlay-icon toc-header-icon" for="__toc">
        <span class="icon"><svg><use href="#svg-toc"></use></svg></span>
      </label>
    </div>
  </header>
  <aside class="sidebar-drawer">
    <div class="sidebar-container">
      
      <div class="sidebar-sticky"><a class="sidebar-brand" href="../../">
  
  <span class="sidebar-brand-text">LXD documentation</span>
  
</a><form class="sidebar-search-container" method="get" action="../../search/" role="search">
    <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
    <input type="submit" value="Go">
    <input type="hidden" name="check_keywords" value="yes">
    <input type="hidden" name="area" value="default">
  </form>
  <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
  <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../">LXD</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tutorial/first_steps/">Tutorial</a></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../howto/">How-to guides</a><input aria-label="Toggle navigation of How-to guides" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../getting_started/">Getting started</a><input aria-label="Toggle navigation of Getting started" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../installing/">Install LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/initialize/">Initialize LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/access_ui/">Access the UI</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/access_documentation/">Access documentation locally</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../operation/">LXD server and client</a><input aria-label="Toggle navigation of LXD server and client" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/server_expose/">Expose LXD to the network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/server_configure/">Configure the LXD server</a></li>
<li class="toctree-l3 has-children"><a class="reference internal" href="../../howto/oidc/">Configure single sign-on with OIDC</a><input aria-label="Toggle navigation of Configure single sign-on with OIDC" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l4"><a class="reference internal" href="../../howto/oidc_auth0/">How to configure Auth0</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../howto/oidc_ory/">How to configure Ory Hydra</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../howto/oidc_keycloak/">How to configure Keycloak</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../howto/oidc_entra_id/">How to configure Entra ID</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../remotes/">Add remote servers</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/lxc_alias/">Add command aliases</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../instances/">Instances</a><input aria-label="Toggle navigation of Instances" class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_create/">Create instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_configure/">Configure instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_manage/">Manage instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../profiles/">Use profiles</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_troubleshoot/">Troubleshoot errors</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_ubuntu_pro_attach/">Auto attach Ubuntu Pro</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_access_files/">Access files</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_console/">Access the console</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../instance-exec/">Run commands</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../cloud-init/">Use cloud-init</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_routed_nic_vm/">Add a routed NIC to a VM</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_backup/">Back up instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_migrate/">Migrate instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/import_machines_to_instances/">Import existing machines</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/container_gpu_passthrough_with_docker/">Pass NVIDIA GPUs</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../images/">Images</a><input aria-label="Toggle navigation of Images" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/images_remote/">Use remote images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/images_manage/">Manage images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/images_profiles/">Associate profiles</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/images_copy/">Copy and import images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/images_create/">Create images</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../projects/">Projects</a><input aria-label="Toggle navigation of Projects" class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/projects_create/">Create and configure</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/projects_work/">Work with projects</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/projects_confine/">Confine users to projects</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../storage/">Storage</a><input aria-label="Toggle navigation of Storage" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_pools/">Manage pools</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_volumes/">Manage volumes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_buckets/">Manage buckets</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_create_instance/">Create an instance in a pool</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_backup_volume/">Back up a volume</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_move_volume/">Move or copy a volume</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/storage_csi/">Use the LXD CSI driver with Kubernetes</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../networks/">Networking</a><input aria-label="Toggle navigation of Networking" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_create/">Create a network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_configure/">Configure a network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_bgp/">Configure as BGP server</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_acls/">Configure network ACLs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_forwards/">Configure forwards</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_zones/">Configure network zones</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_bridge_firewalld/">Configure your firewall</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_bridge_resolved/">Integrate with resolved</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_ovn_setup/">Set up OVN</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_load_balancers/">Configure load balancers</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_ovn_peers/">Configure peer routing</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_ipam/">Display IPAM information</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../clustering/">Clustering</a><input aria-label="Toggle navigation of Clustering" class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_form/">Form a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_manage/">Manage a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_config_networks/">Configure networks</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_config_storage/">Configure storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_manage_instance/">Manage instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_groups/">Set up cluster groups</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_placement_groups/">Use placement groups</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_recover/">Recover a cluster</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/cluster_vip/">Set up a highly available virtual IP</a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../production-setup/">Production setup</a><input aria-label="Toggle navigation of Production setup" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/benchmark_performance/">Benchmark performance</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_increase_bandwidth/">Increase bandwidth</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../metrics/">Monitor metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/logs_loki/">Send logs to Loki</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/grafana/">Set up Grafana</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../backup/">Back up a server</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/disaster_recovery/">Recover instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/disaster_recovery_replication/">Disaster recovery with storage replication</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../howto/snap/">Manage the snap</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../howto/security_harden/">Harden security</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../howto/troubleshoot/">Troubleshooting</a><input aria-label="Toggle navigation of Troubleshooting" class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../howto/network_bridge_firewalld/">Configure your firewall</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/instances_troubleshoot/">Troubleshoot instances</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../howto/dqlite_troubleshoot/">Troubleshoot Dqlite</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../debugging/">Debug LXD</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../faq/">Frequently asked</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../support/">Get support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../contributing/">Contribute to LXD</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../howto/auth_bearer/">How to authenticate to the LXD API using bearer tokens</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../howto/devlxd_authenticate/">How to authenticate to the DevLXD API</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../../explanation/">Explanation</a><input aria-label="Toggle navigation of Explanation" class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/lxd_lxc/"><code class="docutils literal notranslate"><span class="pre">lxd</span></code> and <code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/instances/">Containers and VMs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../image-handling/">Local and remote images</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/storage/">Storage pools, volumes, and buckets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/networks/">Networking setups</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../database/">The LXD Dqlite database</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/lxc_show_info/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code> <code class="docutils literal notranslate"><span class="pre">show</span></code> and <code class="docutils literal notranslate"><span class="pre">info</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../../authentication/">Remote API authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/authorization/">Remote API authorization</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/projects/">Instances grouping with projects</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/clusters/">Clusters</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/performance_tuning/">Performance tuning</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/security/">Security</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/bpf/">Privilege delegation using BPF Token</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../explanation/csi/">The LXD CSI driver</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="../">Reference</a><input aria-label="Toggle navigation of Reference" checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../requirements/">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../architectures/">Architectures</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../release-notes/">Release notes</a><input aria-label="Toggle navigation of Release notes" class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" role="switch" type="checkbox"/><label for="toctree-checkbox-15"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../release-notes/release-notes-6.7/">LXD 6.7</a></li>
<li class="toctree-l3"><a class="reference internal" href="../release-notes/release-notes-6.6/">LXD 6.6</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../releases-snap/">Releases and snap</a></li>
<li class="toctree-l2"><a class="reference internal" href="../remote_image_servers/">Remote image servers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../image_format/">Image format</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../guest-os-compatibility/">Guest OS compatibility</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../container-environment/">Container environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../config-options/">Configuration option index</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../server/">Server configuration</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../explanation/instance_config/">Instance configuration</a><input aria-label="Toggle navigation of Instance configuration" class="toctree-checkbox" id="toctree-checkbox-16" name="toctree-checkbox-16" role="switch" type="checkbox"/><label for="toctree-checkbox-16"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../instance_properties/">Instance properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../instance_options/">Instance options</a></li>
<li class="toctree-l3 has-children"><a class="reference internal" href="../devices/">Devices</a><input aria-label="Toggle navigation of Devices" class="toctree-checkbox" id="toctree-checkbox-17" name="toctree-checkbox-17" role="switch" type="checkbox"/><label for="toctree-checkbox-17"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l4"><a class="reference internal" href="../standard_devices/">Standard devices</a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_none/">Type: <code class="docutils literal notranslate"><span class="pre">none</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_nic/">Type: <code class="docutils literal notranslate"><span class="pre">nic</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_disk/">Type: <code class="docutils literal notranslate"><span class="pre">disk</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_unix_char/">Type: <code class="docutils literal notranslate"><span class="pre">unix-char</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_unix_block/">Type: <code class="docutils literal notranslate"><span class="pre">unix-block</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_usb/">Type: <code class="docutils literal notranslate"><span class="pre">usb</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_gpu/">Type: <code class="docutils literal notranslate"><span class="pre">gpu</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_infiniband/">Type: <code class="docutils literal notranslate"><span class="pre">infiniband</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_proxy/">Type: <code class="docutils literal notranslate"><span class="pre">proxy</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_unix_hotplug/">Type: <code class="docutils literal notranslate"><span class="pre">unix-hotplug</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_tpm/">Type: <code class="docutils literal notranslate"><span class="pre">tpm</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../devices_pci/">Type: <code class="docutils literal notranslate"><span class="pre">pci</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../instance_units/">Units for storage and network limits</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../preseed_yaml_fields/">Preseed YAML file fields</a></li>
<li class="toctree-l2"><a class="reference internal" href="../projects/">Project configuration</a></li>
<li class="toctree-l2 current has-children"><a class="reference internal" href="../storage_drivers/">Storage drivers</a><input aria-label="Toggle navigation of Storage drivers" checked="" class="toctree-checkbox" id="toctree-checkbox-18" name="toctree-checkbox-18" role="switch" type="checkbox"/><label for="toctree-checkbox-18"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../storage_dir/">Directory - <code class="docutils literal notranslate"><span class="pre">dir</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_btrfs/">Btrfs - <code class="docutils literal notranslate"><span class="pre">btrfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_lvm/">LVM - <code class="docutils literal notranslate"><span class="pre">lvm</span></code></a></li>
<li class="toctree-l3 current current-page"><a class="current reference internal" href="#">ZFS - <code class="docutils literal notranslate"><span class="pre">zfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_ceph/">Ceph RBD - <code class="docutils literal notranslate"><span class="pre">ceph</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_powerflex/">Dell PowerFlex - <code class="docutils literal notranslate"><span class="pre">powerflex</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_pure/">Pure Storage - <code class="docutils literal notranslate"><span class="pre">pure</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_alletra/">HPE Alletra - <code class="docutils literal notranslate"><span class="pre">alletra</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_cephfs/">CephFS - <code class="docutils literal notranslate"><span class="pre">cephfs</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../storage_cephobject/">Ceph Object - <code class="docutils literal notranslate"><span class="pre">cephobject</span></code></a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../networks/">Networks</a><input aria-label="Toggle navigation of Networks" class="toctree-checkbox" id="toctree-checkbox-19" name="toctree-checkbox-19" role="switch" type="checkbox"/><label for="toctree-checkbox-19"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../network_bridge/">Bridge network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network_ovn/">OVN network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network_macvlan/">Macvlan network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network_physical/">Physical network</a></li>
<li class="toctree-l3"><a class="reference internal" href="../network_sriov/">SR-IOV network</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../cluster_member_config/">Cluster configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../placement_groups/">Placement group configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="../server_settings/">Production server settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../provided_metrics/">Provided metrics</a></li>
<li class="toctree-l2"><a class="reference internal" href="../permissions/">Permissions</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../restapi_landing/">REST API</a><input aria-label="Toggle navigation of REST API" class="toctree-checkbox" id="toctree-checkbox-20" name="toctree-checkbox-20" role="switch" type="checkbox"/><label for="toctree-checkbox-20"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../rest-api/">Main API documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api/">Main API specification</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../api-extensions/">Main API extensions</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../events/">Events API documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../dev-lxd/">Instance API</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../driver_csi/">LXD CSI driver reference</a></li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../manpages/">Man pages</a><input aria-label="Toggle navigation of Man pages" class="toctree-checkbox" id="toctree-checkbox-21" name="toctree-checkbox-21" role="switch" type="checkbox"/><label for="toctree-checkbox-21"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../manpages/lxc/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li>
</ul>
</li>
<li class="toctree-l2 has-children"><a class="reference internal" href="../../internals/">Internals</a><input aria-label="Toggle navigation of Internals" class="toctree-checkbox" id="toctree-checkbox-22" name="toctree-checkbox-22" role="switch" type="checkbox"/><label for="toctree-checkbox-22"><span class="icon"><svg><use href="#svg-arrow-right"></use></svg></span></label><ul>
<li class="toctree-l3"><a class="reference internal" href="../../environment/">Environment variables</a></li>
<li class="toctree-l3"><a class="reference internal" href="../uefi_variables/">UEFI variables for VMs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../daemon-behavior/">Daemon behavior</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../syscall-interception/">System call interception</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../userns-idmap/">User namespace setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="../ovn-internals/">OVN implementation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../vm_live_migration_internals/">VM live migration implementation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../dqlite-internals/">Dqlite</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference external" href="https://github.com/canonical/lxd">Project repository</a></li>
<li class="toctree-l2"><a class="reference external" href="https://images.lxd.canonical.com">Image server</a></li>
</ul>
</li>
</ul>

</div>
</div>

      </div>
      
    </div>
  </aside>
  <div class="main">
    <div class="content">
      <div class="article-container">
        <a href="#" class="back-to-top muted-link">
          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
            <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
          </svg>
          <span>Back to top</span>
        </a>
        <div class="content-icon-container">
          <div class="edit-this-page">
  <a class="muted-link" href="https://github.com/canonical/lxd/edit/main/doc/reference/storage_zfs.md" title="Contribute to this page">
    <svg><use href="#svg-pencil"></use></svg>
    <span class="visually-hidden">Contribute to this page</span>
  </a>
</div><div class="theme-toggle-container theme-toggle-content">
            <button class="theme-toggle" aria-label="Toggle Light / Dark / Auto color theme">
              <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg>
              <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg>
              <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
              <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
            </button>
          </div>
          <label class="toc-overlay-icon toc-content-icon" for="__toc">
            <span class="icon"><svg><use href="#svg-toc"></use></svg></span>
          </label>
        </div>
        <article role="main" id="furo-main-content">
          <section id="zfs-zfs">
<span id="storage-zfs"></span><h1>ZFS - <code class="docutils literal notranslate"><span class="pre">zfs</span></code><a class="headerlink" href="#zfs-zfs" title="Link to this heading">¶</a></h1>

            <p class="youtube_link">
              <a href="https://www.youtube.com/watch?v=ysLi_LYAs_M" target="_blank">
                <span title="ZFS storage and LXD" class="play_icon">▶</span>
                <span title="ZFS storage and LXD">Watch on YouTube</span>
              </a>
            </p>
        <p><abbr title="Zettabyte file system">ZFS</abbr> combines both physical volume management and a file system.
A ZFS installation can span across a series of storage devices and is very scalable, allowing you to add disks to expand the available space in the storage pool immediately.</p>
<p>ZFS is a block-based file system that protects against data corruption by using checksums to verify, confirm and correct every operation.
To run at a sufficient speed, this mechanism requires a powerful environment with a lot of RAM.</p>
<p>In addition, ZFS offers snapshots and replication, RAID management, copy-on-write clones, compression and other features.</p>
<p>To use ZFS, make sure you have <code class="docutils literal notranslate"><span class="pre">zfsutils-linux</span></code> installed on your machine.</p>
<section id="terminology">
<h2>Terminology<a class="headerlink" href="#terminology" title="Link to this heading">¶</a></h2>
<p>ZFS creates logical units based on physical storage devices.
These logical units are called <em>ZFS pools</em> or <em>zpools</em>.
Each zpool is then divided into a number of <em><spellexception>datasets</spellexception></em>.
These <spellexception>datasets</spellexception> can be of different types:</p>
<ul class="simple">
<li><p>A <em><spellexception>ZFS filesystem</spellexception></em> can be seen as a partition or a mounted file system.</p></li>
<li><p>A <em>ZFS volume</em> represents a block device.</p></li>
<li><p>A <em>ZFS snapshot</em> captures a specific state of either a <spellexception>ZFS filesystem</spellexception> or a ZFS volume.
ZFS snapshots are read-only.</p></li>
<li><p>A <em>ZFS clone</em> is a writable copy of a ZFS snapshot.</p></li>
</ul>
</section>
<section id="zfs-driver-in-lxd">
<h2><code class="docutils literal notranslate"><span class="pre">zfs</span></code> driver in LXD<a class="headerlink" href="#zfs-driver-in-lxd" title="Link to this heading">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">zfs</span></code> driver in LXD uses <spellexception>ZFS filesystems</spellexception> and ZFS volumes for images and custom storage volumes, and ZFS snapshots and clones to create instances from images and for instance and custom volume snapshots.
By default, LXD enables compression when creating a ZFS pool.</p>
<p>LXD assumes that it has full control over the ZFS pool and <spellexception>dataset</spellexception>.
Therefore, you should never maintain any <spellexception>datasets</spellexception> or file system entities that are not owned by LXD in a ZFS pool or <spellexception>dataset</spellexception>, because LXD might delete them.</p>
<p>Due to the way copy-on-write works in ZFS, parent <spellexception>ZFS filesystems</spellexception> can’t be removed until all children are gone.
As a result, LXD automatically renames any objects that are removed but still referenced.
Such objects are kept at a random <code class="docutils literal notranslate"><span class="pre">deleted/</span></code> path until all references are gone and the object can safely be removed.
Note that this method might have ramifications for restoring snapshots.
See <a class="reference internal" href="#storage-zfs-limitations"><span class="std std-ref">Limitations</span></a> below.</p>
<p>LXD automatically enables trimming support on all newly created pools on ZFS 0.8 or later.
This increases the lifetime of SSDs by allowing better block re-use by the controller, and it also allows to free space on the root file system when using a loop-backed ZFS pool.
If you are running a ZFS version earlier than 0.8 and want to enable trimming, upgrade to at least version 0.8.
Then use the following commands to make sure that trimming is automatically enabled for the ZFS pool in the future and trim all currently unused space:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>zpool upgrade ZPOOL-NAME
zpool set autotrim=on ZPOOL-NAME
zpool trim ZPOOL-NAME
</pre></div>
</div>
<section id="limitations">
<span id="storage-zfs-limitations"></span><h3>Limitations<a class="headerlink" href="#limitations" title="Link to this heading">¶</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">zfs</span></code> driver has the following limitations:</p>
<dl class="simple myst">
<dt>Restoring from older snapshots</dt><dd><p>ZFS doesn’t support restoring from snapshots other than the latest one.
You can, however, create new instances from older snapshots.
This method makes it possible to confirm whether a specific snapshot contains what you need.
After determining the correct snapshot, you can <a class="reference internal" href="../../howto/storage_backup_volume/#storage-edit-snapshots"><span class="std std-ref">remove the newer snapshots</span></a> so that the snapshot you need is the latest one and you can restore it.</p>
<p>Alternatively, you can configure LXD to automatically discard the newer snapshots during restore.
To do so, set the <a class="configref reference internal" href="#storage-zfs-volume-conf:zfs.remove_snapshots"><code class="docutils literal notranslate"><span class="pre">zfs.remove_snapshots</span></code></a> configuration for the volume (or the corresponding <code class="docutils literal notranslate"><span class="pre">volume.zfs.remove_snapshots</span></code> configuration on the storage pool for all volumes in the pool).</p>
<p>Note, however, that if <a class="configref reference internal" href="#storage-zfs-pool-conf:zfs.clone_copy"><code class="docutils literal notranslate"><span class="pre">zfs.clone_copy</span></code></a> is set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, instance copies use ZFS snapshots too.
In that case, you cannot restore an instance to a snapshot taken before the last copy without having to also delete all its descendants.
If this is not an option, you can copy the wanted snapshot into a new instance and then delete the old instance.
You will, however, lose any other snapshots the instance might have had.</p>
</dd>
<dt>Observing I/O quotas</dt><dd><p>I/O quotas are unlikely to affect <spellexception>ZFS filesystems</spellexception> very much.
That’s because ZFS is a port of a Solaris module (using SPL) and not a native Linux file system using the Linux VFS API, which is where I/O limits are applied.</p>
</dd>
<dt>Feature support in ZFS</dt><dd><p>Some features, like the use of idmaps or delegation of a ZFS dataset, require ZFS 2.2 or higher and are therefore not widely available yet.</p>
</dd>
</dl>
</section>
<section id="quotas">
<h3>Quotas<a class="headerlink" href="#quotas" title="Link to this heading">¶</a></h3>
<p>ZFS provides two different quota properties: <code class="docutils literal notranslate"><span class="pre">quota</span></code> and <code class="docutils literal notranslate"><span class="pre">refquota</span></code>.
<code class="docutils literal notranslate"><span class="pre">quota</span></code> restricts the total size of a <spellexception>dataset</spellexception>, including its snapshots and clones.
<code class="docutils literal notranslate"><span class="pre">refquota</span></code> restricts only the size of the data in the <spellexception>dataset</spellexception>, not its snapshots and clones.</p>
<p>By default, LXD uses the <code class="docutils literal notranslate"><span class="pre">quota</span></code> property when you set up a size/quota for your storage volume.
If you want to use the <code class="docutils literal notranslate"><span class="pre">refquota</span></code> property instead, set the <a class="configref reference internal" href="#storage-zfs-volume-conf:zfs.use_refquota"><code class="docutils literal notranslate"><span class="pre">zfs.use_refquota</span></code></a> configuration for the volume (or the corresponding <code class="docutils literal notranslate"><span class="pre">volume.zfs.use_refquota</span></code> configuration on the storage pool for all volumes in the pool).</p>
<p>You can also set the <a class="configref reference internal" href="#storage-zfs-volume-conf:zfs.reserve_space"><code class="docutils literal notranslate"><span class="pre">zfs.reserve_space</span></code></a> (or <code class="docutils literal notranslate"><span class="pre">volume.zfs.reserve_space</span></code>) configuration to use ZFS <code class="docutils literal notranslate"><span class="pre">reservation</span></code> or <code class="docutils literal notranslate"><span class="pre">refreservation</span></code> along with <code class="docutils literal notranslate"><span class="pre">quota</span></code> or <code class="docutils literal notranslate"><span class="pre">refquota</span></code>.</p>
</section>
</section>
<section id="configuration-options">
<h2>Configuration options<a class="headerlink" href="#configuration-options" title="Link to this heading">¶</a></h2>
<p>The following configuration options are available for storage pools that use the <code class="docutils literal notranslate"><span class="pre">zfs</span></code> driver and for storage volumes in these pools.</p>
<section id="storage-pool-configuration">
<span id="storage-zfs-pool-config"></span><h3>Storage pool configuration<a class="headerlink" href="#storage-pool-configuration" title="Link to this heading">¶</a></h3>
<div class="configoption docutils container" id="storage-zfs-pool-conf:size">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">size</span></code></span><span class="shortdesc"><p>Size of the storage pool (for loop-based pools)</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:size"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">size</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>auto (20% of free disk space, &gt;= 5 GiB and &lt;= 30 GiB)</p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>When creating loop-based pools, specify the size in bytes (<a class="reference internal" href="../instance_units/#instances-limit-units"><span class="std std-ref">suffixes</span></a> are supported).
You can increase the size to grow the storage pool.</p>
<p>The default (<code class="docutils literal notranslate"><span class="pre">auto</span></code>) creates a storage pool that uses 20% of the free disk space,
with a minimum of 5 GiB and a maximum of 30 GiB.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:source">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">source</span></code></span><span class="shortdesc"><p>Path to an existing block device, loop file, or ZFS dataset/pool</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:source"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">source</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:source.recover">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">source.recover</span></code></span><span class="shortdesc"><p>Whether to recover an existing <code class="docutils literal notranslate"><span class="pre">source</span></code></p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:source.recover"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">source.recover</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Set this option to true to recover an existing source which was previously created by LXD.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:source.wipe">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">source.wipe</span></code></span><span class="shortdesc"><p>Whether to wipe the block device before creating the pool</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:source.wipe"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">source.wipe</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p><code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Set this option to <code class="docutils literal notranslate"><span class="pre">true</span></code> to wipe the block device specified in <code class="docutils literal notranslate"><span class="pre">source</span></code>
prior to creating the storage pool.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:zfs.clone_copy">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.clone_copy</span></code></span><span class="shortdesc"><p>Whether to use ZFS lightweight clones</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:zfs.clone_copy"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.clone_copy</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Set this option to <code class="docutils literal notranslate"><span class="pre">true</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code> to enable or disable using ZFS lightweight clones rather
than full dataset copies.
Set the option to <code class="docutils literal notranslate"><span class="pre">rebase</span></code> to copy based on the initial image.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:zfs.export">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.export</span></code></span><span class="shortdesc"><p>Whether to export the zpool when an unmount is being performed</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:zfs.export"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.export</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p><code class="docutils literal notranslate"><span class="pre">true</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-pool-conf:zfs.pool_name">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.pool_name</span></code></span><span class="shortdesc"><p>Name of the zpool</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-pool-conf:zfs.pool_name"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.pool_name</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>name of the pool</p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>In addition to these configurations, you can also set default values for the storage volume configurations. See <a class="reference internal" href="../../howto/storage_volumes/#storage-configure-vol-default"><span class="std std-ref">Configure default values for storage volumes</span></a>.</p>
</div>
</section>
<section id="storage-volume-configuration">
<span id="storage-zfs-vol-config"></span><h3>Storage volume configuration<a class="headerlink" href="#storage-volume-configuration" title="Link to this heading">¶</a></h3>
<div class="configoption docutils container" id="storage-zfs-volume-conf:block.filesystem">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">block.filesystem</span></code></span><span class="shortdesc"><p>File system of the storage volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:block.filesystem"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">block.filesystem</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.block.filesystem</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>block-based volume with content type <code class="docutils literal notranslate"><span class="pre">filesystem</span></code> (<code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code> enabled)</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Valid options are: <code class="docutils literal notranslate"><span class="pre">btrfs</span></code>, <code class="docutils literal notranslate"><span class="pre">ext4</span></code>, <code class="docutils literal notranslate"><span class="pre">xfs</span></code>
If not set, <code class="docutils literal notranslate"><span class="pre">ext4</span></code> is assumed.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:block.mount_options">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">block.mount_options</span></code></span><span class="shortdesc"><p>Mount options for block-backed file system volumes</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:block.mount_options"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">block.mount_options</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.block.mount_options</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>block-based volume with content type <code class="docutils literal notranslate"><span class="pre">filesystem</span></code> (<code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code> enabled)</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:security.shared">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">security.shared</span></code></span><span class="shortdesc"><p>Enable volume sharing</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:security.shared"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">security.shared</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.security.shared</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>virtual-machine or custom block volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Enabling this option allows sharing the volume across multiple instances despite the possibility of data loss.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:security.shifted">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">security.shifted</span></code></span><span class="shortdesc"><p>Enable ID shifting overlay</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:security.shifted"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">security.shifted</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.security.shifted</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>custom volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Enabling this option allows attaching the volume to multiple isolated instances.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:security.unmapped">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">security.unmapped</span></code></span><span class="shortdesc"><p>Disable ID mapping for the volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:security.unmapped"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">security.unmapped</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.security.unmappped</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>custom volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:size">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">size</span></code></span><span class="shortdesc"><p>Size/quota of the storage volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:size"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">size</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.size</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>appropriate driver</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:snapshots.expiry">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">snapshots.expiry</span></code></span><span class="shortdesc"><p>When snapshots are to be deleted</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:snapshots.expiry"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">snapshots.expiry</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.snapshots.expiry</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>custom volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Specify an expression like <code class="docutils literal notranslate"><span class="pre">1M</span> <span class="pre">2H</span> <span class="pre">3d</span> <span class="pre">4w</span> <span class="pre">5m</span> <span class="pre">6y</span></code>.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:snapshots.pattern">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">snapshots.pattern</span></code></span><span class="shortdesc"><p>Template for the snapshot name</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:snapshots.pattern"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">snapshots.pattern</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.snapshots.pattern</span></code> or <code class="docutils literal notranslate"><span class="pre">snap%d</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>custom volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>You can specify a naming template that is used for scheduled snapshots and unnamed snapshots.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">snapshots.pattern</span></code> option takes a Pongo2 template string to format the snapshot name.</p>
<p>To add a time stamp to the snapshot name, use the Pongo2 context variable <code class="docutils literal notranslate"><span class="pre">creation_date</span></code>.
Make sure to format the date in your template string to avoid forbidden characters in the snapshot name.
For example, set <code class="docutils literal notranslate"><span class="pre">snapshots.pattern</span></code> to <code class="docutils literal notranslate"><span class="pre">{{</span> <span class="pre">creation_date|date:'2006-01-02_15-04-05'</span> <span class="pre">}}</span></code> to name the snapshots after their time of creation, down to the precision of a second.</p>
<p>Another way to avoid name collisions is to use the placeholder <code class="docutils literal notranslate"><span class="pre">%d</span></code> in the pattern.
For the first snapshot, the placeholder is replaced with <code class="docutils literal notranslate"><span class="pre">0</span></code>.
For subsequent snapshots, the existing snapshot names are taken into account to find the highest number at the placeholder’s position.
This number is then incremented by one for the new name.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:snapshots.schedule">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">snapshots.schedule</span></code></span><span class="shortdesc"><p>Schedule for automatic volume snapshots</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:snapshots.schedule"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">snapshots.schedule</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">snapshots.schedule</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>custom volume</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>Specify either a cron expression (<code class="docutils literal notranslate"><span class="pre">&lt;minute&gt;</span> <span class="pre">&lt;hour&gt;</span> <span class="pre">&lt;dom&gt;</span> <span class="pre">&lt;month&gt;</span> <span class="pre">&lt;dow&gt;</span></code>), a comma-separated list of schedule aliases (<code class="docutils literal notranslate"><span class="pre">&#64;hourly</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;daily</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;midnight</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;weekly</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;monthly</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;annually</span></code>, <code class="docutils literal notranslate"><span class="pre">&#64;yearly</span></code>), or leave empty to disable automatic snapshots (the default).</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:volatile.devlxd.owner">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">volatile.devlxd.owner</span></code></span><span class="shortdesc"><p>The ID of the DevLXD identity which owns the volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:volatile.devlxd.owner"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">volatile.devlxd.owner</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>DevLXD owner identity ID</p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:volatile.idmap.last">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">volatile.idmap.last</span></code></span><span class="shortdesc"><p>JSON-serialized UID/GID map that has been applied to the volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:volatile.idmap.last"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">volatile.idmap.last</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>filesystem</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:volatile.idmap.next">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">volatile.idmap.next</span></code></span><span class="shortdesc"><p>JSON-serialized UID/GID map that has been applied to the volume</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:volatile.idmap.next"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">volatile.idmap.next</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>filesystem</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:volatile.uuid">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">volatile.uuid</span></code></span><span class="shortdesc"><p>The volume’s UUID</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:volatile.uuid"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">volatile.uuid</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>random UUID</p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.block_mode">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code></span><span class="shortdesc"><p>Whether to use a formatted <code class="docutils literal notranslate"><span class="pre">zvol</span></code> rather than a dataset</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.block_mode"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.block_mode</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p><code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code> can be set only for custom storage volumes.
To enable ZFS block mode for all storage volumes in the pool, including instance volumes,
use <code class="docutils literal notranslate"><span class="pre">volume.zfs.block_mode</span></code>.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.blocksize">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.blocksize</span></code></span><span class="shortdesc"><p>Size of the ZFS block</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.blocksize"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.blocksize</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.blocksize</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>The size must be between 512 bytes and 16 MiB and must be a power of 2.
For a block volume, a maximum value of 128 KiB will be used even if a higher value is set.</p>
<p>Depending on the value of <a class="configref reference internal" href="#storage-zfs-volume-conf:zfs.block_mode"><code class="docutils literal notranslate"><span class="pre">zfs.block_mode</span></code></a>,
the specified size is used to set either <code class="docutils literal notranslate"><span class="pre">volblocksize</span></code> or <code class="docutils literal notranslate"><span class="pre">recordsize</span></code> in ZFS.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.delegate">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.delegate</span></code></span><span class="shortdesc"><p>Whether to delegate the ZFS dataset</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.delegate"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.delegate</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.delegate</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>ZFS 2.2 or higher</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
<p>This option controls whether to delegate the ZFS dataset and anything underneath it to the
container or containers that use it. When used in conjunction with
<a class="configref reference internal" href="../instance_options/#instance-security:security.nesting"><code class="docutils literal notranslate"><span class="pre">security.nesting</span></code></a>, this allows
using the <code class="docutils literal notranslate"><span class="pre">zfs</span></code> command in the container.</p>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.remove_snapshots">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.remove_snapshots</span></code></span><span class="shortdesc"><p>Remove snapshots as needed</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.remove_snapshots"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.remove_snapshots</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.remove_snapshots</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.reserve_space">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.reserve_space</span></code></span><span class="shortdesc"><p>Use <code class="docutils literal notranslate"><span class="pre">reservation</span></code>/<code class="docutils literal notranslate"><span class="pre">refreservation</span></code> along with <code class="docutils literal notranslate"><span class="pre">quota</span></code>/<code class="docutils literal notranslate"><span class="pre">refquota</span></code></p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.reserve_space"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.reserve_space</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.reserve_space</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="configoption docutils container" id="storage-zfs-volume-conf:zfs.use_refquota">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">zfs.use_refquota</span></code></span><span class="shortdesc"><p>Use <code class="docutils literal notranslate"><span class="pre">refquota</span></code> instead of <code class="docutils literal notranslate"><span class="pre">quota</span></code> for space</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-volume-conf:zfs.use_refquota"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">zfs.use_refquota</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>bool</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.zfs.use_refquota</span></code> or <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>global</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="storage-bucket-configuration">
<h3>Storage bucket configuration<a class="headerlink" href="#storage-bucket-configuration" title="Link to this heading">¶</a></h3>
<p>To enable storage buckets for local storage pool drivers and allow applications to access the buckets via the S3 protocol, you must configure the <a class="configref reference internal" href="../../server/#server-core:core.storage_buckets_address"><code class="docutils literal notranslate"><span class="pre">core.storage_buckets_address</span></code></a> server setting.</p>
<div class="configoption docutils container" id="storage-zfs-bucket-conf:size">
<div class="basicinfo docutils container">
<span class="key"><code class="docutils literal notranslate"><span class="pre">size</span></code></span><span class="shortdesc"><p>Size/quota of the storage bucket</p>
</span><span class="anchor"><a class="reference external" href="#storage-zfs-bucket-conf:size"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></a></span></div>
<div class="details docutils container">
<div class="table-wrapper fields docutils container">
<table class="fields docutils align-default">
<tbody>
<tr class="row-odd"><td><strong>Key: </strong></td>
<td><code class="docutils literal notranslate"><span class="pre">size</span></code></td>
</tr>
<tr class="row-even"><td><strong>Type: </strong></td>
<td><span class="ignoreP"><p>string</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Default: </strong></td>
<td><span class="ignoreP"><p>same as <code class="docutils literal notranslate"><span class="pre">volume.size</span></code></p>
</span></td>
</tr>
<tr class="row-even"><td><strong>Condition: </strong></td>
<td><span class="ignoreP"><p>appropriate driver</p>
</span></td>
</tr>
<tr class="row-odd"><td><strong>Scope: </strong></td>
<td><span class="ignoreP"><p>local</p>
</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
</section>

        </article>
      </div>
      <footer>
        
   

<div class="related-pages">
  
  
      
  
  
  <a class="next-page" href="../storage_ceph/">
        <div class="page-info">
          <div class="context">
            <span>Next</span>
          </div>
          <div class="title">Ceph RBD - <code class="docutils literal notranslate"><span class="pre">ceph</span></code></div>
        </div>
        <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
      </a>
    <a class="prev-page" href="../storage_lvm/">
        <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
        <div class="page-info">
          <div class="context">
            <span>Previous</span>
          </div>
          
            <div class="title">LVM - <code class="docutils literal notranslate"><span class="pre">lvm</span></code></div>
          
        </div>
      </a>
</div>
<div class="bottom-of-page">
  <div class="left-details">
    <div class="copyright">
        &copy; 2014-2026 AGPL-3.0, LXD contributors 
    </div><div class="last-updated">
      Last updated on Feb 13, 2026</div>
  </div>
  <div class="right-details">
    
      <a href="" class="js-revoke-cookie-manager muted-link">Manage your tracker settings</a>
</div>

      </footer>
    </div>
    <aside class="toc-drawer">
      
<div class="toc-sticky toc-scroll">
   
    <div class="toc-title-container">
      <span class="toc-title">
       Contents
      </span>
    </div>
    <div class="toc-tree-container">
      <div class="toc-tree">
        <ul>
<li><a class="reference internal" href="#">ZFS - <code class="docutils literal notranslate"><span class="pre">zfs</span></code></a><ul>
<li><a class="reference internal" href="#terminology">Terminology</a></li>
<li><a class="reference internal" href="#zfs-driver-in-lxd"><code class="docutils literal notranslate"><span class="pre">zfs</span></code> driver in LXD</a><ul>
<li><a class="reference internal" href="#limitations">Limitations</a></li>
<li><a class="reference internal" href="#quotas">Quotas</a></li>
</ul>
</li>
<li><a class="reference internal" href="#configuration-options">Configuration options</a><ul>
<li><a class="reference internal" href="#storage-pool-configuration">Storage pool configuration</a></li>
<li><a class="reference internal" href="#storage-volume-configuration">Storage volume configuration</a></li>
<li><a class="reference internal" href="#storage-bucket-configuration">Storage bucket configuration</a></li>
</ul>
</li>
</ul>
</li>
</ul>

      </div>
    </div>
   
    
    <div class="relatedlinks-title-container">
      <span class="relatedlinks-title">
       Related links
      </span>
    </div>
    <div class="relatedlinks-container">
      <div class="relatedlinks">
        
          <ul><li><a href="https://discuss.linuxcontainers.org/t/15872" target="_blank">ZFS&#32;block&#32;mode</a></li></ul>
        
        
      </div>
    </div>
    
  </div>

    </aside>
  </div>
</div><script src="../../_static/jquery.js?v=5d32c60e"></script>
    <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
    <script src="../../_static/documentation_options.js?v=a5603611"></script>
    <script src="../../_static/doctools.js?v=9a2dae69"></script>
    <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
    <script src="../../_static/scripts/furo.js?v=46bd48cc"></script>
    <script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
    <script src="../../_static/copybutton.js?v=b01cb6f2"></script>
    <script src="../../_static/config-options.js"></script>
    <script src="../../_static/design-tabs.js?v=f930bc37"></script>
    <script src="../../_static/js/bundle.js?v=a4d88309"></script>
    <script src="../../_static/header-nav.js?v=e117ad08"></script>
    <script src="../../_static/github_issue_links.js?v=32bb732f"></script>
    
<script>
  const github_url = "https://github.com/canonical/lxd";
</script>
</body>
</html>