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

    Force Remove a NFS Storage Repository

    Scheduled Pinned Locked Moved Solved Management
    7 Posts 3 Posters 174 Views 2 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.
    • K Offline
      kagbasi-ngc
      last edited by

      Good-day folks,

      I have an old NFS storage repository that was previously hosted on a Windows Server 2016 machine running NFS Server for Windows, that is being stubborn and I would like to remove it forcefully, along with anything related to it. The NFS Server is no longer online, so the connection isn't alive and I suspect the removal is failing because XOA can't unmount it.

      I have tried being nice by clicking the Disconnect from all hosts button, but the tasks sits there for several hours then mocks me and disappears. I have tried to unplug the connection from each host, one at a time, same results - the wheel spins for some time then goes away.

      Any assistance would be greatly appreciated, thanks.

      My Environment:

      Hosts: 3-node XCP-ng Pool v8.3.0
      XOA: v5.106.4 build 20250604
      Environment: Airgapped

      tjkreidlT 1 Reply Last reply Reply Quote 0
      • K Offline
        kagbasi-ngc @tjkreidl
        last edited by

        @tjkreidl said in Force Remove a NFS Storage Repository:

        @kagbasi-ngc See if this thread can help you out:
        https://xcp-ng.org/forum/topic/6618/how-to-remove-this-sr-nfs-storage/

        A BIG THANK YOU! This was quite helpful, and helped me resolve my issued.

        Here's what I ended up doing (after reading the post you shared):

        • STEP 1: On each host, I ran the mount command (without any parameters).

        • STEP 2: I identified the mount point of the SR in question - for me it was /run/sr-mount/<SR-UUID>

        • STEP 3: On each host, I unmounted the NFS share with umount -lf /run/sr-mount/<SR-UUID>

        • STEP 4: From the pool master, I identified the UUID of the PBDs with xe pbd-list sr-uuid=<SR-UUID>

        • STEP 5: While still on the pool master, I unplugged each PBD with xe pbd-unplug uuid=<PBD-UUID> force=true (I had three to unplug, adjust accordingly)

        • STEP 6: I confirmed in Xen Orchestra that the status of each host connection had changed to Disconnected

        • STEP 7: From the pool master, I forgot the SR with xe sr-forget uuid=<SR-UUID>

        Hope this helps someone out there. Thanks again @tjkreidl

        ForzaF 1 Reply Last reply Reply Quote 1
        • tjkreidlT Offline
          tjkreidl Ambassador @kagbasi-ngc
          last edited by

          @kagbasi-ngc See if this thread can help you out:
          https://xcp-ng.org/forum/topic/6618/how-to-remove-this-sr-nfs-storage/

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kagbasi-ngc @tjkreidl
            last edited by

            @tjkreidl said in Force Remove a NFS Storage Repository:

            @kagbasi-ngc See if this thread can help you out:
            https://xcp-ng.org/forum/topic/6618/how-to-remove-this-sr-nfs-storage/

            A BIG THANK YOU! This was quite helpful, and helped me resolve my issued.

            Here's what I ended up doing (after reading the post you shared):

            • STEP 1: On each host, I ran the mount command (without any parameters).

            • STEP 2: I identified the mount point of the SR in question - for me it was /run/sr-mount/<SR-UUID>

            • STEP 3: On each host, I unmounted the NFS share with umount -lf /run/sr-mount/<SR-UUID>

            • STEP 4: From the pool master, I identified the UUID of the PBDs with xe pbd-list sr-uuid=<SR-UUID>

            • STEP 5: While still on the pool master, I unplugged each PBD with xe pbd-unplug uuid=<PBD-UUID> force=true (I had three to unplug, adjust accordingly)

            • STEP 6: I confirmed in Xen Orchestra that the status of each host connection had changed to Disconnected

            • STEP 7: From the pool master, I forgot the SR with xe sr-forget uuid=<SR-UUID>

            Hope this helps someone out there. Thanks again @tjkreidl

            ForzaF 1 Reply Last reply Reply Quote 1
            • K kagbasi-ngc has marked this topic as solved
            • olivierlambertO olivierlambert has marked this topic as solved
            • ForzaF Offline
              Forza @kagbasi-ngc
              last edited by

              @kagbasi-ngc A fair warning that lazy unmount doesn't release the mount or any active file descriptors, just hides them from them from the mount output.

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kagbasi-ngc @Forza
                last edited by

                @Forza thanks for the caution. I wondered about that as well, so I initially tried with just -f and it didn't work. So this is what ended up working for me.

                Perhaps one of the developers from the Vates team can chime in as to how best to handle such a situation properly; where the NFS Server is simple no longer online to support the normal unmounting routine.

                ForzaF 1 Reply Last reply Reply Quote 0
                • ForzaF Offline
                  Forza @kagbasi-ngc
                  last edited by Forza

                  @kagbasi-ngc As far as I know, Linux cannot release it without rebooting.

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kagbasi-ngc @Forza
                    last edited by

                    @Forza Good point. I need to apply the latest patches anyway, so I'll be rebooting the pool later today anyway.

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