OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.22k stars 478 forks source link

Local Storage Datastore ```SPARSE``` parameter is ignored via KVM SSH driver #6487

Closed TGM closed 4 months ago

TGM commented 7 months ago

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:

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
TGM commented 6 months ago

BUMP

rsmontero commented 6 months ago

planned for next maintenance