Bug 153670
Summary: | autofs does not do bind mounts with nfsv4 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Orion Poplawski <orion> | ||||
Component: | autofs | Assignee: | Ian Kent <ikent> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Brock Organ <borgan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3 | CC: | ceesb, jmoyer | ||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Enhancement | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-04-17 22:24:48 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Orion Poplawski
2005-04-04 20:53:32 UTC
I'm guessing this configuration triggers the generic mount routine, instead of the nfs mount routine: if (!strcmp(fstype, "nfs")) { rv = mount_nfs->mount_mount(root, mountpoint, strlen(mountpoint), what, fstype, options, mount_nfs->context); } else { /* Generic mount routine */ rv = do_mount(root, mountpoint, strlen(mountpoint), what, fstype, options); } This should be fairly simple to fix, if my guess is right. I'll attach a patch. Created attachment 112719 [details]
Have sun_mount call mount_nfs for fstype=nfs4 and variants thereof.
This should address your problem. The patch was made against the latest CVS,
so it may or may not apply to 4.1.3-28. Let me know if you need help with
getting this applied/built.
Thanks!
This doesn't work. First of all, it appears to be trying to mount via nfs3 now rather than nfs4. Not seeing any errors from an attempt to --bind mount, but I imagine that would fail too because it would be trying to mount from /data1 rather than /export/data1 Apr 5 10:55:15 alexandria rpc.mountd: refused mount request from alexandria.cora.nwra.com for /data1 (/): not exported Apr 5 10:55:15 alexandria automount[6123]: >> mount: alexandria:/data1 failed, reason given by server: Permission denied Apr 5 10:55:15 alexandria automount[6123]: mount(nfs): nfs: mount failure alexandria:/data1 on /data/sw1 Apr 5 10:55:15 alexandria automount[6123]: failed to mount /data/sw1 Okay, thanks for the info. I'll look into this further. One thing we could do is to make mount_generic do bind mounts. I want to investigate a bit more to make sure this is the best way to do this, though. Thanks. I installed the rawhide version of autofs and it looks like it just no longer does bind mounts at all for local nfs filesystems: alexandria:/export/waves2 on /data/waves2 type nfs (rw,intr,rsize=8192,wsize=8192,addr=192.168.0.13) Something appears to have changed between the FC3 version and autofs-4.1.3-107 Please include the full contents of all maps involved and I'll take a closer look. I cannot reproduce the problem you have with 4.1.3-107. Thanks. I think 4.1.3-107 had a problem with local mounts not using --bind. It should be fixed in 4.1.3-114. http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/3/i386/autofs-4.1.3-114.i386.rpm Okay, rebuilt with devel version from CVS (123) plus the above patch. Now I think we are just missing the /export path: Apr 5 14:11:10 alexandria automount[6013]: >> mount: special device /data1 does not exist Apr 5 14:11:10 alexandria automount[6013]: failed to mount /data4/sw1 Apr 5 14:11:10 alexandria automount[6015]: >> mount: special device /data1 does not exist Apr 5 14:11:10 alexandria automount[6015]: failed to mount /data4/sw1 Not sure how autofs would be able to determine that the nfsv4 paths are relative to export without parsing /etc/exports: /export *.cora.nwra.com(rw,sync,fsid=0) /export/amanda *.cora.nwra.com(rw,sync,nohide,no_root_squash) /export/data1 *.cora.nwra.com(rw,sync,nohide,no_root_squash) /export/clouds2 *.cora.nwra.com(rw,sync,nohide) /export/radar3 *.cora.nwra.com(rw,sync,nohide) /export/soldyn2 *.cora.nwra.com(rw,sync,nohide) /export/bigmeadow *.cora.nwra.com(rw,sync,nohide) /export/waves2 *.cora.nwra.com(rw,sync,nohide) I'm seeing local NFSv3 mounts not using --bind again with 4.1.4-8: hawk:/export/web on /data/web type nfs (rw,intr,addr=65.125.157.182) [root@hawk ftp]# I think this should (again) be resolved in rawhide/fc5. The issue with NFSv4 mounts stands. I think that we *should* use the nfs4 protocol to mount those local directories. The automounter really shouldn't know about nfs4 internals just so that it can do a bind mount. So, we still need to fix this. Thanks for your continued analysis. I'm sorry, I didn't follow that. I'm running FC4 and FC5 here now. I get local bind mounts for NFSv3. If you think the local directories *should* be mounted via nfs4 rather than bind, than this bug is resolved, NOTABUG. I'm fine with that, assuming a minimal performance hit. In the event that you have "fstype=nfs4" in your options, the automounter should not attempt a bind mount when the server is localhost. The reason for this is that the automounter would need nfsv4 specific information to determine where the mount actually comes from. As you noted, it's not straight-forward as it is in v2 and v3. So, for your nfsv2 and nfsv3 mounts, the automounter should continue to use bind mounts. If you specify -fstype=nfs4, then you should get a mount via nfs4. Clear as mud? Yes, and that's what I'm seeing right now on FC4 and FC5. So I don't understand the "So, we still need to fix this." in comment #10. OK, that's a misunderstanding on my part, then. I'll close this. Thanks! |