Red Hat Training
A Red Hat training course is available for RHEL 8
Chapter 8. Monitoring pNFS SCSI layouts functionality
You can monitor if the pNFS client and server exchange proper pNFS SCSI operations or if they fall back on regular NFS operations.
Prerequisites
- A pNFS SCSI client and server are configured.
8.1. Checking pNFS SCSI operations from the server using nfsstat
This procedure uses the nfsstat
utility to monitor pNFS SCSI operations from the server.
Procedure
Monitor the operations serviced from the server:
# watch --differences \ "nfsstat --server | egrep --after-context=1 read\|write\|layout" Every 2.0s: nfsstat --server | egrep --after-context=1 read\|write\|layout putrootfh read readdir readlink remove rename 2 0% 0 0% 1 0% 0 0% 0 0% 0 0% -- setcltidconf verify write rellockowner bc_ctl bind_conn 0 0% 0 0% 0 0% 0 0% 0 0% 0 0% -- getdevlist layoutcommit layoutget layoutreturn secinfononam sequence 0 0% 29 1% 49 1% 5 0% 0 0% 2435 86%
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.
-
The
8.2. Checking pNFS SCSI operations from the client using mountstats
This procedure uses the /proc/self/mountstats
file to monitor pNFS SCSI operations from the client.
Procedure
List the per-mount operation counters:
# cat /proc/self/mountstats \ | awk /scsi_lun_0/,/^$/ \ | egrep device\|READ\|WRITE\|LAYOUT device 192.168.122.73:/exports/scsi_lun_0 mounted on /mnt/rhel7/scsi_lun_0 with fstype nfs4 statvers=1.1 nfsv4: bm0=0xfdffbfff,bm1=0x40f9be3e,bm2=0x803,acl=0x3,sessions,pnfs=LAYOUT_SCSI READ: 0 0 0 0 0 0 0 0 WRITE: 0 0 0 0 0 0 0 0 READLINK: 0 0 0 0 0 0 0 0 READDIR: 0 0 0 0 0 0 0 0 LAYOUTGET: 49 49 0 11172 9604 2 19448 19454 LAYOUTCOMMIT: 28 28 0 7776 4808 0 24719 24722 LAYOUTRETURN: 0 0 0 0 0 0 0 0 LAYOUTSTATS: 0 0 0 0 0 0 0 0
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.
-
The