Sunteți pe pagina 1din 4

For mounting a File System through NFS in HPUX 1.

NFS (Port nfsd 2049) is a service for sharing files and directories acro ss a LAN 2. NFS wor s across multiple UNIX and PC platforms. 3. NFS allows transparent access to files from any node on the LAN. Note: - NFS PV2 was used through HP-UX 10.20. NFS PV3 was first implemented at HP-UX 11.00. Features and benefits of NFS PV3 include: 1. Improved performance 2. Large File support 3. AutoFS support 4. NFS over TCP support NFS Daemons: NFS Server portmap (10.20) rpcbind (11.x) nfsd 16 tional) rpc.mountd rpc.pcnfsd (optional) rpc.statd rpc.loc d NFS Configuration Files: NFS Server /etc/rc.config.d/nfsconf nfsconf /etc/exports /etc/dfs/dfstab ab NFS Useful command:1./sbin/init.d/nfs.server start or stop 2./sbin/init.d/nfs.client start or stop 3. exportfs 4. mount or aF nfs & umount aF nfs 5. share 6. rpcinfo p <server name> 7. showmount e <server name> 8. nfsstat -s -: NFS configuration step by step:Login as a super user and edit the nfs configuration files on server side. Put entries in /etc/hosts file of client server ip-addr and hostname #vi /etc/hosts #vi /etc/rc.config.d/nfsconf #chmod 755 /etc/rc.config.d/nfsconf Edit/etc/rc.config.d/nfsconf, setting the following values: NFS_CORE=1 NFS_SERVER=1 START_MOUNTD=1 Run thenfs.serverscript:

NFS Client /etc/rc.config.d/ /etc/exports /etc/dfs/dfst

NFS Client portmap (10.20) rpcbind (11.x) biod 16 (op rpc.statd rpc.loc d

#/sbin/init.d/nfs.server start Edit/etc/dfs/dfstab, adding an entry for each directory that is to be shared. # chmod 755 /etc/dfs/dfstab #vi /etc/dfs/dfstab Share F o rw d tmp /tmp/Scripts To stop the NFS service types the following at the prompt. #/sbin/init.d/nfs.server stop To start the NFS service types the following at the prompt. #/sbin/init.d/nfs.server start Go to the NFS client node and start nfs. client services. Put entries in /etc/hosts file of client server ip-addr and hostname #vi /etc/hosts edit the file /etc/rc.config.d/nfsconf and ma e the entry loo li e below #chmod 755 /etc/rc.config.d/nfsconf Nfs.client=1 Start the services #/sbin/init.d/nfs.client start Now mount the datasource from the node from which you want to access data on the server. #mount -F nfs 10.1.1.76:/tmp/Scripts /tmp/mnt #bdf to verify the remote mounted file system. For auto mount nfs after reboot, put entry in /etc/fstab #vi /etc/fstab Just type "mount" and you can see it mounted. Once you mount the mount directory you can access data in the shared directory on the NFS server. If you want to access data from the other node you have to unmount the directory here and similarly mount it from the other node. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ To mount a windows share in HP-UX Networ File system * HP-UX 11i v1 and 11i v2 supports NFS v2 and v3. * HP-UX 11i v3 supports NFS v2, v3 and v4. Advantages of NFS v3 * Files of sizes up to 128GB * Uses TCP versus UDP in v2 * Enhanced Performance * AutoFS is supported versus automounter in v2 Advantages of NFS v4 * Enhanced Security * Scalability * Better cross platform interoperability * Wor s better through firewall and on the internet NFS v3 is still the default protocol for NFS in v3. Some Important files to remember * /etc/dfs/dfstab # Replaces /etc/exports file * /etc/dfs/sharetab # Contains a list of shared resources * /etc/rmtab # contains list of shared resources which are mounted by client s AutoFS

cifs 01. Edit /etc/rc.config.d/cifsclient and ma e "RUN_CIFSCLIENT=1" 02. Start the cifsclient daemon ry running # /sbin/init.d/cifsclient start 03. Ma e sure the Windows System Name is listed in /etc/hosts file with short an d fully qualified domain name 10.1.3.207 CDTHPMU0371.corp.maruti.co.in CDTHPMU0371 04. Create mount point # m dir /home/hp_b /cifs_test 04. Mount the file system using cifsmount command # cifsmount -U <UserId> -P <Password> //CDTHPMU0371/Bipul /home/hp_b /cifs_t est 05. Run cifslist to list all the connected shares mig02:/home/hp_b /cifs_test#cifslist Mounted Object Mountpoint State ------------------------------------------------------------------------------\\CDTHPMU0371\BIPUL /home/hp_b /cifs_test M =============================================================================== Server Local User Remote User Domain State ------------------------------------------------------------------------------CDTHPMU0371 root hp_unix corp.maruti.co.in L Ma e the file system to mount automatically using /etc/fstab 01. Add the entry to /etc/fstab file. CDTHPMU0371:/Bipul /home/hp_b /cifs_test cifs defaults 0 0 NOTE: The cifs_server_name MUST be a WINS name!! 02. Do a cifslogin for the user with the '-s' option to save the password in a u ser database (/var/opt/cifsclient/cifsclient.udb) cifslogin -s -U <user_name> -P <password> -D <Domain_name> cifs_server_na me # cifslogin -s -U <user_name> -P <password> -D <corp.maruti.co.in> CDTHPMU0 371 03. Chec to ma e sure the password db was created # ll /var/opt/cifsclient/cifsclient.udb 04. Mount the file system # mount //home/hp_b /cifs_test Ma e the file system available to other users other than root The user which use to login on hpux server should have the required permission. Otherwise he will not be able to access the files under the cifs filesytem. To give access to "user5" to the cifs file s ystem, 01. Login to the UNIX system as "user5" 02. Save the CIFS user/password credentials $ cifslogin -s -U <user_name> -P <password> -D <corp.maruti.co.in> CDTHPMU0 371 03. Verify if the new user is added using cifslist command cifslist Mounted Object Mountpoint Stat e -----------------------------------------------------------------------------\\testsytem\share1 /mnt M Server Local User Remote User Domain Stat e -----------------------------------------------------------------------------testsystem root testuser domain L

testsystem user5 testuser domain L 04. After successful login, user5 will be able to access the CIFS share. Tipsr stop # /sbin/init.d/nfs.core stop # /sbin/init.d/nfs.client start # /sbin/init.d/nfs.server start # /sbin/init.d/nfs.core start ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++

S-ar putea să vă placă și