Saturday, March 5, 2016

RHEL:- nfs direct and indirect mapping - autofs

PreReq:- Make sure to install nfs server/client on your system.

on server export the share

# cat /etc/exports
/share *(rw,fsid=0,insecure,no_root_squash,sync,no_subtree_check)

Restart nfs service
# systemctl start nfs-server.service

on client

using direct map

# cat /etc/auto.master
/- /etc/auto.direct

# cat /etc/auto.direct
/opt/share -fstype=nfs nfsserver:/share

Note: You define absolute path in direct map

using indirect map

# cat /etc/auto.master
/opt /etc/auto.local

# cat /etc/auto.local
share  -fstype=nfs nfsserver:/share

Note: you define relative path on in-direct map

No comments:

Post a Comment