Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TGM opened this issue Jan 30, 2024 · 2 comments · Fixed by OpenNebula/docs#2894 or OpenNebula/docs#2903

Comments

@TGM
Copy link

TGM commented Jan 30, 2024

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 TGM added the Type: Bug label Jan 30, 2024
@TGM
Copy link
Author

TGM commented Mar 13, 2024

BUMP

@rsmontero
Copy link
Member

planned for next maintenance

Aletibazo added a commit to Aletibazo/one_issues that referenced this issue Apr 12, 2024
…parameter from the Datastore was ignored.

- Added function get_ds_attribute to tm_common.sh to get a given attribute from a Datastore
- Using falloc preallocation mode on the qemu-img commands since it is faster than using full preallocation
- Note the cloning script when using the TM_MAD = ssh does not use qemu-img command. Instead it uses the tar command, hence it ignores the QCOW2_OPTIONS parameter

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Aletibazo added a commit to Aletibazo/docs that referenced this issue Apr 15, 2024
Updated Local Storage Datastore

- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
@Aletibazo Aletibazo linked a pull request Apr 15, 2024 that will close this issue
4 tasks
tinova pushed a commit to OpenNebula/docs that referenced this issue Apr 15, 2024
- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue Apr 15, 2024
- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
(cherry picked from commit a2d615a)
tinova pushed a commit to OpenNebula/docs that referenced this issue Apr 15, 2024
- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
(cherry picked from commit a2d615a)
tinova pushed a commit to OpenNebula/docs that referenced this issue Apr 15, 2024
- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
(cherry picked from commit a2d615a)
tinova pushed a commit to OpenNebula/docs that referenced this issue Apr 15, 2024
- Added note on QCOW2_OPTIONS attribute
- Fixed typo

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
(cherry picked from commit a2d615a)
@rsmontero rsmontero reopened this Apr 16, 2024
Aletibazo added a commit to Aletibazo/one_issues that referenced this issue Apr 17, 2024
Edited clone on qcow2 so it does not override the CLONE_CMD
when FORMAT = "raw"'

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Aletibazo added a commit to Aletibazo/docs that referenced this issue Apr 25, 2024
Updated Local Storage and NAS/SAN Storage to better explain how SPARSE attribute works.
For Local Storage, deleted the reference to the QCOW2_OPTIONS and QCOW2_STANDALONE attributes, since they\'re not relevant for TM_MAD = ssh

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
@Aletibazo Aletibazo linked a pull request Apr 26, 2024 that will close this issue
4 tasks
@tinova tinova modified the milestones: Release 6.10.0, Release 6.8.4 Apr 26, 2024
Aletibazo added a commit to Aletibazo/docs that referenced this issue Apr 30, 2024
Updated SPARSE attribute description to make clear that QCOW2_STANDALONE is needed on system Datastore

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
@tinova tinova closed this as completed May 8, 2024
@tinova tinova reopened this May 8, 2024
Aletibazo added a commit to Aletibazo/docs that referenced this issue May 8, 2024
Updating resolved issues for 6.8.4 refering SPARSE attribute from issue #6487

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Aletibazo added a commit to Aletibazo/docs that referenced this issue May 8, 2024
Updating resolved issues for 6.4.6 refering SPARSE attribute from issue #6487

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Aletibazo added a commit to Aletibazo/docs that referenced this issue May 9, 2024
Fixed link on resolved issues for 6.4.6 from last commit.

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
Aletibazo added a commit to Aletibazo/docs that referenced this issue May 9, 2024
Fix typo and link on resolved issues for 6.8.4 from last commit.

Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue May 9, 2024
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue May 9, 2024
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue May 9, 2024
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>

(cherry picked from commit b15c70e)
tinova pushed a commit to OpenNebula/docs that referenced this issue May 9, 2024
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>

(cherry picked from commit b15c70e)
@tinova tinova reopened this May 9, 2024
@tinova tinova closed this as completed May 9, 2024
@tinova tinova reopened this May 9, 2024
tinova pushed a commit to OpenNebula/docs that referenced this issue May 9, 2024
Signed-off-by: Alejandro Mosteiro <amosteiro@opennebula.io>
@tinova tinova closed this as completed May 9, 2024
tinova added a commit to OpenNebula/docs that referenced this issue Jun 11, 2024
tinova added a commit to OpenNebula/docs that referenced this issue Jun 11, 2024
tinova added a commit to OpenNebula/docs that referenced this issue Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment