Hello,
I was just trying to use LVM and thin-provising to increase the performance of my VMs and add extra flexibility, however I’ve a question about what incus storage volume create
really does.
Considering I’ve this setup:
pvcreate /dev/nvme0n1p4
vgcreate vg-incus /dev/nvme0n1p4
lvcreate --thinpool incus-thinpool -L 190G vg-incus
incus storage create incus-lvm lvm \
source=vg-incus \
lvm.vg_name=vg-incus \
lvm.thinpool_name=incus-thinpool \
lvm.vg.force_reuse=true \
lvm.use_thinpool=true
incus profile device set default-lvm root pool incus-lvm
incus launch images:debian/13 vm-lvm --profile default-lvm --vm -d root,size=10GB
If I want to add an extra data
drive to my VM I can simply:
incus storage volume create incus-lvm vm-lvm-data size=20GB
incus config device add vm-lvm data disk source=vm-lvm-data pool=incus-lvm path=/mnt/data
However, this will show up inside the vm as filesystem incus_data
.
Alternatively I might create a block device instead like this and format it inside the VM as ext4:
incus storage volume create incus-lvm vm-lvm-raw --type=block size=20GB
incus config device add vm-lvm fast disk source=vm-lvm-raw pool=incus-lvm
What is really happening in the first case? It is a virtiofs-backed disk? What about the second case?
My top priority is performance and I also need to be able run sqlite DBs properly from the data disk. Should I just opt for the second option? What are the catches?
I suppose the second option will always outperform whatever Incus is doing with virtiofs. My dd tests showed about the same performance.
Much appreciated.