Check mount option in linux

I did not find a clean way to check the mount option in Linux.

For instance wsize=32768

On AIX, I simply type “mount” and see the mount option…

For some reasons, my Linux does not show me the complete mount options !


$ mount
precision:/nfsserver on /nfsclient type nfs (rw,bg,addr=127.0.0.2)
$ grep nfsclient /proc/mounts
precision:/nfsserver /nfsclient nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=precision 0 0

To lookup my NFS mount was using the mount option specified by Oracle for creating a tablespace that uses NFS, I had to grep in /proc… unreal!

6 thoughts on “Check mount option in linux

  1. Laurent Schneider Post author

    Unfortunately no… this is what “mount” is doing

    $ mount | grep nfsclient
    precision:/nfsserver on /nfsclient type nfs (rw,bg,addr=127.0.0.2)
    $ grep nfsclient /etc/mtab
    precision:/nfsserver /nfsclient nfs rw,bg,addr=127.0.0.2 0 0
    $ grep nfsclient /proc/mounts
    precision:/nfsserver /nfsclient nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=precision 0 0

  2. Maxim

    Can’t verify it at the moment, but specifically for nfs mounts the showmount (man SHOWMOUNT(8)) should do it.

    Best regards

    Maxim

  3. Maxim

    please ignore my previous comment (what i meant – the content of /etc/exports – is not what you was talking about)

    Best regards

    Maxim

  4. Laurent Schneider Post author

    Even that does not show all :

    $ /usr/sbin/showmount -e precision
    Export list for precision:
    /nfsserver *
    $ grep nfsserver /etc/exports
    /nfsserver *(rw,sync,no_wdelay,insecure_locks,no_root_squash)

    but indeed it is not related to the mount options

  5. Pingback: OCM 11g upgrade | Laurent Schneider

Comments are closed.