1834290 Members
2551 Online
110066 Solutions
New Discussion

Re: nfs mount

 
Jeff Hagstrom
Regular Advisor

nfs mount

Where can I find what gets mounted by NFS when the maching boots up? How do I mount it after I find it?
14 REPLIES 14
Chris Vail
Honored Contributor

Re: nfs mount

I'm unsure what you're really asking here: the "mount" command will tell you all disk mounts, both local and remote via NFS. If its mounted via NFS, you don't have to re-mount it.


Chris
Chris Vail
Honored Contributor

Re: nfs mount

I'm unsure what you're really asking here: the "mount" command will tell you all disk mounts, both local and remote via NFS. If its mounted via NFS, you don't have to re-mount it.


Chris
Patrick Wallek
Honored Contributor

Re: nfs mount

Anything that gets mounted when the machine boots up is configured in the /etc/fstab file.

For NFS stuff look for lines like:

remote_machine:/filesystem/to/mount /mounted/on/local/dir nfs 0 0

The specific to look for is the 'nfs' in the filesystem type column.

If it isn't mounted you can do a:

# mount -a
Which will try to mount everything in /etc/fstab

or

# mount /mounted/on/local/dir
will attempt to mount that specific dir.
James R. Ferguson
Acclaimed Contributor

Re: nfs mount

Hi Jeff:

Have a look at '/etc/exports'. It defines the directories to be exported. '/etc/xtab' will show you the exported directories. Thus, 'exports' is analogous to '/etc/fstab' and 'xtab' is analogous to '/etc/mnttab' insofar as the first file declares the intention; the second file hold what was actually done.

See the man pages for 'exports(4)' for more information.

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: nfs mount

The /etc/fstab file defines all NFS mount points and local filesystem mount points as well (if you are not using automount). After the machine boots up run ..
# bdf
.. to show all currently mounted filesystems. If you find any mount point in /etc/fstab that does not appear in the "bdf" output you can manually try to mount it. The quickest way is to simply run ..
# mount -a
.. which will mount all entries in fstab file (already mounted FS will be be flagged as "already mounted").
Bill Douglass
Esteemed Contributor

Re: nfs mount

NFS-mounted filesystems are specified in /etc/fstab, along with local file systems. Look for entries of type nfs.

You can mount any NFS filesystem listed in /etc/fstab by issuing

mount /mntpath

where /mntpath is the mount-point specified in fstab.

mount -F nfs host:/dirpath /mntpoint

will allow you to mount NFS volumes not listed in fstab.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs mount

There is another aspect of this that you may not be considering - the automounter. If it is running and configured then NFS mounts/umounts occur "on the fly". For example, you might simply do an ls -l /home/cstephen and that could trigger a mount and if no other activity on that directory were done, in a few minutes it would be unmounted.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs mount

There is another aspect of this that you may not be considering - the automounter. If it is running and configured then NFS mounts/umounts occur "on the fly". For example, you might simply do an ls -l /home/cstephen and that could trigger a mount and if no other activity on that directory were done, in a few minutes it would be unmounted.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs mount

There is another aspect of this that you may not be considering - the automounter. If it is running and configured then NFS mounts/umounts occur "on the fly". For example, you might simply do an ls -l /home/cstephen and that could trigger a mount and if no other activity on that directory were done, in a few minutes it would be unmounted.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs mount

There is another aspect of this that you may not be considering - the automounter. If it is running and configured then NFS mounts/umounts occur "on the fly". For example, you might simply do an ls -l /home/cstephen and that could trigger a mount and if no other activity on that directory were done, in a few minutes it would be unmounted.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: nfs mount

There is another aspect of this that you may not be considering - the automounter. If it is running and configured then NFS mounts/umounts occur "on the fly". For example, you might simply do an ls -l /home/cstephen and that could trigger a mount and if no other activity on that directory were done, in a few minutes it would be unmounted.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: nfs mount

If you have NFS mounted file systems immediately after boot-up, either you have a startup script that is specifically mounting them or you have automounter enabled and startup scripts are making reference to them. Check /etc/rc.config.d/nfsconf to see if automount is started and check your startup scripts for references to /net/someotherhost/blah/blah (or /nfs/someotherhost/blah/blah).


Pete

Pete
Jeff Hagstrom
Regular Advisor

Re: nfs mount

The result was a mount command that was put into /sbin/rc at the end of the script. However, there are no nfs described in fstab.
Patrick Wallek
Honored Contributor

Re: nfs mount

If the mount command is explicitly mounting something then it does not necessarily have to be in /etc/fstab.

# mount remote_host:/dir /dir

will mount /dir from remote_host to /dir on the local machine and it does not have to be specified in the fstab file.