one
one copied to clipboard
Local Storage Datastore ```SPARSE``` parameter is ignored via KVM SSH driver
Description Hello,
This bug is present on both OpenNebula 6.4.0.1 and OpenNebula 6.8.0, probably all version in between.
The SPARSE=no
parameter is ignored due to the fact that is not taken into account on:
- VM creation https://github.com/OpenNebula/one/blob/41461d4c03c9d3eae13ef6b0ce60a5dd9b64c8e4/src/tm_mad/ssh/clone#L110
- OR resize https://github.com/OpenNebula/one/blob/41461d4c03c9d3eae13ef6b0ce60a5dd9b64c8e4/src/tm_mad/ssh/clone#L119
This happens for both RAW and QCOW2 images.
Please note the fact that SPARSE works in conjuctions with QCOW2_OPTIONS="-o preallocation=falloc"
OR ..full
for QCOW2 images, but NOT neccesarly for RAW, alltough RAW should use the same preallocation options as described in the qemu-img manual. QCOW2_OPTIONS
is allso ignored when using TM_MAD=ssh
Docs: https://docs.opennebula.io/6.8/open_cluster_deployment/storage_setup/local_ds.html?highlight=sparse#additional-configuration
To Reproduce
Create a cluster with 1 datastore.
Add the SPARSE=no in the DS (ignored)
Add the QCOW2_OPTIONS="-o preallocation=falloc" or "...full" in /etc/one/tmrc
(ignored)
Create a new image format = RAW | QCOW2
Create a new VM using the RAW image.
Create a new VM using the QCOW2 image.
Expected behavior The preallocated space should be taken into account on the hypervisor.
Can be tested with df -h
or via the monitoring GUI.
Actual behavior
The deployed VM does not take into account the defined parameters.
[root@opennebula_backend_dev ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 105M 1.9G 6% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/mapper/sys-root 70G 4.8G 66G 7% /
/dev/sda1 1014M 248M 767M 25% /boot
tmpfs 392M 0 392M 0% /run/user/9869
/dev/mapper/sys-opennebula_do_not_increase 92M 4.0K 85M 1% /var/lib/one/datastores
/dev/mapper/sys-opennebula_ds1 298G 16K 283G 1% /var/lib/one/datastores/123
/dev/mapper/sys-opennebula_ds2 30G 128M 29G 1% /var/lib/one/datastores/126
tmpfs 392M 0 392M 0% /run/user/0
BUMP
planned for next maintenance