I was also asked what the client side of the nfs looks like.
Make some directories: # mkdir /dir /auto
Create the automount master: # echo "/auto /etc/auto.auto" > /etc/auto.master
Create the automount map: # echo "foo -tcp server-2:/foo" > /etc/auto.auto
Start the automounter in the foreground so you can watch it # /etc/init.d/autofs stop # automount -d -f
Have a server server-1 exporting dir. Then mount it: # mount server-1:/dir /test
Create a symlink to the automount filesystem # ln -s /auto/foo /test/foo
Make sure that server-1 exports the filesystem fine. Make sure that server-2 bounces the mount attempt with a permission denied error.
Then # ls /test/foo/ # cd /test/foo # echo /test/foo/*
and other such things. wait a bit.
I was also asked what the client side of the nfs looks like.
Make some directories:
# mkdir /dir /auto
Create the automount master:
# echo "/auto /etc/auto.auto" > /etc/auto.master
Create the automount map:
# echo "foo -tcp server-2:/foo" > /etc/auto.auto
Start the automounter in the foreground so you can watch it
# /etc/init.d/autofs stop
# automount -d -f
Have a server server-1 exporting dir. Then mount it:
# mount server-1:/dir /test
Create a symlink to the automount filesystem
# ln -s /auto/foo /test/foo
Make sure that server-1 exports the filesystem fine. Make sure that server-2 bounces the mount attempt with a permission denied error.
Then
# ls /test/foo/
# cd /test/foo
# echo /test/foo/*
and other such things. wait a bit.