Using Automount services(Autofs)
# vim auto.master
/home /etc/auto.home
# vim auto.home
nfs -rw 192.168.0.130:/home/nfs
Started autofs. Logged in as an NFS user and the exported home directory get automatically mounted.
# vim /etc/auto.master
/home /etc/auto.home ------ means to mount directory specified in auto.home into "/home" all NFS shares specified in auto.home should mount under "/home"
# vim auto.home
nfs -rw 192.168.0.130:/home/nfs
------ "192.168.0.130:/home/nfs" will be mounted into
"nfs"(nfs -- first field)
SERVER SetUP
# mkdir /automount
# cd /automount/
# mkdir documents
# touch documents/commands.txt
# vim /etc/exports
/automount 10.0.0.154/255.0.0.0(rw,sync)
# service nfs restart
# service nfslock restart
CLIENT SetUp
# vim /etc/auto.master
/test /etc/auto.test
# vim/etc/auto.test
autofs rw,sync 10.0.0.180:/automount
# service autofs restart
# vim auto.master
/home /etc/auto.home
# vim auto.home
nfs -rw 192.168.0.130:/home/nfs
Started autofs. Logged in as an NFS user and the exported home directory get automatically mounted.
# vim /etc/auto.master
/home /etc/auto.home ------ means to mount directory specified in auto.home into "/home" all NFS shares specified in auto.home should mount under "/home"
# vim auto.home
nfs -rw 192.168.0.130:/home/nfs
------ "192.168.0.130:/home/nfs" will be mounted into
"nfs"(nfs -- first field)
SERVER SetUP
# mkdir /automount
# cd /automount/
# mkdir documents
# touch documents/commands.txt
# vim /etc/exports
/automount 10.0.0.154/255.0.0.0(rw,sync)
# service nfs restart
# service nfslock restart
CLIENT SetUp
# vim /etc/auto.master
/test /etc/auto.test
# vim/etc/auto.test
autofs rw,sync 10.0.0.180:/automount
# service autofs restart
Terima kasih telah membaca artikel tentang How to setup AUTOFS / AUTOMOUNT in NFS di blog Tutorial Opensource and Linux jika anda ingin menyebar luaskan artikel ini di mohon untuk mencantumkan link sebagai Sumbernya, dan bila artikel ini bermanfaat silakan bookmark halaman ini di web browser anda, dengan cara menekan Ctrl + D pada tombol keyboard anda.