Questo contenuto non è disponibile nella lingua selezionata.
8.10. Enabling pNFS SCSI Layouts in NFS
Prerequisites
- Both the client and the server must be able to send SCSI commands to the same block device. That is, the block device must be on a shared SCSI bus.
- The block device must contain an XFS file system.
- The SCSI device must support SCSI Persistent Reservations as described in the SCSI-3 Primary Commands specification.
8.10.1. pNFS SCSI Layouts Copia collegamentoCollegamento copiato negli appunti!
Operations Between the Client and the Server
LAYOUTGET
operation. The server responds with the location of the file on the SCSI device. The client might need to perform an additional operation of GETDEVICEINFO
to determine which SCSI device to use. If these operations work correctly, the client can issue I/O requests directly to the SCSI device instead of sending READ
and WRITE
operations to the server.
READ
and WRITE
operations to the server instead of sending I/O requests directly to the SCSI device.
Device Reservations
8.10.2. Checking for a SCSI Device Compatible with pNFS Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
- Install the sg3_utils package:
yum install sg3_utils
# yum install sg3_utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.4. Checking for a SCSI Device Compatible with pNFS
- On both the server and client, check for the proper SCSI device support:
sg_persist --in --report-capabilities --verbose path-to-scsi-device
# sg_persist --in --report-capabilities --verbose path-to-scsi-device
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the Persist Through Power Loss Active (PTPL_A
) bit is set.Example 8.8. A SCSI device that supports pNFS SCSI
The following is an example ofsg_persist
output for a SCSI device that supports pNFS SCSI. ThePTPL_A
bit reports1
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
- The sg_persist(8) man page
8.10.3. Setting up pNFS SCSI on the Server Copia collegamentoCollegamento copiato negli appunti!
Procedure 8.5. Setting up pNFS SCSI on the Server
- On the server, mount the XFS file system created on the SCSI device.
- Configure the NFS server to export NFS version 4.1 or higher. Set the following option in the
[nfsd]
section of the/etc/nfs.conf
file:[nfsd] vers4.1=y
[nfsd] vers4.1=y
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the NFS server to export the XFS file system over NFS with the
pnfs
option:Example 8.9. An Entry in /etc/exports to Export pNFS SCSI
The following entry in the/etc/exports
configuration file exports the file system mounted at/exported/directory/
to theallowed.example.com
client as a pNFS SCSI layout:/exported/directory allowed.example.com(pnfs)
/exported/directory allowed.example.com(pnfs)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
- For more information on configuring an NFS server, see Section 8.6, “Configuring the NFS Server”.
8.10.4. Setting up pNFS SCSI on the Client Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
- The NFS server is configured to export an XFS file system over pNFS SCSI. See Section 8.10.3, “Setting up pNFS SCSI on the Server”.
Procedure 8.6. Setting up pNFS SCSI on the Client
- On the client, mount the exported XFS file system using NFS version 4.1 or higher:
mount -t nfs -o nfsvers=4.1 host:/remote/export /local/directory
# mount -t nfs -o nfsvers=4.1 host:/remote/export /local/directory
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Do not mount the XFS file system directly without NFS.
Additional Resources
- For more information on mounting NFS shares, see Section 8.2, “Configuring NFS Client”.
8.10.5. Releasing the pNFS SCSI Reservation on the Server Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
- Install the sg3_utils package:
yum install sg3_utils
# yum install sg3_utils
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.7. Releasing the pNFS SCSI Reservation on the Server
- Query an existing reservation on the server:
sg_persist --read-reservation path-to-scsi-device
# sg_persist --read-reservation path-to-scsi-device
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 8.10. Querying a Reservation on /dev/sda
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the existing registration on the server:
sg_persist --out \ --release \ --param-rk=reservation-key \ --prout-type=6 \ path-to-scsi-device
# sg_persist --out \ --release \ --param-rk=reservation-key \ --prout-type=6 \ path-to-scsi-device
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 8.11. Removing a Reservation on /dev/sda
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
- The sg_persist(8) man page
8.10.6. Monitoring pNFS SCSI Layouts Functionality Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
- A pNFS SCSI client and server are configured.
8.10.6.1. Checking pNFS SCSI Operations from the Server Using nfsstat Copia collegamentoCollegamento copiato negli appunti!
nfsstat
utility to monitor pNFS SCSI operations from the server.
Procedure 8.8. Checking pNFS SCSI Operations from the Server Using nfsstat
- Monitor the operations serviced from the server:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The client and server use pNFS SCSI operations when:
- The
layoutget
,layoutreturn
, andlayoutcommit
counters increment. This means that the server is serving layouts. - The server
read
andwrite
counters do not increment. This means that the clients are performing I/O requests directly to the SCSI devices.
8.10.6.2. Checking pNFS SCSI Operations from the Client Using mountstats Copia collegamentoCollegamento copiato negli appunti!
/proc/self/mountstats
file to monitor pNFS SCSI operations from the client.
Procedure 8.9. Checking pNFS SCSI Operations from the Client Using mountstats
- List the per-mount operation counters:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In the results:
- The
LAYOUT
statistics indicate requests where the client and server use pNFS SCSI operations. - The
READ
andWRITE
statistics indicate requests where the client and server fall back to NFS operations.