Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux: how to check if a drive is mount to nfs [closed]

Tags:

linux

nfs

Is there a way to find out if a mount drive, for ex: /var, is mount to an NFS?

like image 543
PLAND Avatar asked Jul 18 '13 02:07

PLAND


People also ask

How do you check NFS mount status in Linux?

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.

How do I check my NFS mount?

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 !

How do you check if a path is mounted or not?

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).


1 Answers

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
like image 53
number5 Avatar answered Oct 31 '22 14:10

number5