xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.26k stars 74 forks source link

Creating new NFS SR from Synology not working anymore #486

Open ArmanJakupovic opened 3 years ago

ArmanJakupovic commented 3 years ago

I am unable to add any new NFS SRs. When I first setup the server I did add two shares and they are still connected and working. Adding more from the same Synology NAS doesn't work. I am able to ping the IP.

Export list for 192.168.92.42:
/volume1/docker-restrictive 172.16.16.51
/volume1/Xcp-ng             172.16.16.51
/volume1/Plex Media         172.16.16.51
# xe sr-probe type=nfs device-config:server=192.168.92.42 device-config:serverpath=/volume1/docker-restrictive
<?xml version="1.0" ?>
<SRlist/>
# xe sr-probe type=nfs device-config:server=192.168.92.42:/volume1/docker-restrictive
Error code: SR_BACKEND_FAILURE_140
Error parameters: , Incorrect DNS name, unable to resolve., 
# rpcinfo -p 192.168.92.42
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp    892  mountd
    100005    1   tcp    892  mountd
    100005    2   udp    892  mountd
    100005    2   tcp    892  mountd
    100005    3   udp    892  mountd
    100005    3   tcp    892  mountd
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100021    1   udp  50310  nlockmgr
    100021    3   udp  50310  nlockmgr
    100021    4   udp  50310  nlockmgr
    100021    1   tcp  42824  nlockmgr
    100021    3   tcp  42824  nlockmgr
    100021    4   tcp  42824  nlockmgr
    100024    1   udp  39024  status
    100024    1   tcp  47919  status
sr.probeNfs
{
  "host": "d1e28acf-3735-4e3c-b8ef-7e5db83f770c",
  "server": "192.168.92.42:/volume1/docker-restrictive"
}
{
  "code": "SR_BACKEND_FAILURE_140",
  "params": [
    "",
    "Incorrect DNS name, unable to resolve.",
    ""
  ],
  "call": {
    "method": "SR.probe",
    "params": [
      "OpaqueRef:e66d4857-4dce-4765-bebd-5c38e1f4de73",
      {
        "server": "192.168.92.42:/volume1/docker-restrictive"
      },
      "nfs",
      {}
    ]
  },
  "message": "SR_BACKEND_FAILURE_140(, Incorrect DNS name, unable to resolve., )",
  "name": "XapiError",
  "stack": "XapiError: SR_BACKEND_FAILURE_140(, Incorrect DNS name, unable to resolve., )
    at Function.wrap (/opt/xo/xo-builds/xen-orchestra-202103231039/packages/xen-api/src/_XapiError.js:16:12)
    at /opt/xo/xo-builds/xen-orchestra-202103231039/packages/xen-api/src/transports/json-rpc.js:35:27
    at AsyncResource.runInAsyncScope (node:async_hooks:199:9)
    at cb (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/util.js:355:42)
    at tryCatcher (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/opt/xo/xo-builds/xen-orchestra-202103231039/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:464:21)
    at process.topLevelDomainCallback (node:domain:147:15)
    at process.callbackTrampoline (node:internal/async_hooks:130:14)"
}
olivierlambert commented 3 years ago

Some commands are incorrect here.

First, to see if SR probe works, just enter:

xe sr-probe type=nfs device-config:server=192.168.92.42

Please paste the result.

Then, xe sr-probe type=nfs device-config:server=192.168.92.42:/volume1/docker-restrictive is incorrect. You must split parameters with server and serverpath. In your case:

xe sr-probe type=nfs device-config:server=192.168.92.42 device-config:serverpath=/volume1/docker-restrictive

And because nothing is returned, means that's OK. So now you can create the SR with those parameters with sr-create command:

xe sr-create content-type=user shared=true name-label=NFS host-uuid=<HOST_UUID> type=nfs device-config:server=192.168.92.42 device-config:serverpath=/volume1/docker-restrictive
ArmanJakupovic commented 3 years ago

First, to see if SR probe works, just enter:

xe sr-probe type=nfs device-config:server=192.168.92.42

Please paste the result.

# xe sr-probe type=nfs device-config:server=192.168.92.42
Error code: SR_BACKEND_FAILURE_101
Error parameters: , The request is missing the serverpath parameter,

Then, xe sr-probe type=nfs device-config:server=192.168.92.42:/volume1/docker-restrictive is incorrect. You must split parameters with server and serverpath. In your case:

xe sr-probe type=nfs device-config:server=192.168.92.42 device-config:serverpath=/volume1/docker-restrictive

And because nothing is returned, means that's OK.

I see, I've not tried creating it through the CLI, only through Xen Orchestra from sources. I'll try through CLI and get back to you.

ArmanJakupovic commented 3 years ago

@olivierlambert - I've tried adding through the CLI and it worked like a charm. No issues whatsoever, I can also see the new storage in xen orchestra.