126f6225fSDaniel W. S. Almeida=================================== 226f6225fSDaniel W. S. AlmeidapNFS block layout server user guide 326f6225fSDaniel W. S. Almeida=================================== 426f6225fSDaniel W. S. Almeida 526f6225fSDaniel W. S. AlmeidaThe Linux NFS server now supports the pNFS block layout extension. In this 626f6225fSDaniel W. S. Almeidacase the NFS server acts as Metadata Server (MDS) for pNFS, which in addition 726f6225fSDaniel W. S. Almeidato handling all the metadata access to the NFS export also hands out layouts 826f6225fSDaniel W. S. Almeidato the clients to directly access the underlying block devices that are 926f6225fSDaniel W. S. Almeidashared with the client. 1026f6225fSDaniel W. S. Almeida 11*838f9bc0SRandy DunlapTo use pNFS block layouts with the Linux NFS server the exported file 1226f6225fSDaniel W. S. Almeidasystem needs to support the pNFS block layouts (currently just XFS), and the 1326f6225fSDaniel W. S. Almeidafile system must sit on shared storage (typically iSCSI) that is accessible 1426f6225fSDaniel W. S. Almeidato the clients in addition to the MDS. As of now the file system needs to 1526f6225fSDaniel W. S. Almeidasit directly on the exported volume, striping or concatenation of 1626f6225fSDaniel W. S. Almeidavolumes on the MDS and clients is not supported yet. 1726f6225fSDaniel W. S. Almeida 1826f6225fSDaniel W. S. AlmeidaOn the server, pNFS block volume support is automatically if the file system 1926f6225fSDaniel W. S. Almeidasupport it. On the client make sure the kernel has the CONFIG_PNFS_BLOCK 2026f6225fSDaniel W. S. Almeidaoption enabled, the blkmapd daemon from nfs-utils is running, and the 2126f6225fSDaniel W. S. Almeidafile system is mounted using the NFSv4.1 protocol version (mount -o vers=4.1). 2226f6225fSDaniel W. S. Almeida 2326f6225fSDaniel W. S. AlmeidaIf the nfsd server needs to fence a non-responding client it calls 2426f6225fSDaniel W. S. Almeida/sbin/nfsd-recall-failed with the first argument set to the IP address of 2526f6225fSDaniel W. S. Almeidathe client, and the second argument set to the device node without the /dev 2626f6225fSDaniel W. S. Almeidaprefix for the file system to be fenced. Below is an example file that shows 2726f6225fSDaniel W. S. Almeidahow to translate the device into a serial number from SCSI EVPD 0x80:: 2826f6225fSDaniel W. S. Almeida 2926f6225fSDaniel W. S. Almeida cat > /sbin/nfsd-recall-failed << EOF 3026f6225fSDaniel W. S. Almeida 3126f6225fSDaniel W. S. Almeida.. code-block:: sh 3226f6225fSDaniel W. S. Almeida 3326f6225fSDaniel W. S. Almeida #!/bin/sh 3426f6225fSDaniel W. S. Almeida 3526f6225fSDaniel W. S. Almeida CLIENT="$1" 3626f6225fSDaniel W. S. Almeida DEV="/dev/$2" 3726f6225fSDaniel W. S. Almeida EVPD=`sg_inq --page=0x80 ${DEV} | \ 3826f6225fSDaniel W. S. Almeida grep "Unit serial number:" | \ 3926f6225fSDaniel W. S. Almeida awk -F ': ' '{print $2}'` 4026f6225fSDaniel W. S. Almeida 4126f6225fSDaniel W. S. Almeida echo "fencing client ${CLIENT} serial ${EVPD}" >> /var/log/pnfsd-fence.log 4226f6225fSDaniel W. S. Almeida EOF 43