NFSREF(8) | System Manager's Manual | NFSREF(8) |
nfsref - manage NFS referrals
nfsref [-?d] [-t type] add pathname server export [ server export ... ]
nfsref [-?d] [-t type] remove pathname
nfsref [-?d] [-t type] lookup pathname
NFS version 4 introduces the concept of file system referrals to NFS.
A file system referral is like a symbolic link (or, symlink) to another file system share, typically on another file server. An NFS client, under the server's direction, mounts the referred-to NFS export automatically when an application first accesses it.
NFSv4 referrals can be used to transparently redirect clients to file systems that have been moved elsewhere, or to construct a single file name space across multiple file servers. Because file servers control the shape of the whole file name space, no client configuration is required.
A junction is a file system object on an NFS server that, when an NFS client encounters it, triggers a referral. Similar to a symlink, a junction contains one or more target locations that the server sends to clients in the form of an NFSv4 referral.
On Linux, an existing directory can be converted to a junction and back atomically and without the loss of the directory contents. When a directory acts as a junction, it's local content is hidden from NFSv4 clients.
The nfsref(8) command is a simple way to get started managing junctions and their content.
Valid nfsref(8) subcommands are:
Suppose you have two file servers, top.example.net and home.example.net. You want all your clients to mount top.example.net:/ and then see the files under home.example.net:/ automatically in top:/home.
On top.example.net, you might issue this command as root:
# mkdir /home
# nfsref add /home home.example.net /
Created junction /home.
RFC 8881 for a description of the NFS version 4 referral mechanism
Chuck Lever <chuck.lever@oracle.com>
9 Jan 2018 |