aix下通过nfs共享磁盘_第1页
aix下通过nfs共享磁盘_第2页
aix下通过nfs共享磁盘_第3页
aix下通过nfs共享磁盘_第4页
aix下通过nfs共享磁盘_第5页
已阅读5页,还剩14页未读 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1,服务端建立共享a , NFS服务安装(光盘中有)rpm -ivh nfs-uti ls-1.0.9-24.el5.i386.rpmrpm -ivh portmap-4.0-.i386.rpmb ,添加对应的共享目录及关联目标机器|Linux系统,/etc/exports文件添加NFS路径/NFS ydms apsys/upload /NFS_ydms_apsys/upload8(rw,no_root_squash)AIX系统,/etc/ export s文件添力日NFS路径/NFS_ydms_apsys/upload/NFS_ydms_apsys/u

2、pload root=2:,rw注意:服务器列表要以:分割,可以指定多个服务器执行exportfs -a执行showmount -e 92,查看export结果c , chmod .html target=_blank权限设置chown -R nfsnobody:nfsnobody /NFS_ydms_apsys/uploadd,启动NFS服务启动:/etc/rc.d/init.d/nfs start停止:/etc/rc.d/init.d/nfs stop检查运行状态:service nfs status2,客户端mounta,创建mount后,能

3、够看到的目录mkdir -p /ydms_apsys/uploadb ,执行mount命令,网络共享挂接(AIX客户端时,不需要-t, -o参数) linux:mount -t nfs -o rw 92:/NFS_ydms_apsys/upload /ydms_apsys/uploadAIX:mount -v nfs -o rw 92:/NFS_ydms_apsys/upload /ydms_apsys/uploadc,如果AIX和linux的默认NFS端口不一致时,需要使用如下命令nfso -o nfs_use_reserved_ports=13,

4、umount用来取消挂接umount /ydms_apsys/upload4,系统启动自动mountlinux/etc/rc.d下的rc.local中添加mount命令mount -t nfs -o rw 92:/NFS_ydms_apsys/upload /ydms_apsys/uploadAIX/etc/ file systems文件中添加如下信息:/ydms apsys/upload:dev=/NFS_ydms_apsys/uploadvfs=nfsmount=truenodename=92options=rw,soft,bgtype=nfs_

5、mount文档内容也可以参照如下URL:http:/ Server首先需要启动NFSServer,可以通过smit nfs - Network File System (NFS)-NFS on This System启动或者停止nfs服务组。注:用smitty来启动有可能出现启动不完整,改用命令行来执行命令行:startsrc -g nfsstopsrc -g nfs可以通过lssrc -g nfs查看nfs的服务情况#lssrc -g nfsSubsystem Group PID Statusbiodnfs712706activenfsdnfs635260activerpc.mountdnf

6、s462932activerpc.lockdnfs639418activerpc.statdnfs757914activeConfigurenfsrgydnfsinoperativegssdnfsinoperative当然,以上也可以通过startsrc -g nfs与stopsrc -g nfs启动与停止该服务组子系统。每当系统启动时,/etc/rc.nfs运行exportfs命令来读取服务器上的/etc/exports文件,然后告诉内核要导出哪些目录与对应的权限。然后rpc.mountd和以上守护进程由/etc/rc.nfs启动。/etc/exports指定了nfs server要导出的目

7、录与权限,该文件内容如下,如#more /etc/exports/u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name注意:这里的access一定要写机器名,其机器名对应的ip在/etc/hosts中体现出来用exportfs可以导出该目录,如:#/usr/sbin/exportfs -a#/usr/sbin/exportfs/u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name关于更多的exportfs的用法,可以查看相关帮助,另外,/etc/xta

8、b则与/ext/exports有一样的格式,运行exportfs的时候,/etc/xtab将被更新,这样可以临时导出一个目录而不更新exports文件。说明:如果没有配置NFS共享文件夹的访问权限,则无法查找到/etc/exports文件。关于/etc/exports的更新,也可以用smit nfs - Network File System (NFS) - Add a Directory to Exports List或者是Change / Show Attributes of an Exported Directory来实现,如#smit chnfsexp* PATHNAME of Dir

