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

    Native Ceph RBD SM driver for XCP-ng

    Scheduled Pinned Locked Moved Development
    32 Posts 7 Posters 7.3k Views 12 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.
    • Maelstrom96M
      Maelstrom96 @benapetr
      last edited by

      @benapetr Good news, seems like the latest version for SM will implement vdi_revert which should work nicely with Ceph RBD. The only thing now is to have the newer Ceph kernel drivers in XCP-ng since the current driver is very old... (v12 I believe, we're now at v20, soon v22)

      henri9813H 1 Reply Last reply
      Reply Quote 1
      • henri9813H
        henri9813 @Maelstrom96
        last edited by

        Hello @Maelstrom96.

        This should be possible in the future version of XCP-NG built on top of alma 9 🙂

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

          It's more like "partially"/loosely based on Alma (10, not 9). And yes, the kernel will be far more recent, same for Xen and so on.

          dicode-nlD 1 Reply Last reply
          Reply Quote 2
          • dicode-nlD
            dicode-nl @olivierlambert
            last edited by dicode-nl

            @olivierlambert I backported recent libceph/rbd/krb5 support to the xcp 8,3 kernel to support the new ceph authx aes256k method and include more rbd image features. I've added the rpms which install these newer versions as alt and extra modules and can be removed again as well. although I did run test on it I would suggest people to take caution and do not test in PROD 🙂

            rpms removed - obsoleted

            If anyone else is interested / has feedback please do let me know!

            Kind regards
            Tim

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

              Nice! Have you tested the snapshot, revert and so on?

              dicode-nlD 1 Reply Last reply
              Reply Quote 0
              • dicode-nlD
                dicode-nl @olivierlambert
                last edited by

                @olivierlambert busy writing/adapting de RBD SR and running tests. once I got the results and thins finalized I'll post and update with the RBDSR file (based on @benapetr)

                dicode-nlD 1 Reply Last reply
                Reply Quote 2
                • dicode-nlD
                  dicode-nl @dicode-nl
                  last edited by dicode-nl

                  I've finished work on the RBD SR driver. Packaged as an RPM which makes sure the other kernel module drivers are required (otherwise the newer RBD features aren't available) and it doesn't require any rbd tooling on the dom0.

                  rpms removed - obsoleted

                  This needs a cephx key to have dom0 access the rbd images and a ceph mgr user/pw to manage the SR.

                  The driver creates a rbd namespace with the sr-uuid as it's name and the images are the vdi-uuid. so multiple sr's on the same ceph rbd pool are supported.

                  If leverages the xen-blkback dom0 to expose the vdi to the guest. No tapdisk, qcow2 or vhd involved. Uses native RBD snapshots, leveraging the new vdi_revert and uses GC to flatten and clean snapshots and images when required.

                  I'll be setting up a git repo with my sources for the kernel modules and sr driver for anyone to dive into the sources and perhaps help testing and improving this,

                  The next thing I'm diving into is SXM and SMAPIv3 version as I guess those are the missing parts to make this future proof.

                  dicode-nlD 1 Reply Last reply
                  Reply Quote 0
                  • dicode-nlD
                    dicode-nl @dicode-nl
                    last edited by

                    For these interested and for further development:

                    https://github.com/dicode-nl/xcp-ng-ceph-rbd

                    @olivierlambert any interest in fixing this for SMAPIv3 for inclusion into XCP 9?

                    B 1 Reply Last reply
                    Reply Quote 1
                    • B
                      benapetr @dicode-nl
                      last edited by

                      @dicode-nl hello, very nice, I will definitely check it out!

                      1 Reply Last reply
                      Reply Quote 0
                      • dicode-nlD
                        dicode-nl
                        last edited by

                        @benapetr @olivierlambert I've made a new release which includes SMAPIv1 improvements and a proper SMAPIv3 volume + datapath plugin.

                        https://github.com/dicode-nl/xcp-ng-ceph-rbd/releases#release-v20260827

                        Let me know your thoughts and if there is anything you'll like to see added / changed / tested.

                        Next step for me is CBT and SXM.

                        dicode-nlD 1 Reply Last reply
                        Reply Quote 0
                        • dicode-nlD
                          dicode-nl @dicode-nl
                          last edited by

                          Did a lot of work this weekend and added more to the volume and datapath.
                          in native mode, everything is rbd native including CBT! still working on SXM
                          in tapdisk mode, everything is working with optimized rbd calls except SXM
                          in qemu mode everything works by using qemu-dp and also SXM in MSAPIv3

                          Huge improvements made, but qemu is the slowest mode due to extra nbt hop.
                          I only provided tapdisk and qemu modes to get more information on how CBT works and how SXM works. Right now I'm using that knowledge to provide SXM over native rbt. I have some good ideas but need to figure out how to make them work.

                          I've also made a backport to ceph v15.2 which runs on dom0 to also include the newer cephx authentication protocol. This is because the ceph dashboard cannot provide a diff between snaps (which is needed for CBT) but a pull request is pending to have this working in the future without the need for rbd userspace.

                          I'll update my git and packages later this week.

                          dicode-nlD 1 Reply Last reply
                          Reply Quote 1
                          • dicode-nlD
                            dicode-nl @dicode-nl
                            last edited by

                            Latest pre-release available:

                            https://github.com/dicode-nl/xcp-ng-ceph-rbd/releases/tag/v20260901

                            This release includes a qemu backend mode which fully supports SXM over SMAPIv3! Both tapdisk and native mode still don't have full SXM but can be targets to transfer VDI's to.

                            Also patches ceph userspace tools are available to provide rbd command line tool. This is needed for CBT as upstream Ceph doesn't have a diff end-point in their API, awaiting pull request https://github.com/ceph/ceph/pull/71388. This is already wired into the RestBackend code so once that lands in Ceph this SR can run without the need for Ceph userspace tools in dom0.

                            GitHub updated with the latest commits and changes.

                            WIP: SXM on native rbd without qemu-dp for the native and tapdisk mode.

                            As always, use with caution. I did run a lot of test scenario's but please do test yourself and let me know your findings!

                            dicode-nlD 1 Reply Last reply
                            Reply Quote 0
                            • dicode-nlD
                              dicode-nl @dicode-nl
                              last edited by

                              New version:

                              https://github.com/dicode-nl/xcp-ng-ceph-rbd/releases/tag/v20260903

                              This one includes native Ceph rbd SXM over SMAPIv3!

                              GitHub updated with the latest commits and changes.

                              As always, use with caution. I did run a lot of test scenario's but please do test yourself and let me
                              know your findings!

                              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