Is there a way to find out if a mount drive, for ex: /var, is mount to an NFS?
Use the showmount command to display the remote NFS server mount information. If you omit the options, the default option displays hostnames of all remote mounts from the hostname NFS server. If you omit the hostname parameter, then the local hostname is used.
Login to the host that is mounting the exported file system. For the NFS Client, the "mount" command can be used to find out how the root userid has mounted the file system. If you see just "type nfs" then it is NOT version 4 !
Using the mount Command One way we can determine if a directory is mounted is by running the mount command and filtering the output. The above line will exit with 0 (success) if /mnt/backup is a mount point. Otherwise, it'll return -1 (error).
You can just use mount
command to check, e.g
mount |grep nfs
Or if you want to list all nfs you've mounted:
mount -l -t nfs4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With