1

Having a Linux (RHEL 6) host with ZFS system, how to make it available to other hosts on local network (over LAN or InfiniBand if possible)?

  • what shall be done to ZFS pool to make it sharable?
  • how to mount a remote ZFS drive on client?

3 Answers 3

3
  • what shall be done to ZFS pool to make it shareable?

You need to install the NFS server packages for your distribution and share the pool with the already mentioned command:

sudo zfs set sharenfs=on tank/home

See http://zfsonlinux.org/faq.html#HowDoISetupShares

Note that you might alternatively use the OS native method to share a file system, i.e. editing /etc/exports here.

One ZFS way advantage is that the sharing configuration is part of the file system properties, not an OS property. That means when you import a pool, its shared file systems are automatically made available. This is also true when you transfer a pool from one host to a different one.

  • how to mount a remote ZFS drive on client?

That eventually depends on what OS is your client running. On Solaris and other OSes that use a automounter, that would be done automatically when accessing the share, e.g.:

cd /network/server/share/directory

Alternatively, you can mount manually the share with the mount command and persistently by editing the /etc/(v)fstab file.

3

NFS can export whatever filesystems you like, including ZFS. The clients don't need to know or care that the server is using ZFS internally. OTOH, ZFS-specific operations, like making copy-on-write snapshots, won't be possible over NFS.

NFS is the standard file-sharing protocol for Unix. There are alternatives for special use-cases. A guide on setting up NFS is beyond the scope of this answer.

Googling on zfs infiniband has some interesting hits, which I didn't really take the time to read since I don't use ZFS myself anyway. Hopefully they'll be useful. The first hit does mention running NFS over infiniband eventually, after wasting a crapload of words on telling you how this solution will reduce your costs and blah blah, without saying what the solution actually is.

So the important conclusion is that you can and should run NFS over infiniband. Oracle is using it in high-performance environments with storage servers loaded up with DRAM and SSD caches for the data they're serving up.

2

If you have a complete ZFS implementation, NFS export is controlled via the zfs(1) command. Check the man page and use zfs set sharenfs=<options> filesystem. sharenfs=on exports the filesystem for everyone.

3
  • 1
    What advantage is there to use zfs set sharenfs… rather than rely on NFS exports that are agnostic wrt the underlying filesystem? Commented Aug 31, 2015 at 22:16
  • In general, zfs(1)/zpool(1) exists because zfs (really "zpool" below zfs) include features like RAID that can only give advantage to zfs if there is an intrinsic configuration. The advantage to use zfs sharenfs may be that the related meta data will be stored inside the meta data part of the related filesystem.
    – schily
    Commented Sep 1, 2015 at 9:06
  • Sharing-related metadata (including ACLs) inside the filesystems also survives send/recv operations to different remote systems and backup media. It also helps when moving a (degraded) pool to a new system for fast recovery - just boot a base system with your network settings, import the pool from the disks and restart nfs to have the same working configuration as before.
    – user121391
    Commented Apr 4, 2016 at 14:45

You must log in to answer this question.

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