PNFS block server setup

From Linux NFS

(Difference between revisions)
Jump to: navigation, search
(Created page with "To use the linux block-based pNFS server, you need: - a kernel version at least 4.0 built with CONFIG_NFSD_PNFS, - similarly recent nfs-utils (exact version?) on the server, - a...")
Line 1: Line 1:
To use the linux block-based pNFS server, you need:
To use the linux block-based pNFS server, you need:
-
- a kernel version at least 4.0 built with CONFIG_NFSD_PNFS,
+
* a kernel version at least 4.0 built with CONFIG_NFSD_PNFS,
-
- similarly recent nfs-utils (exact version?) on the server,
+
* similarly recent nfs-utils (exact version?) on the server,
-
- a shared block devices that the server and clients can all access.
+
* a shared block devices that the server and clients can all access.
Format the block device with an xfs filesystem, export it with the "pnfs" export option, and start the nfs server.
Format the block device with an xfs filesystem, export it with the "pnfs" export option, and start the nfs server.
Line 13: Line 13:
WARNINGS:
WARNINGS:
-
- The client figures out which block device to write to by looking at the content of the block device.  It may choose incorrectly, for example, if the client also has access to snapshots of the same filesystem.  THIS MAY CORRUPT YOUR DATA.
+
* The client figures out which block device to write to by looking at the content of the block device.  It may choose incorrectly, for example, if the client also has access to snapshots of the same filesystem.  THIS MAY CORRUPT YOUR DATA.
-
- The server needs to be able to revoke client's direct access to data in cases where, for example, multiple clients need simultaneous access.  If the client is unresponsive to requests to do this by normal NFS callbacks, the server must be able to forcibly fence the client's access.  To make this work you must provide a /sbin/nfsd-recall-failed script which knows how to fence clients.  See [http://git.linux-nfs.org/?p=bfields/linux.git;a=blob;f=Documentation/filesystems/nfs/pnfs-block-server.txt;h=2143673cf1544bfc18502b8e0e4ee469234e7aae;hb=c517d838eb7d07bbe9507871fab3931deccff539 Documentation/filesystems/nfs/pnfs-block-server.txt] for details.  Failure to do this may corrupt your data.
+
* The server needs to be able to revoke client's direct access to data in cases where, for example, multiple clients need simultaneous access.  If the client is unresponsive to requests to do this by normal NFS callbacks, the server must be able to forcibly fence the client's access.  To make this work you must provide a /sbin/nfsd-recall-failed script which knows how to fence clients.  See [http://git.linux-nfs.org/?p=bfields/linux.git;a=blob;f=Documentation/filesystems/nfs/pnfs-block-server.txt;h=2143673cf1544bfc18502b8e0e4ee469234e7aae;hb=c517d838eb7d07bbe9507871fab3931deccff539 Documentation/filesystems/nfs/pnfs-block-server.txt] for details.  Failure to do this may corrupt your data.

Revision as of 21:39, 7 April 2015

To use the linux block-based pNFS server, you need:

  • a kernel version at least 4.0 built with CONFIG_NFSD_PNFS,
  • similarly recent nfs-utils (exact version?) on the server,
  • a shared block devices that the server and clients can all access.

Format the block device with an xfs filesystem, export it with the "pnfs" export option, and start the nfs server.

On the client: start the blkidmap daemon. (On fedora: systemctl enable nfs-blkmap and systemctl start nfs-blkmap). Then mount with nfs-version at least 4.1.

The client will then perform reads and writes to regular files by reading or writing directly to the block device rather than by sending NFS reads and writes to the server. Things are probably working if you can see LAYOUTGET calls in /proc/self/mountstats.

WARNINGS:

  • The client figures out which block device to write to by looking at the content of the block device. It may choose incorrectly, for example, if the client also has access to snapshots of the same filesystem. THIS MAY CORRUPT YOUR DATA.
  • The server needs to be able to revoke client's direct access to data in cases where, for example, multiple clients need simultaneous access. If the client is unresponsive to requests to do this by normal NFS callbacks, the server must be able to forcibly fence the client's access. To make this work you must provide a /sbin/nfsd-recall-failed script which knows how to fence clients. See Documentation/filesystems/nfs/pnfs-block-server.txt for details. Failure to do this may corrupt your data.
Personal tools