Is the dir driver a pool?

Trying to get my head around this.

Does the dir driver pool anything or is it just writing (directly on the host) to a directory that has a fixed size limit?

Does it actually pool anything or does it just write to the disk (ext4/xfs) sans pool?

not pooling?

From the dir pool docs: Directory - dir - LXD documentation

The directory storage driver is a basic backend that stores its data in a standard file and directory structure. This driver is quick to set up and allows inspecting the files directly on the disk, which can be convenient for testing. However, LXD operations are not optimized for this driver.

The dir driver in LXD is fully functional and provides the same set of features as other drivers. However, it is much slower than all the other drivers because it must unpack images and do instant copies of instances, snapshots and images.

Unless specified differently during creation (with the source configuration option), the data is stored in the /var/snap/lxd/common/lxd/storage-pools/ (for snap installations) or /var/lib/lxd/storage-pools/ directory.

So it is a pool in the sense that it stores multiple instances and volumes under the same top-level directory, but its not like other pools in that it doesn’t have dedicated storage device(s) and just uses the underlying host’s file system.

When creating a dir pool LXD creates the following empty directories underneath the source path specified.

sudo ls -la /var/snap/lxd/common/lxd/storage-pools/default
total 40
drwx--x--x 10 root root 4096 Aug 26 11:24 .
drwx--x--x  5 root root 4096 Aug 31 13:59 ..
drwx--x--x  2 root root 4096 Aug 31 13:59 buckets
drwx--x--x  2 root root 4096 Aug 31 14:21 containers
drwx--x--x  2 root root 4096 Aug 26 08:19 containers-snapshots
drwx--x--x  2 root root 4096 Aug 26 08:19 custom
drwx--x--x  2 root root 4096 Aug 26 08:19 custom-snapshots
drwx--x--x  2 root root 4096 Aug 26 08:19 images
drwx--x--x  2 root root 4096 Aug 26 08:19 virtual-machines
drwx--x--x  2 root root 4096 Aug 26 08:19 virtual-machines-snapshots

And then each instance (container or VM) or custom volume you create will go into the relevant directory.

Also see this video which has just been added: