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

    XO Remote mount.nfs: access denied by server while mounting

    Scheduled Pinned Locked Moved Xen Orchestra
    26 Posts 7 Posters 4.8k Views 5 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.
    • tjkreidlT Offline
      tjkreidl Ambassador @daninmanchester
      last edited by

      @daninmanchester Hmmm...maybe an NFS V3 vs. V4 support issue? Could you provide the full output of "showmount -e 192.168.11.60" ?

      daninmanchesterD 1 Reply Last reply Reply Quote 0
      • daninmanchesterD Offline
        daninmanchester @tjkreidl
        last edited by

        @tjkreidl what version should I be using or can I force XO to use a particular version?

        It doesn't output any more than I shared last time :

        bash-5.1# showmount -e 192.168.11.60
        Export list for 192.168.11.60:
        /export/Backups 192.168.11.0/24
        /export/Everyone 192.168.11.0/24
        /export 192.168.11.0/24
        bash-5.1#

        It just occurred to me, I'm running XO in a docker not direct on the host. Do I need some network config to enable NFS?

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

          @daninmanchester Have you read this info?

          daninmanchesterD 1 Reply Last reply Reply Quote 0
          • H Offline
            HeMaN @Danp
            last edited by HeMaN

            @Danp said in XO Remote mount.nfs: access denied by server while mounting:

            @daninmanchester said in XO Remote mount.nfs: access denied by server while mounting:

            "stderr": "mount.nfs: access denied by server while mounting 192.168.11.60:/Backups",

            Would appear to be a rights issue to me.

            @tjkreidl verified they can be seen :

            Export list for 192.168.11.60:
            /export/Backups 192.168.11.0/24
            /export/Everyone 192.168.11.0/24
            /export 192.168.11.0/24

            do you need to add "/export" (/export/Backups ) to be able to find the right path?

            tjkreidlT 1 Reply Last reply Reply Quote 0
            • tjkreidlT Offline
              tjkreidl Ambassador @HeMaN
              last edited by tjkreidl

              @HeMaN Yes, if I recall correctly, in the /etc/exports file. the full path should be specified and then "exportfs -a" should be issued to refresh the export list.
              I just noticed your error message doesn't include the /export directory in front:
              mount.nfs: access denied by server while mounting 192.168.11.60:/Backups

              daninmanchesterD 1 Reply Last reply Reply Quote 0
              • daninmanchesterD Offline
                daninmanchester @Danp
                last edited by

                @Danp no, I hadn't seen that. but I think I have now done this without any change to my issue. One thing that wasn't 100% clear is where sudoers should be on docker.

                /etc/sudoers?

                1 Reply Last reply Reply Quote 0
                • daninmanchesterD Offline
                  daninmanchester @tjkreidl
                  last edited by

                  @tjkreidl I have tried various flavors.

                  2ee6b541-87da-4d08-bf16-cc0055118d89-image.png

                  1 Reply Last reply Reply Quote 0
                  • daninmanchesterD Offline
                    daninmanchester
                    last edited by

                    Well .... I'm totally baffled.
                    I've tried reapplying permissions.
                    forcing the server UID/GID
                    forcing the client UID/GID.
                    NOACLs
                    Squashing.

                    One thing I can say, is that it is working on my host so it must be something about my XO setup trying to talk to it. which may well still be permissions.

                    4397e128-3a81-4f7f-9d9c-8bb6243a182c-image.png

                    1 Reply Last reply Reply Quote 0
                    • daninmanchesterD Offline
                      daninmanchester
                      last edited by

                      okay, so I further narrowed it down. on the host machine I can mount. it is only within the docker container it is the issue. either at the command line or at XO. This leads me to believe this is a docker related problem not XO.

                      Sorry to have taken up your time, but thanks very much for your help!
                      At least i have a clear direction to google now.

                      M tjkreidlT 2 Replies Last reply Reply Quote 0
                      • M Offline
                        mjtbrady @daninmanchester
                        last edited by

                        @daninmanchester

                        What is the IP address of the host that is running XO?

                        The docker container will need the SYS_ADMIN capability to do NFS mounts.

                        tjkreidlT 1 Reply Last reply Reply Quote 0
                        • tjkreidlT Offline
                          tjkreidl Ambassador @daninmanchester
                          last edited by

                          @daninmanchester I would think Docker is involved, as well. I was going to suggest to create a "standard" test VM ans see if you can connect storage to it. If so, that would put the blame on something specific to the VM that has that Docker container.

                          1 Reply Last reply Reply Quote 0
                          • tjkreidlT Offline
                            tjkreidl Ambassador @mjtbrady
                            last edited by

                            @mjtbrady That seems right, because the Docker instanceis independent and internal to the VM that otherwise is part of the XCP-ng networking structure and wouldn't have the necessary access permissions on it's own.

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

                              Could this be due to a missing package (nfs-common)?

                              1 Reply Last reply Reply Quote 0
                              • daninmanchesterD Offline
                                daninmanchester
                                last edited by

                                I setup another VM as someone suggested and the NFS share mounted and worked. So there is something I am not understanding about docker permissions / requirements.

                                In the end, following a permissions reset and forcing the NFS share to squash and use my user/group ID I think I have progress. I can see it is writing to the NFS share.

                                Then I got : EEXIST: file already exists, open '/run/xo-server/mounts/6299d107-2aa2-41bf-bfd7-2f487ff5422f/xo-vm-backups/801e2b10-5c7d-b7af-ad5e-fbcc83e47d5b/.20220930T221548Z.xva'

                                A quick google led me to this being related to nfs 3. I switched to NFS 4 then I got path not found.

                                Not sure why, but I tried removing "export" from the path and it worked.

                                It does appear now to be running a backup job .... fingers crossed.

                                What a mine field!

                                Thanks for all the pointers.

                                tjkreidlT 1 Reply Last reply Reply Quote 0
                                • tjkreidlT Offline
                                  tjkreidl Ambassador @daninmanchester
                                  last edited by

                                  @daninmanchester Yes, a mine field is about right. Super good ou have made so much progress!

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

                                    Now you understand why we sell/distribute XO in a virtual appliance we can test 😉

                                    daninmanchesterD 1 Reply Last reply Reply Quote 0
                                    • daninmanchesterD Offline
                                      daninmanchester @olivierlambert
                                      last edited by

                                      @olivierlambert I think the intricacies of NFS, my seemingly borked NFS permissions were likely the real issue. I rarely have real problems with XO. I tried proxmox but didn't get on with it so switched back.

                                      I'm just a home / homelab user, but always impressed with the community around XCP-NG too and have learnt a huge amount from Lawrence Systems.

                                      Anyway this morning I have a successful backup completed :

                                      c3c60198-2937-4e62-af46-3373173fa89c-image.png

                                      Thanks again.

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

                                        Great news! Enjoy 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • P Offline
                                          parallax @daninmanchester
                                          last edited by

                                          @daninmanchester Thanks so much - this is the exact same problem I had, which was further complicated by running XO in Docker running on the OMV host exporting the NFS shares.

                                          So basically you just built a small XO VM instead of running it in Docker? I had originally been thinking of making a small VM to run XO in a container there - just because Docker containers are super easy to keep updated and I could run some other orchestration-y stuff there too, like Rancher - but if you're saying that's a non-starter I'll just bite the bullet and build a tiny VM dedicated to XO and be very grateful to you for having saved me a lot of frustration. 😊

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