Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NFS mounts

Status
Not open for further replies.

icu812

MIS
Sep 10, 2001
52
US
I need to write a script that will NFS mount 5 filesystems onto a host machine(AIX4.3.3). Before it mounts them I need the script to check to see whether or not they are already mounted, if they are not then I need the script to go ahead and mount them. Does someone already have a script that does this that they are willing to share? Can someone offer some advice???? Thank You very much
 
I haven't spent a lot of time on this but.

if [ -d dirtoryname ];then
echo "directory already mounted
else
mknfsmnt -f /localdirname -d /remotedirname -h hostname
fi

To review more complex mounts, set them up with smit nfs, when you've filled in all the details press f6 or esc 6 to see the command.

regards mike

see man nfs , man test

Regards Mike --
| Mike Nixon
| Unix Admin
| ----------------------------
 
Mike,

The directory, the mount point, will already be there. I think you need to grep the output of 'mount' to see if a filesystem is mounted -- not that I know the first thing about NFS you understand. Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top