Utils and helpers for nfs testing
create_export();
Create an NFS share and export it with specified settings: - path: Filesystem path to export - cl: client IP/hostname to create the share for - options: options to record in /etc/exports
setup_pnfs_client();
Prepare a client for a pNFS block layout. Enable nfs-blkmap.service, blkmapd is required to resolve the block devices of a layout, and blacklist the flexfiles layout driver so it never silently replaces the block layout.
verify_pnfs_block_layout($server, $export, $mountpoint, $dev);
Verify that a pNFS block layout carries the data. Write a 4K probe file over NFS while capturing both the NFS traffic and the requests of the block device backing the export, then record the counters: - server: NFS server to mount from - export: exported path to mount - mountpoint: where to mount it, has to be free again afterwards - dev: block device backing the export
With a working block layout the client writes to the block device on its own and only the layout operations reach the server, so no NFS WRITE operation must show up while the block device must see the write. The check has to run after the NFS grace period, during the grace LAYOUTGET is answered with NFS4ERR_GRACE and the client falls back to regular NFS writes.
Products without the capture tools are reported and skipped.