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

    Overview of a logical allocation of thin provisioned SRs

    Scheduled Pinned Locked Moved Xen Orchestra
    6 Posts 2 Posters 360 Views 1 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.
    • V Offline
      vit-zikmund
      last edited by

      Hello great gurus of XCP-ng and XO!

      Today I got myself into a "little" trouble by accidentally overcommitting my thin provisioned SR, because I falsely believed there's enough space for the theoreticaly-full VDIs I was migrating into it. While that eventually succeeded, later some VDIs grew and the whole space got depleted, and so the VMs ended up with a ro filesystems 😞

      Call me gullible, but I did so because I believed (for reasons I blame myself) this little green graph shows the sum of VDI sizes and not the real filesystem allocation.
      8e089112-abc1-44e3-9fe2-62f195bb242a-image.png

      Take e.g. the VDI I hovered over - kube-demo01-worker03, where it shows 12.32 GiB. When I switch to the "Disks" tab, I see its size to be 100 GiB:
      3189bcde-138a-425b-9930-ae2717da568d-image.png

      I think that it's nice to be able to see what's the real allocation sum of the thin provisioned VDIs, but I believe I also need to know when I will overcommit the space when adding more VDIs. A sum of the VDI full sizes would be a big help, but I haven't found it. Did I miss it somewhere? If not, could that be possibly added? I hope we could elaborate on how.

      Thanks!
      Vit Zikmund

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

        Hi!

        It is possible to get that info, however, having over commit is normal, what really matters in the space used. Here, you have 280GiB free.

        Maybe there's even an issue opened on this, have you searched on XO GH repo?

        1 Reply Last reply Reply Quote 0
        • V Offline
          vit-zikmund
          last edited by

          Oh, thanks @olivierlambert, there indeed is such an issue: https://github.com/vatesfr/xen-orchestra/issues/3915

          In the meantime I scratched together a little oneliner to figure out the right number:

          SR='sr-name-label=<sr-name-label>'  # or SR='sr-uuid=<sr-uuid>'
          xe vdi-list "$SR" is-a-snapshot=false params=virtual-size | grep '[^[:space:]]' | sed 's/[^:]*: //' | awk '{s+=$1} END {print s/1024/1024/1024 " GiB"}'
          

          It ignores snapshots, but that's OK for me.

          Anyways, I'll try following up in the issue. Thanks again 😉

          etlweather created this issue in vatesfr/xen-orchestra

          open Show allocated space on SR #3915

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

            Please add a comment, so we won't forget this and put it into XO Lite and XO 6 🙂

            V 1 Reply Last reply Reply Quote 0
            • V Offline
              vit-zikmund @olivierlambert
              last edited by

              Hello @olivierlambert, I've put a comment to the issue. Was it what you expected? The issue itself seemed rather abandoned and nothing moved there since the comment. Is that to be expected? I don't want to sound disrespectful, I know all this is best-effort, but you react surprisingly often! Just want to make sure I didn't miss anything. Some of the changes I suggested I could maybe hand over in a (lame) PR, if such an effort would be appreciated.

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

                That's because the effort to change this will be taken into account in XO 6 🙂

                Alternatively, you can indeed contribute, this will be very welcome!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post