9、ectory to Export/scanfiles* MODE to exportdirectoryread-write.HOSTS & NETGROUPS allowed clientaccess ZSDA2_bt2,ZSDA2_present,ZSDA_svr2,centos,oa-wjb,dbAnonymous UID-2HOSTS allowed root accessZSDA2_bt2,ZSDA2_present,ZSDA_svr2,centos,oa-wjb,db HOSTNAME list. If exported read-mostly Use SECURE OPTI

10、ON?no+.Public filesystem?no+* CHANGE export now, system restart or both both +(PATHNAME of alternate Exports file/* Pathname of directory to export/u01/logsAnonymous UID-2Public filesystem?no* Change export now, system restart or both bothPathname of alternate exports fileAllow access by NFS version

11、sExternal name of directory (NFS V4 access only)Referral locations (NFS V4 access only) Replica locationsEnsure primary hostname in replica list yesAllow delegations?Securitymethodsys,krb5p,krb5i,krb5,dh,noneMode to export directoryread-writeHostname list. If exported read-mostly Hosts & netgrou

12、ps allowed client access host_name1,host_name2Hosts allowed root access/验证服务器中上的/etc/exports文件是否列出客户机要安装的文件系统名称以及该文件系统是否已导出。输入以下命令进行操作:#showmount -e server_name(如showmount -e zsdal)该命令在NFS Server/client上都可以正常运行,列出了由server_name当前导出的所有文件系统。二、配置 nfs clientnfs的client配置比较简单,需要portmap服务正常即可。#lssrc -s port

13、mapSubsystem Group PID Statusportmap portmap 225506 active关于mount的信息,是写在/etc/filesystems中的,如#more /etc/filesystems/mydisk:dev = /disk1vfs = nfsnodename = dbbakmount= falsetype = nfs3options=soft,intr,retry=2,rsize=32768,wsize=32768,timeo=300,proto=tcpaccount = false其中nodename指定了服务器的名字,其对应的ip在/etc/ho

14、sts中体现,dev指定了服务器的export出来的目录。关于更多的options的设置,可以查阅更多的nfs的文档。其详细信息,也可以在smit中获得,如smit nfs - Network File System (NFS) - Add a File System for Mounting或者是Change / Show Attributes of an NFS File System。如#smit chnfsmnt* PATHNAME of mount point/mydisk* PATHNAME of Remote Directory/diski* HOST where remote

15、directory residesdbbakMount type NAMEnfs3* Use SECURE mount option?no* Remount file system now,bothupdate /etc/filesystems or both?* /etc/filesystems entry will mount the directory noon system RESTART.* MODE for this NFS file systemread-write* ATTEMPT mount in background or foreground? foregroundNUM

16、BER of times to attempt mount2Buffer SIZE for read32768Buffer SIZE for writes32768NFS TIMEOUT. In tenths of a second300NFS version for this NFS file systemanyTransport protocol to usetcpInternet port NUMBER for server* Allow execution of SUID and sgid programs yesin this file system?* Allow DEVICE a

17、ccess via this mount?yes* Server supports long DEVICE NUMBERS?yes* Mount file system soft or hardsoft验证mountd、portmap和nfsd守护程序正在NFS服务器上运行,请在客户机shell提示符下输入以下命令:#/usr/bin/rpcinfo -u server_name mount#/usr/bin/rpcinfo -u server_name portmap#/usr/bin/rpcinfo -u server_name nfs如果守护程序在服务器运行,会返回以下响应:progra

18、m100005version1 readyandwaitingprogram100000version2readyandwaitingprogram100003version2readyandwaiting程序号分别与命令对应,如前例中所示。如果没有返回类似的响应,请在服务器控制台上登录服务器并按照获取NFS守护程序的当前状态中的指示信息检查守护程序的状态。#showmount -e server_name该命令列出了由server_name当前导出的所有文件系统。注意:如果在AIX上mount linux的nfs文件系统,可能需要特殊执行:#nfso -o nfs_use_reserved_

19、ports=1三、在 WINDOWS器上配置NFS CLIENT在Windows系统挂载UNIX NFS分享目录Linux File Server除了Linux + SAMBA的方案外,也可以使用Windows + SFU (Windows Services for UNIX)的方式连接Linux NFS Shared Folder.实测环境AIX-5.3Microsoft Windows XP, SP2 + SFU 3.5下载Microsoft Windows Services for UNIX 3.5 (450MB)Windows Services for UNIX 3.5系统需求下载地址

20、:http:/ C:SFU35SEL_EN安装只安装Client for NFS on Windows的操作指令:msiexec /I C:SFU35SEL_ENsfusetup.msi /qb addlocal=NFSClient”完整安装(执行setup.exe) Windows Services for UNIX的程式集内容:默认安装路径:C:SFU执行C Shell或Korn Shell可在Windows系统操作Unix指令Services for UNIX Administration界面如下(完整安装):设定User Name Mapping将NFS Server上的/etc/pa

21、sswd、/etc/group两个文件复制到Windows电脑的C:执行Services for UNIX Administrator点选User Name Mapping在Configuration画面中,设定:Password file path and name: c:passwdGroup file path and name: c:group在Maps画面中,设定:Show User Maps List Windows Users、List UNIX Users在Windows users清单中点选自己的账号UNIX users清单中点选欲映射的账号(想要以那个UNIX身份挂载NFS

22、 Folder)按Add确定按画面右上角Apply完成设定挂载NFS目录命令列模式:cd SFUcommonmount linux_ip:/path drive_id:(如:mount :/abc e:挂卜戴到E槽)禧案备恩管模式:禧案管工具速布罔路磁碟檄挂卜戴完成示意圜Services for UNIX使用指南IT专业人员与开发人员所面临的难题之一是如何集成各种不同平台上的应用程序和数据,尤其是企业同时拥有UNIX和WINDOWS台,如何共享数据,方便不同的用户使用,就摆在IT管理人员的面前。这里介绍微软公司的Services for UNIX(以下简称SFU ,将提供

23、简便的解决方案。前期准备工作:1、 确认两个服务是否正确运行(Server for NFS和User Name Mapping).2、将passwd和group文件从linux主机拷贝到NAS主机的某个目录下。目录位置没有限 定。如:systemrootsystem32driversetc。3、 在Windows设定一个专用用户来作为UNIX用户,并设定相应的权限。注:本文仅说明简单的映射关系,关于NIS与AD的集成,以后有机会在说明。安装Services for UNIX :微软公司提供免费的SFU3.5下载,点击如下地址注册下载:http:/ 安装文件会安装在C:SFUo下表会列出标准和自

24、定义的不同的功能:Windows ; ;2000Windows ; ; 2000Windows ; ; 2000ComponentProfessional, orServer or WindowsServer or WindowsWindows ; ;XPServer ; ; 2003,Server ; ; 2003Professionalexcept domaindomaincontrollerscontrollersBase utilities,including InterixsubsystemStandardStandardStandardUNIX PerlStandardStanda

25、rdStandardInterix GNU utilitiesStandardStandardStandardInterix GNU SDKCustomCustomCustomClient for NFSStandardStandardStandardServer for NFSCustomStandardStandardGateway for NFSN/ACustomCustomServer for NISN/AN/AStandardPasswordsynchronizationCustomCustomStandardTelnet Server(availableWindows ; ; 20

26、00 only)StandardStandardStandardWindows-based RemoteShell and CronservicesCustomStandardStandardUser Name MappingCustomCustomStandardServer for NFSAuthenticationCustomStandardStandardServer for PCNFSCustomCustomCustomInterix SDKCustomCustomCustomActiveState PerlCustomCustomCustom卜面是内建的安全设定,如:SUID等设定,在这里不加解释。一般可以不选,如果有特殊的要求可以选择。用户名映射:这里选Local User Name Mapping Server。Password and group fi

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论