3

I have a netapp server that is configured to share a folder via NFSv4.
My goal is to communicate to that NFSv4 share from Windows, Since windows NFS client does not support NFSv4, I mounted that NFSv4 from CentOS, and i want to share that mounted folder.
This is the diagram i want to accomplish:
"NetApp Server" ---(NFSv4)--> "CentOS7" ---(SMB/NFSv3)--> "Windows"

I have this in df-T (of the CentOS7):

10.10.10.101:/vol/vol0_unix nfs4        828352   362304    466048  44% /mount    

10.10.10.101 is the netapp address

The next thing i want to do is share that /mount via NFS3 or SMB.
So what did i do ? I added the following to /etc/exports:

[root@CentOS7X86-64 ~]# cat /etc/exports
/mount         *(rw,sync)
[root@CentOS7X86-64 ~]#

Now, when i try to restart nfs or exportfs -a i get the following error:

[root@CentOS7X86-64 ~]# exportfs -a
exportfs: /mount does not support NFS export
[root@CentOS7X86-64 ~]#


[root@CentOS7X86-64 ~]# systemctl status nfs-server.service
nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled)
   Active: failed (Result: exit-code) since Wed 2016-11-16 12:32:32 IST; 10min ago
  Process: 3488 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)

Nov 16 12:32:32 CentOS7X86-64 systemd[1]: Starting NFS server and services...
Nov 16 12:32:32 CentOS7X86-64 exportfs[3488]: exportfs: /mount does not support NFS export
Nov 16 12:32:32 CentOS7X86-64 systemd[1]: nfs-server.service: control process exited, code=exited status=1
Nov 16 12:32:32 CentOS7X86-64 systemd[1]: Failed to start NFS server and services.
Nov 16 12:32:32 CentOS7X86-64 systemd[1]: Unit nfs-server.service entered failed state.

Is the scenario im trying to do possible ? Will i be able to share it via SMB ?

Thanks

3
  • netapp is compatible with nfsv3 protocoll, and there is nfsv4 client for windows. Don't reexport network shares! Commented Nov 16, 2016 at 10:50
  • Can you please show me the NFS v4 client for windows - I saw they support V2,V3,V4.1 ? Netapp support v3, but my customer use v4 and he does not want to change it.
    – ilansch
    Commented Nov 16, 2016 at 10:54
  • I am familiar with the Client for NFS feature (Windows 2012, or 2008) and Services for unix, but i didnt see that they are compatible to NFSv4. I failed to mount.
    – ilansch
    Commented Nov 16, 2016 at 10:58

3 Answers 3

1

What I tried to do is called re-export NFS mount point. It is not possible (nfs kernel driver)

1
  • I dont work for superuser:) someone +1 the question, so i answered to my own question saying its not possible. Why? I am not sure. But if kofenman say it cannot be done. I trust his answer, he wrote the open source nfsv4.1 client. ...
    – ilansch
    Commented Sep 5, 2017 at 18:07
0

Experienced system admins would simply fire up Samba. A tutorial or whatever else is WAY beyond appropriate here, but you can easily find it. ...And, since you use Centos on at least ONE box (and we don't know about the one you're running NFS v4 on) that's common (enough) with my own Fedora systems and on my modern Fedora Core (Server, et al), the packages are:

samba-common-4.15.7-0.fc35.noarch
samba-client-libs-4.15.7-0.fc35.x86_64
samba-common-libs-4.15.7-0.fc35.x86_64
samba-libs-4.15.7-0.fc35.x86_64
samba-dc-libs-4.15.7-0.fc35.x86_64
samba-test-libs-4.15.7-0.fc35.x86_64
samba-winbind-modules-4.15.7-0.fc35.x86_64
samba-dc-provision-4.15.7-0.fc35.noarch
samba-client-4.15.7-0.fc35.x86_64
python3-samba-dc-4.15.7-0.fc35.x86_64
python3-samba-4.15.7-0.fc35.x86_64
samba-common-tools-4.15.7-0.fc35.x86_64
samba-4.15.7-0.fc35.x86_64
samba-winbind-4.15.7-0.fc35.x86_64
samba-dc-4.15.7-0.fc35.x86_64
samba-vfs-cephfs-4.15.7-0.fc35.x86_64
samba-vfs-iouring-4.15.7-0.fc35.x86_64
samba-dc-bind-dlz-4.15.7-0.fc35.x86_64
samba-test-4.15.7-0.fc35.x86_64
samba-winbind-clients-4.15.7-0.fc35.x86_64
samba-winbind-krb5-locator-4.15.7-0.fc35.x86_64
samba-vfs-glusterfs-4.15.7-0.fc35.x86_64
samba-pidl-4.15.7-0.fc35.noarch
samba-krb5-printing-4.15.7-0.fc35.x86_64
samba-devel-4.15.7-0.fc35.x86_64
samba-winexe-4.15.7-0.fc35.x86_64

Note that this is from a full-on server environment and you may not need all of that, but I'm not sure how much you do or don't get if you just tell dnf or yum to install samba. ...I've used it for decades; it's reliable and stable.

Finally note that the service you need to enable and start is NOT called samba but rather smb (smb.service) AND the deamon is actually called smbd. (An upgrade at sometime in the past BURNED that one into my head as it wasn't an obvious name change from the past and I lost hours trying to figure it out!)

0

if you try to install nfs server inside LXD container you will get this error. to avoid that you need to launch lxd container with additional options like that:

# lxc launch ubuntu:22.04  nfs-02   -c security.privileged=true -c raw.apparmor="mount fstype=rpc_pipefs, mount fstype=nfsd,"

initially the solution was found here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .