Skip to Content

How to check NFS compatibility

This articles describes how to check NFS compatibility.

Scope

FortiSIEM.

Solution

Before adding an NFS server as Online or Archive storage in the FortiSIEM or after some NFS server configuration change, it can be useful to check if it is compliant by running basic commands that FortiSIEM will perform. Follow these steps:

Step 1: Copy the attached script (with winscp) in the FortiSIEM node to check in the /tmp/ folder.

Step 2: From the super or the worker CLI as root, run:
cd /tmp
chmod +x nfs_checker.sh
nfs_checker.sh <nfs_server_ip> <nfs_shared_folder>

Step 3: This script will execute basic commands and create an error if one test cannot be performed successfully.

Example:

nfs_checker.sh 10.5.8.5 /Share/archive
Creating local mount point...
Done
=======================================================
Checking NFS server shares...
/Share/archive 10.5.8.0/24
=======================================================
Mounting in NFS V3...
Filesystem Size Used Avail Use% Mounted on
10.5.8.5:/Share/archive 47T 7.5T 37T 18% /tmp/nfs_test
Done
=======================================================
Testing file creation, owner and permissions changes...
628720002 4 drwx------ 2 admin admin 4096 May 24 17:59 /tmp/nfs_test/testDir
628720055 4 -rw-r--r-- 1 admin admin 6 May 24 17:59 /tmp/nfs_test/testDir/test1.txt
628720107 4 -rw-r--r-- 1 admin admin 6 May 24 17:59 /tmp/nfs_test/testDir/test2.txt
removed '/tmp/nfs_test/testDir/test1.txt'
removed '/tmp/nfs_test/testDir/test2.txt'
removed directory '/tmp/nfs_test/testDir'
Done
=======================================================
Testing hard link creation...
removed '/tmp/nfs_test/test1.txt'
removed '/tmp/nfs_test/test2.txt'
Done
=======================================================
Testing writing rates...
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 4.41826 s, 475 MB/s
Testing reading rates...
4096000+0 records in
4096000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 11.2536 s, 186 MB/s
removed '/tmp/nfs_test/test_file.bin'
Done
=======================================================
Mounting in NFS V4...
Filesystem Size Used Avail Use% Mounted on
10.5.8.5:/Share/archive 47T 7.5T 37T 18% /tmp/nfs_test
Done
=======================================================
Testing file creation, owner and permissions changes...
628720002 4 drwx------ 2 admin admin 4096 May 24 17:59 /tmp/nfs_test/testDir
628720055 4 -rw-r--r-- 1 admin admin 6 May 24 17:59 /tmp/nfs_test/testDir/test1.txt
628720107 4 -rw-r--r-- 1 admin admin 6 May 24 17:59 /tmp/nfs_test/testDir/test2.txt
removed '/tmp/nfs_test/testDir/test1.txt'
removed '/tmp/nfs_test/testDir/test2.txt'
removed directory '/tmp/nfs_test/testDir'
Done
=======================================================
Testing hard link creation...
removed '/tmp/nfs_test/test1.txt'
removed '/tmp/nfs_test/test2.txt'
Done
=======================================================
Testing writing rates...
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 4.41049 s, 475 MB/s
Testing reading rates...
4096000+0 records in
4096000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 11.8844 s, 176 MB/s
removed '/tmp/nfs_test/test_file.bin'
Done
=======================================================