XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Dedicated thread: removing the 2TiB limit with qcow2 volumes

    Scheduled Pinned Locked Moved Storage
    396 Posts 48 Posters 415.3k Views 55 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • olivierlambertO
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by olivierlambert

      Hello everyone,

      As some of you may know, we are in the process of tackling the limitation of 2TiB for VM disks while keeping snapshots, copy on write capabilities, live migration, etc (unlike the existing raw VDI type).

      This post is to announce an beta release of our work to overcome this limitation. This is a significant step forward, and we are happy to share our progress and gather your feedback.

      What's working now

      This implementation works with FileSR types such as EXTSR and NFSSR (local ext and NFS storage). Those operations are working:

      • Using an existing NFS/Local ext SR (file based) AND Block based SR (LVM with iSCSI or FC)
      • VDI creation
      • VDI snapshot
      • VM export (XVA)
      • VM import (XVA)
      • Full backup
      • Cold disk resize
      • VDI copy
      • Incremental backups
      • Disk stats
      • Auto migration from VHD to Qcow2 if you live migrate

      What's NOT working yet

      • Trim support

      How it works

      This preview allows us to introduce QCOW2 in the SMAPI and a driver for it in blktap (the disk backend in XCP-ng). This needed to rewrite a lot of the storage stack to handle multiple disks formats. The current version allows to directly creates QCOW2 on existing SRs. Meaning if you install the preview on a test machine already having a File-based SR, any new VDI you will create will be a QCow2 and they will live in the same SR than VHDs. There is no need to have a different SR to have QCow2 support. There is currently no supported migration path between VHD and QCOW2. (But it's possible that exporting a XVA then importing it again will create a QCOW2 ;))

      As I said previously, only FileSR works (and drivers inheriting from it like EXTSR) but not only for QCOW2, this preview will break LVM-based and LINSTOR SRs. We are working on making LVMSR work as soon as possible but they are a bit more complicated than FileSR.


      ⚠ ⚠ ⚠
      This BETA release is intended solely for testing and experimentation

      DO NOT USE IT ON PRODUCTION systems or hosts that cannot afford potential issues.
      ⚠ ⚠ ⚠


      How to test

      Pre-requisite: XCP-ng 8.3 up-to-date. To test the beta, you need to add a repo file containing the information for the QCOW2 feature repo.
      By using this command directly on the host(s):

      wget https://repo.vates.tech/xcp-ng/8/8.3/xcp-ng-qcow2.repo -O /etc/yum.repos.d/xcp-ng-qcow2.repo
      

      Following this, you can then update with the command:

      yum update --enablerepo=xcp-ng-testing,xcp-ng-qcow2
      

      This should update the blktap, sm and sm-fairlock packages with a .qcow2 version.

      From now, all new VDIs will be created as a qcow2 on this SR

      If you want to go back to an older version:

      yum downgrade -y blktap sm sm-fairlock  
      

      If you have any problems, you can downgrade the packages and rescan the SR. The scan will remove all QCOW2 VDIs from the XAPI database but they won't be deleted. You can re-install the preview, rescan the SR for them to be picked up again and re-attach them to VM when they appear in the XAPI DB. Being dropped from XAPI DB will make them lose any other information like name and description, so if you want to know which VDI is which, write the UUID somewhere else to be able to find them again and to attach them to a VM.

      If you find anything that doesn't work or you expected to be different, tell us in this thread. We value your feedback to improve this implementation.

      Thank your for helping us for new storage capabilities 🙂

      Acknowledgements

      Thank you very much to the whole team who worked on this, this required a great collaboration between lower layers and the SMAPI. And thanks @dthenot for co-authoring this post!

      Kudos to them and now, enjoy the tests 😛

      B bogikornelB M 3 Replies Last reply
      Reply Quote 14
      • olivierlambertO olivierlambert pinned this topic on
      • B
        Brian-0101 @olivierlambert
        last edited by

        @olivierlambert Looking forward to this!

        1 Reply Last reply
        Reply Quote 1
        • bogikornelB
          bogikornel @olivierlambert
          last edited by

          @olivierlambert

          I tested it on 2 VPS (Debian 12, OL9), took many snapshots. Then I deleted them all. The system merged fine, but both VPS disks became corrupt.

          However, the biggest problem is that after RESET one of the VPS booted up (OL9), but in the original state, which is the first snapshot state.

          1 Reply Last reply
          Reply Quote 0
          • olivierlambertO
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Hi,

            Can you provide more details? Corrupt how? Also what do you mean by reset? I'm happy to take your feedback, but in order to reproduce we need more info 🙂

            bogikornelB 1 Reply Last reply
            Reply Quote 0
            • bogikornelB
              bogikornel @olivierlambert
              last edited by bogikornel

              @olivierlambert

              1.create new VM (OL 9.3) from cloud-init template
              6073b602-dfa1-467d-a30d-f9d843a0ec2a-image.png
              2. than power off and create a first snapshot
              3. than boot and running „dnf upgrade -y”
              4. than reboot, oracle linux has been updated to 9.5
              8e6da2a7-851b-4434-a7f8-58e15c31ff64-image.png
              5. created second snapshot
              6. logged in and running : dd if=/dev/random of=testfile bs=1M count=2k oflag=direct status=progress
              7. than restore first snapshot with „Snapshot before”, This will be the third snapshoot
              8. then I boot the VM and start the first snapshot running 9.3 as Oracle linux
              b2725d8b-6b8e-4a26-a393-c1944d66c92c-image.png
              9. than revert third snapshot without „snapshot before”
              10. OK, the VM boots up again to version 9.5, I have the testfile.
              7d77b237-6c55-4970-adb9-5cb17e1a60fd-image.png
              11. So far everything is running fine. Then I delete all the snaphsot, the coalesce starts fine. In the end I can't issue any command because the file system becomes corrupt.
              55e7e893-e0ca-4992-a591-e1ac9854c4f1-image.png
              12100312-b530-4dc4-ac5b-9fd038833ef2-image.png

              12 Since it doesn't really do anything, a reset is next, where the first snapshot version is booted up nicely, if the filesystem is not very corrupted. For me it did not boot:
              33ea0815-c826-4f66-94e2-78dcfcb18925-image.png 0f0569d9-f393-422c-b2d4-8d0b016eb591-image.png

              I hope this is enough information.

              DanpD A 2 Replies Last reply
              Reply Quote 0
              • DanpD
                Danp Pro Support Team @bogikornel
                last edited by

                @bogikornel You lost me at step 12. How exactly did you perform this reset? Also, how would it be booting on 9.3 if you removed all snapshots in step 11?

                Have you repeated these steps to see if the corruption is repeatable?

                bogikornelB 1 Reply Last reply
                Reply Quote 0
                • bogikornelB
                  bogikornel @Danp
                  last edited by

                  @Danp

                  In point 12, you can see that I deleted all the snapshots while the VM was running. The coalesce process started while the VM was running. When the coalesce is finished, the system is unusable as shown in the picture.

                  Then since the shutdown process is not running either, I reset the VM (forced reboot).
                  Then the old version 9.3 as boots, which usually does not finish because the filesystem becomes so corrupt. Even after the fsck process shown in the attached picture, the system does not boot.

                  I have repeated the above processes quite a few times. I have also tested with Debian 12 operating system, it is no better.

                  DanpD 1 Reply Last reply
                  Reply Quote 0
                  • DanpD
                    Danp Pro Support Team @bogikornel
                    last edited by

                    @bogikornel Thanks for clarifying. I guess what confused me was this --

                    a reset is next, where the first snapshot version is booted up nicely,

                    I was envisioning that you did something more complicated than forced rebooting the VM since it was booting into OL 9.3 when the VM had previously been updated to OL 9.5.

                    1 Reply Last reply
                    Reply Quote 0
                    • olivierlambertO
                      olivierlambert Vates 🪐 Co-Founder CEO
                      last edited by

                      Okay thank you very much, it's a lot more clear. We'll try to reproduce here 👍

                      1 Reply Last reply
                      Reply Quote 0
                      • R
                        ravenet
                        last edited by

                        I've done some very basic initial testing

                        Created a largeTest vdi, at 2.1TB through XOA. It is accepted, and the disk shows up.
                        If I check the /run/sr-mount/sruuid.../ I can see the qcow2 disk file beside my existing vhd disks
                        attached disk to existing vm, formatted it and was able to write data to it, and read files back.

                        1 Reply Last reply
                        Reply Quote 1
                        • A
                          azzeddineslimani
                          last edited by

                          Hello, I am not sure if I can use this feature to import from VMware a > 2 TiB VM ?

                          1 Reply Last reply
                          Reply Quote 0
                          • olivierlambertO
                            olivierlambert Vates 🪐 Co-Founder CEO
                            last edited by

                            You will as soon it's stable enough, as we said for now it's a test phase.

                            1 Reply Last reply
                            Reply Quote 0
                            • B
                              bufanda
                              last edited by

                              Hi I did some Testing with an NFS SR and I must say the write speed is really bad.
                              Here is my Setup

                              XCP-ng 8.3 latest patches installed
                              Hardware is an HP EliteDesk 800 G3 with an i5 6500T an Intel NIC and an RTL8125 Nic. 32GB RAM and 250GB internal storage.

                              The Storage Repository is connected via the Realtek NIC which is connected to a 1GB/s Switch (I need to upgrade my lab :))

                              I have created a new VM for AlmaLinux 9 and booted from the latest Boot-ISO (Network Install).
                              The VDI is only 20GiB so no way near any limits we try to break. Installing of the OS took around 14 hours not sure how long exactly because I went to bed at one point.

                              I also installed with the same setting a VM on my 8.2.1LTS Pool and that VM installed in the time the VM on the qcow2 based VDI took to reboot after installation.

                              I also did some measurements with dd after the VMs finally boooted.

                              So for the VM based on qcow2 VDI it has a sequential write speed of 216kB/s and a Read speed of 140MB/s. So read seems fine but write is killing it.

                              [thorsten@alma9qcow ~]$ dd if=/dev/zero of=/tmp/tempfile bs=1M count=1024 conv=fdatasync
                              1024+0 Datensätze ein
                              1024+0 Datensätze aus
                              1073741824 Bytes (1,1 GB, 1,0 GiB) kopiert, 4967,27 s, 216 kB/s
                              [thorsten@alma9qcow ~]$ echo 3 | sudo tee /proc/sys/vm/drop_caches
                              3
                              [thorsten@alma9qcow ~]$ dd if=/tmp/tempfile of=/dev/null bs=1M count=1024
                              1024+0 Datensätze ein
                              1024+0 Datensätze aus
                              

                              I then used an already existing VM on the same XCP-ng 8.3 Host to check the Hosts connections. And it came out with 43MB/s write and 57MB/s read. Since it's my lab
                              network it could be congested at that time and only delivered half the throughput. But it shows that the Host is capabale of doing mor.

                              ❯ dd if=/dev/zero of=/tmp/tempfile bs=1M count=1024 conv=fdatasync
                              1024+0 records in
                              1024+0 records out
                              1073741824 bytes (1.1 GB, 1.0 GiB) copied, 24.892 s, 43.1 MB/s
                              ❯ echo 3 | sudo tee /proc/sys/vm/drop_caches
                              3
                              ❯ dd if=/tmp/tempfile of=/dev/null bs=1M count=1024
                              1024+0 records in
                              1024+0 records out
                              1073741824 bytes (1.1 GB, 1.0 GiB) copied, 18.6946 s, 57.4 MB/s
                              

                              For good measures here are the results of the 8.2.1LTS Host

                              [thorsten@alma9vhd]~% dd if=/dev/zero of=/tmp/tempfile bs=1M count=1024 conv=fdatasync
                              1024+0 Datensätze ein
                              1024+0 Datensätze aus
                              1073741824 Bytes (1,1 GB, 1,0 GiB) kopiert, 20,7739 s, 51,7 MB/s
                              [thorsten@alma9vhd]~% echo 3 | sudo tee /proc/sys/vm/drop_caches
                              3
                              [thorsten@alma9vhd]~% dd if=/tmp/tempfile of=/dev/null bs=1M count=1024
                              1024+0 Datensätze ein
                              1024+0 Datensätze aus
                              1073741824 Bytes (1,1 GB, 1,0 GiB) kopiert, 11,4976 s, 93,4 MB/s
                              

                              I hope this test helps you in any way. If you need more Info feel free to ask.

                              Regards

                              A 1 Reply Last reply
                              Reply Quote 1
                              • A
                                anthoineb Vates 🪐 XCP-ng Team @bogikornel
                                last edited by

                                @bogikornel, I did reproduce the problem twice. I think I understand the problem and working on it. I hope I will be able to send a fix in the next alpha.

                                1 Reply Last reply
                                Reply Quote 3
                                • A
                                  anthoineb Vates 🪐 XCP-ng Team @bufanda
                                  last edited by

                                  @bufanda Thank you for your report. That's really a strange behavior, only on write. I'll try to reproduce that.

                                  1 Reply Last reply
                                  Reply Quote 1
                                  • A
                                    Andrw0830
                                    last edited by

                                    Not sure if this is related to the issue @bufanda mentioned, but I've noticed with local ext storage when you have a QCOW2 disk over 2TB, that powering on the VM takes a couple minutes instead of a few seconds with VDI or a lower QCOW2 disk. Also I've noticed with Ubuntu legacy or UEFI VMs with big QCOW2 disks attached have slow performance and takes forever to boot into the OS. This happened on a freshly created VM and one I was able to import from VMWare.

                                    1 Reply Last reply
                                    Reply Quote 0
                                    • R
                                      raider600
                                      last edited by

                                      Not sure how useful this is. I have 4kn SAS drives. I loaded up the alpha release, and created an SR and VDI on a single disk. I attempted to copy a 5GB ISO from a RAID10 SR using the 'Largeblock' driver to the disk on the alpha driver. And the transfer speed was essentially 0. I think it peaked at 12Mb/s.

                                      Before the alpha driver the transfer speed was over 1Gb/s. Maybe this is to be expected.

                                      1 Reply Last reply
                                      Reply Quote 0
                                      • A
                                        anthoineb Vates 🪐 XCP-ng Team
                                        last edited by

                                        Sorry for the delay. We are working hard on qcow2 volumes and a new alpha version is currently in testing. We hope to release it next week. We are proud of what has been done in the last 3 weeks on this topic. This will include a fix for the snapshot/coalesce issue and more. A detailed changelog will be published with the release of alpha2. Thank you for your patience.

                                        1 Reply Last reply
                                        Reply Quote 5
                                        • dthenotD
                                          dthenot Vates 🪐 XCP-ng Team
                                          last edited by dthenot

                                          Hello,

                                          We are announcing our second alpha.

                                          This new version resolves the problem of corruption that appeared when coalescing QCOW2 live but also re-introduces the LVMSR with QCOW2.

                                          Same as for FileSR, any already existing LVMSR will create QCOW2 from the moment the update is installed. It also includes making LVMSR work with VHD.

                                          We want to take the opportunity of this addition to also improve our storage tests suite but remember that it is still an alpha.

                                          On blktap side, we have a few fixes for live coalesce and various other fixes.

                                          On sm side, LVM support for QCOW2 and implementing the new interface for live coalesce on blktap.

                                          The coalesce is better integrated with QCOW2 compared to VHD.
                                          In VHD, the online coalesce was done on the parent of a VDI then a leaf would be coalesced offline by pausing the VDI and trying to coalesce in less than 10 seconds so that the VM doesn't see it can't access its disk during this time.
                                          If it wasn't possible to finish in 10 seconds, we would interrupt the coalesce and throw an error before trying again later. It would happen if the VM was doing lot of writes during the online coalesce phase.
                                          Online coalesce on the chain using another process like with VHD is not possible on QCOW2. It means that blktap was to be the one to do the coalesce when the image was in use.
                                          This meant integrating code from libqcow to coalesce online and present it to the SMAPI from blktap. It's something we wanted to do to improve coalesce but it had to be done earlier because the way to coalesce VHD wouldn't work with QCOW2.
                                          At the moment, the pause for coalescing the active disk at the end of leaf coalesce is still present but it will likely change in the future.

                                          We are also working on improving performance of accesses on QCOW2 for blktap.

                                          To update, instead of using a http link directly you can drop this in a file /etc/yum.repos.d/xcp-ng-qcow2.repo on Dom0 of your hosts:

                                          [xcp-ng-qcow2]
                                          name=XCP-ng QCow2 Testing Repository
                                          baseurl=http://repo.vates.tech/xcp-ng/8/8.3/qcow2/x86_64/
                                          enabled=0
                                          gpgcheck=1
                                          repo_gpgcheck=1
                                          gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xcpng  
                                          

                                          After that you can update with yum update --enablerepo=xcp-ng-qcow2

                                          It should update sm, sm-fairlock and blktap.
                                          Following the update, a toolstack restart might be needed xe-toolstack-restart
                                          Since blktap is updated, if you have running VMs they might have unexpected behavior.
                                          A restart might be need to clear these issues.

                                          After this update, LVM SRs should work again and new VDIs created on a LVM SR will also be QCOW2.
                                          We are waiting for your feedback on this new version 🙂

                                          R M 2 Replies Last reply
                                          Reply Quote 3
                                          • olivierlambertO
                                            olivierlambert Vates 🪐 Co-Founder CEO
                                            last edited by

                                            Oh wow ❤ ❤ ❤

                                            1 Reply Last reply
                                            Reply Quote 1

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • First post
                                              Last post

                                            Looks like your connection to XCP-ng was lost, please wait while we try to reconnect.