-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xe sr-probe does not find NFSv4/NFSv4.1 #135
Comments
Hm getting : This current setup works for v3/v4/v4.1 with and without kerberos mounts. xe sr-probe type=nfs device-config:server=IP_HERE device-config:serverpath=/xen/nfs-stor device-config:probeversion |
running : xe sr-probe type=nfs device-config:server=IP_HERE device-config:probeversion
|
@borzel Is that a problem that occurs for any NFS share that supports NFS 4 or above, or only with specific servers? |
Not sure if it is related to the same root cause however: when xe sr-create specifies only type=nfs, it defaults to NFSv3 and will not negotiate NFSv4/NFSv4.1 share without adding device-config:nfsversion=4.1 (which isn't documented as far as I can tell). IMHO it should be starting with NFSv4.1 and negotiating downwards. (XCP-ng 8.1 connecting to nfs-kernel-server on Ubuntu 20.04) |
I had similar problem with FreeBSD NFS server set up with minimal NFS version 4 (vfs.nfsd.server_min_nfsvers=4 in the /etc/sysctl.conf file) [1]. I was told [2], that NFS v4 doesn't use RPC, so if support for older protocol version isn't needed, nfsd would not register with rcpbind, making function check_server_service in /opt/xensource/sm/nfs.py unreliable and invalid, because it checks for condition (nfs service in rpcinfo -s output) which is not always present. [1] https://lists.freebsd.org/pipermail/freebsd-net/2021-January/057371.html |
I've hit this bug with an NFSv4+ only server (eg. NFSv3 is disabled). XCP-ng is unable to add the SR because it depends on the presence of NFSv3 services. |
Then I think it should be reported upstream ASAP :) |
still actual for Huawei storage. |
IIRC, this was fixed in a recent upstream SMAPI patch (but likely not yet available in XCP-ng. @stormi can you take a look where you are around? Thanks! |
I don't remember commits that would address this, and the issue on the upstream repository got no answers from the devs. Recent commits that are about NFS in |
Do not call `rpcinfo` nor `showmount` when `device-config:nfsversion` is a NFSv4 version. This modification requires the user to already know `nfsversion>=4` and the `serverpath`. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. Do not call `rpcinfo` nor `showmount` when `device-config:nfsversion` is a NFSv4 version. This modification requires the user to already know `nfsversion>=4` and the `serverpath`. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. Do not call `rpcinfo` nor `showmount` when `device-config:nfsversion` is a NFSv4 version. This modification requires the user to already know `nfsversion>=4` and the `serverpath`. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. Do not call `rpcinfo` nor `showmount` when `device-config:nfsversion` is a NFSv4 version. This modification requires the user to already know `nfsversion>=4` and the `serverpath`. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. When `rpcinfo` or `showmount` fails, try to mount NFSv4 pseudo FS '/' to add '4' to supported NFS versions and run `ls` on the mounted pseudo FS to offer the first folder level of exports. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. When `rpcinfo` or `showmount` fails, try to mount NFSv4 pseudo FS '/' to add '4' to supported NFS versions and run `ls` on the mounted pseudo FS to offer the first folder level of exports. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. When `rpcinfo` or `showmount` fails, try to mount NFSv4 pseudo FS '/' to add '4' to supported NFS versions and run `ls` on the mounted pseudo FS to offer the first folder level of exports. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. When `rpcinfo` or `showmount` fails, try to mount NFSv4 pseudo FS '/' to add '4' to supported NFS versions and run `ls` on the mounted pseudo FS to offer the first folder level of exports. See: xapi-project#551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
NFSv4 only environments don't support `rpcinfo` and `showmount` calls as they're missing NFSv3 services. When `rpcinfo` or `showmount` fails, try to mount NFSv4 pseudo FS '/' to add '4' to supported NFS versions and run `ls` on the mounted pseudo FS to offer the first folder level of exports. See: #551 And: xcp-ng/xcp#135 Signed-off-by: BenjiReis <benjamin.reis@vates.fr>
Hi! The fix wasn't available in XCP-ng 8.2.1, it'll be released soon but if you want to test it in advance: Bear in mind it is a test build so not safe to run in production. |
Thanks for the update. I will try it with my test server. may I know when the next update that the fix will be commited? |
It's currently in the CI phase of our pipeline, so if everything goes smoothly I'd say a couple weeks. |
Any news on this one? I was actually surprised to see that NFSv4 only servers are an issue because XCP-ng manual states that NFS is preferred instead of iSCSI. So I started the planning to move away from iSCSI and stumbled upon this issue. |
@viniciusferrao I had a very bad experience with XCP-ng storage on iSCSI. For the last 3 years I have been using nfs 4.1 without any real difficulties (some performance concerns when VMs boot and until they stabilize, but I was never able to narrow down the cause). I am on XCP-ng v.8.2 which has the option to select nfs v3 v4 or v4.1 when creating a new nfs SR. I also use option "hard" which has pros and cons, there are other threads here on that subject. |
But is there any workaround today? Because I tried to mount the volume and was affected by the issue on this ticket. My XCP-ng dates back to 2013 when I originally installed XenServer 6.2. I've been updating it since then. The same for the storage system that's FreeNAS (at the time) and now TrueNAS. The disk pool was created in early 2014. Since the beginning, this pool is iSCSI and I had very expensive workloads on it, like Exchange 2010 and later 2013 with 700 user accounts, more than a TB of iSCSI mailboxes on top of XenServer virtual disks. And now I was moving to NFS, due to the cited recommendation and I'm unable to. How to mount the NFS share? What's the workaround? TrueNAS does not enables NFSv3 and v4 at the same time. Thanks. |
For me, it was just in Xen Orchestra: However your question makes me wonder if you are even talking about an XCP-ng storage repositiory - possibly connecting to an NFS server from a VM? I do that too, from Linux at least it's standard mount -t nfs4, no magic. |
Yeah, this does not work. I'm affected by the bug on this thread. I thought you had a workaround for it. Your NFS server probably supports NFSv3 and v4 at the same time, which isn't my case. |
Yes, the issue is when the NFS server doesn't advertise what it supports through rpcbind, which is a v3-only thing (rpcbing can report, although is not obligated to do so, also v4.x protocol versions, which explains why some users can select v4.x protocols when their server also supports v3). We do have a fix for this, it is build, and is currently on a pre-release repository before it can be released to all users. On XCP-ng 8.2, you can try it with:
Internal CI tests already ran successfully. On XCP-ng 8.3, it should be already supported. |
Thank you @stormi. But may I ask if there's any timeline to it lands on stable channels? On 8.2.1 or 8.3? |
On 8.2, it will go with the next train of updates, which is not scheduled yet. A few weeks maybe. It's already in XCP-ng 8.3, but 8.3 itself is still a (rather stable) beta. |
This bug still exists in xcp-ng 8.3 |
Please elaborate, as it's actually fixed from our point of view. It's likely you have a different albeit similar issue. |
What to say, attaching nfs share with v4 or v4.1 only works when the nfs share has v3 enabled, what you write earlier perfectly sums this issu up: Yes, the issue is when the NFS server doesn't advertise what it supports through rpcbind, which is a v3-only thing (rpcbing can report, although is not obligated to do so, also v4.x protocol versions, which explains why some users can select v4.x protocols when their server also supports v3 Also worth noting this issue is occuring when attaching storage in xo also, with or without kerberose. |
We have automated tests which precisely test a server which only has v4+ and no v3, so it's likely there's something else in the picture. @benjamreis how to debug this? |
Probably sharing the error gotten while trying to probe or create the SR would be a good start -- even better the corresponding logs in |
Give me some time, i will post the logs latertoday |
This is log from XO storage when V4 and v4.1 only share in works: remote.test " ", ", "", mount.nfs: Protocol not supported", mount.nfs: Protocol not supported This is log from a NFS SR attached with V3 V4 and V4.1 enabled, then disabled V3 and did a rescan of the SR sr.scan ", There might be a possibility that this error is caused by a issue in QNAP QTS version 5.2.1, this is unconfirmed but some googling indicates QNAP is crap as usual, i will test this with a dell powerstore and see if this is storage related, as i realy suspect now after testing |
Hi, Thx for the logs - unfortunantely XO doesn't provide all the necessay info of the error as its only a client of th XAPI. The error does sm to indicate the mount is attempted on NFS3 for som reason... While you gather the logs i askd i'll take a look at the code again but as mentioned by @stormi - our CI does have a NFS4+ only tests that run successfully. |
Background:
Steps:
xe sr-probe type=nfs device-config:server=<some-ip> device-config:serverpath=/mnt/testpool/nfsv41test device-config:probeversion
Output of sr-probe
Expected result
Shows
SupportedVersions
3, 4 and 4.1The text was updated successfully, but these errors were encountered: