Skip to content

LINSTOR thin volumes become full-size volumes after reverting from a snapshot. #11765

Description

@SviridoffA

problem

As was discussed in #9950 After reverting volume from snapshot it allways became a full size volume instead of thin. Provisioning not changing, it's stays thin.

After fixes in the discussion, issue with creating new disks from snapshots has been resolved. New disks are created as thin volumes. However, the problem with disks during reverting from snapshots remains—they become thick volumes.
I am using version 4.19.3. I haven’t tried it, but I think this is also relevant for version 4.20.

versions

Ubuntu 24.04
ACS 4.19.3
Linstor 1.32.1
LVM-THIN

The steps to reproduce the bug

  1. Create volume snapshot
  2. Revert volume to snapshot state
  3. Volume became full-size

What to do about it?

After restoring disk from snapshot, disk must remains thin and not full-sized.

Activity

  1. SviridoffA commented on Sep 30, 2025

    @SviridoffA
    Author

    cc @rp-

  2. rp- commented on Oct 2, 2025

    @rp-
    Contributor

    Can you get the log of the qemu command on the agent that is "restoring" the snapshot?
    I think it can be seen with DEBUG logging

  3. SviridoffA commented on Oct 2, 2025

    @SviridoffA
    Author

    @rp-

    Thank you for your reply. If I understand you correctly, you are referring to this command:

    2025-10-02T16:16:16.888305+03:00 node3 java[3762555]: DEBUG [utils.script.Script] (agentRequest-Handler-2:) (logid:abd91fb9) Successfully executed process [3767985] for command [qemu-img convert -O raw -U --image-opts driver=qcow2,file.filename=/mnt/382be04c-7123-3002-bca6-4751cf92136b/snaptest /dev/drbd1195 ].
    

    But just in case, I am attaching the full log output from the agent concerning two different virtual machines where the reverting is being performed. The disks of both virtual machines occupy 4.2 GB before reverting and 20 GB after. I am checking the disk sizes via linstor v l

    1.txt
    2.txt

  4. rp- commented on Oct 3, 2025

    @rp-
    Contributor

    Yeah this looks like it doesn't use the sparse/discard options for converting the image.
    I'll check if this wrong in the driver part or somewhere within CloudStack itself

  5. added this to the 4.20.3 milestone on Oct 3, 2025
  6. added theissue type on Oct 3, 2025
  7. rp- commented on Oct 3, 2025

    @rp-
    Contributor

    I found and fixed the issue if you are brave, you can give it a try with this .jar:

    cloud-plugin-storage-volume-linstor-4.19.3.0.jar.gz

  8. SviridoffA commented on Oct 6, 2025

    @SviridoffA
    Author

    @rp- Thank you so much for this fix! I think I'll wait for the release, but just in case I change my mind, how do I upgrade plugin? Do I need to extract it to the /usr/share/cloudstack-management/lib folder, replacing what's there, and then restart the management server? Is this correct procedure?
    Hi @DaanHoogland Is there a chance this fix will be included in version 4.20.2?🙏

  9. rp- commented on Oct 6, 2025

    @rp-
    Contributor

    @rp- Thank you so much for this fix! I think I'll wait for the release, but just in case I change my mind, how do I upgrade plugin? Do I need to extract it to the /usr/share/cloudstack-management/lib folder, replacing what's there, and then restart the management server? Is this correct procedure? Hi @DaanHoogland Is there a chance this fix will be included in version 4.20.2?🙏

    This fix is actually for the agent side, so you would need to replace it in /usr/share/cloudstack-agent/lib, but this .jar has also additional fixes, not yet in 4.19.3.0, which also use management server code.

  10. DaanHoogland commented on Oct 7, 2025

    @DaanHoogland
    Contributor

    Hi @DaanHoogland Is there a chance this fix will be included in version 4.20.2?🙏

    We must merge the 4.19 branch forward to get it in (we usually don’t forget 😉 )

  11. modified the milestones: 4.20.3, 4.20.2 on Oct 31, 2025
  12. DaanHoogland commented on Oct 31, 2025

    @DaanHoogland
    Contributor

    fixed in #11787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions