I'm trying ZFS on Linux for Oracle Linux (OLE) 6.1 (Red Hat RHEL 6.1 compatible clone). I successfully compiled and installed spl and zfs on it for Oracle Unbreakable Kernel. Zfs is working and I created mirror by

zpool create -f -o ashift=12 tank mirror sdb sdc

Now I'm trying to share my zfs pool caled "tank/nfs" as mentioned at zfsonlinux site.

zfs set sharenfs=on tank/nfs

So I created tank/nfs and set nfs to on.

Now I'm trying to mount nfs share at local host to test it by

mount -t nfs4 /mnt

But I get mount.nfs4: mount system call failed

So question is:

How to share NFS Folder or iSCSI Volumes at OLE rightly and mount it with Linux Client via ZFS on Linux.

the answer is mount /mnt

  • Can you try this from a different client that the server? – Jeff Strunk Nov 29 '11 at 17:31

There must be something wrong with your nfs server configuration.

Please try following this howto for setting up RHEL 6 as an nfs server.

| improve this answer | |
  • Thanks for the HOWTO. The right answer is: mount /mnt – BBK Dec 13 '11 at 17:50
  • @BBK If you have solved your problem please either accept an answer or add your own and accept it. – Zoredache Dec 24 '11 at 22:07
  • 1
    zfs set sharenfs="rw=@10.x.x.x/24,no_root_squash,no_all_squash" tank/share Is an example also make sure to punch holes in the firewall as it will block traffic firewall-cmd --permanent --add-port=111/tcp is an example – Kendrick Oct 18 '14 at 15:13

In order to establish an NFS mount, you need to have the portmap service running before attempting the mount.

Run /sbin/service portmap start and retry your NFS mount.

For RHEL6 and newer, this is in rpcbind - /sbin/service rpcbind start

| improve this answer | |
  • portmap: unrecognized service. yum install portmap. Package rpcbind-0.2.0-8.el6.x86_64 already installed and latest version Nothing to do – BBK Nov 24 '11 at 20:25
  • Oh, for RHEL6, try /sbin/service rpcbind start instead. – ewwhite Nov 24 '11 at 20:28
  • rpcbind (pid 1692) is running... mount -t nfs4 /mnt mount.nfs4: mount system call failed – BBK Nov 24 '11 at 20:46
  • This is getting too chatty. Try an nfs mount instead of nfs4. Also check that you don't have anything blocking the nfs ports (see rpcinfo -p). Since you're using the ZFS on Linux add-on, I don't know if you need to exportfs -a or not. Either way, this is probably not the best idea if you plan to use for production, given the state of the project. – ewwhite Nov 24 '11 at 21:03
  • 1
    check, too, your hosts.allow and hosts.deny configurations – warren Nov 29 '11 at 18:04

In my experience with ZFS on FreeBSD and Debian GNU/kFreeBSD, I found that the sharenfs feature was not implemented well. You may set up your NFS exports in /etc/exports.

Each ZFS filesystem that you want to export needs its own export line. We found this to be too slow with hundreds of filesystems. You should also try using a single filesystem as though you were using a traditional filesystem.

NFS exports in Linux

You will have to edit the /etc/exports file to enable NFS in Linux. With NFSv4 in Linux, every exported filesystem must be mounted under a single directory called the NFSv4 pseudofilesystem. In this case, that would be /tank. Mountpoints under the pseudofilesystem can be exported with different access control methods and export options. Any filesystems mounted under the psuedofilesystem must get its own export line in /etc/exports.


/tank *(fsid=0)
/tank/nfs *(rw,sync)

To make changes to /etc/exports take effect, you should run exportfs -r.

For NFSv4 you will need to run idmapd on both the client and the server to facilitate mapping from username to user id number.

In Linux NFSv4, the export is different than with NFSv3 and lower. Given that the pseudofilesystem is /tank, your mount command would be:

mount -t nfs -o vers=4 server:/nfs /mnt

For NFSv3, it would be:

mount -t nfs -o vers=3 server:/tank/nfs /mnt
| improve this answer | |
  • I need hostname in /etc/exports: /tank /tank/nfs,sync). But mount -t nfs -o vers=4 server:/nfs /mnt saying mount.nfs: mount system call failed. And mount -t nfs -o vers=3 /mnt saying mount.nfs: requested NFS version or transport protocol is not supported – BBK Dec 1 '11 at 17:53
  • Have you tried turning off iptables or explicitly allowing tcp port 2049 on localhost? I'm surprised that the default rules would block anything on localhost, but it is what Googling that error message suggests. – Jeff Strunk Dec 1 '11 at 21:19
  • iptables turned off. – BBK Dec 6 '11 at 16:47
  • mount -t nfs -o vers=3 /mnt mount.nfs: requested NFS version or transport protocol is not supported. mount -t nfs -o vers=4 /mnt mount.nfs: mount system call failed – BBK Dec 6 '11 at 16:52
  • /etc/exports: /tank /tank/nfs,sync) – BBK Dec 6 '11 at 17:09

Consider doing ZFS natively on Solaris or SolE 11 or OpenIndiana. In my opinion ZFS on Linux is nowhere close to being in any shape, ready for production. ZFS with NFS have native integration on Solaris-based OS's, but not so on Linux.

| improve this answer | |
  • OP wants to know how to do something with ZFS+NFS under Linux. Advising him to use Solaris & Co. is not an useful answer. Besides the ZFS support is nowadays dimensions better than it was back then. – Christian Ulbrich May 3 '17 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.