Dir type storage pool is taking double space

I am trying to create a new storage pool in a new HDD to try to save main disk space:

1 create new storage pool
incus storage create test dir source=/new_disk_mount_point
2 create new virtual machine in the new storage pool
incus launch ubuntu24 test-1 --vm --storage=test

but when I inspect the /var/lib/incus/storage-pools directory, I found that the new VM is still taking up space there. Plus the new space at the new storage pool source directory.

so basically one VM is taking double disk space: one in the /var/lib/storage-pools/test and one in the /new_disk_mount_point/

I just tested exactly what you did:

mkdir /new_disk_mount_point
incus storage create test dir source=/new_disk_mount_point
incus launch images:ubuntu/24.04/cloud test-1 --vm --storage=test

I do see the same storage at two different places in the file tree, but it’s a bind mount. Note that the inode numbers are all the same:

root@nuc3:~# ls -i /new_disk_mount_point/
524410 buckets     524421 containers-snapshots  524418 custom-snapshots  524422 virtual-machines
524420 containers  524417 custom                524419 images            524423 virtual-machines-snapshots
root@nuc3:~# ls -i /var/lib/incus/storage-pools/test/
524410 buckets     524421 containers-snapshots  524418 custom-snapshots  524422 virtual-machines
524420 containers  524417 custom                524419 images            524423 virtual-machines-snapshots

root@nuc3:~# mount | grep storage-pools/test
/dev/mapper/vg0-root on /var/lib/incus/storage-pools/test type ext4 (rw,relatime)

So I’m pretty confident it’s not using any space under /var/lib/incus/storage-pools; it just looks like it because the storage directory is also mounted there.

1 Like

that solve my puzzle, thanks.