NFS学习笔记
来源:互联网 发布:淘宝宝贝违规怎么处理 编辑:程序博客网 时间:2024/05/17 22:06
NFS学习笔记
Ubuntu下的NFS配置
NFS Server
1. 安装相应的包:nfs-kernel-server
sudo apt-get install nfs-kernel-server
2. 将需要分享的目录export出来
vim /etc/exports/home/forrest/test IP地址(rw,sync,no_subtree_check)sudo exportfssudo /etc/init.d/nfs-kernel-server restart
NFS Client
1. 安装相应的包: nfs-common
sudo apt-get install nfs-commonsudo /etc/init.d/nfs-common start
2. mount:
mount -t nfs -o rw IP地址:/home/forrest/test /mnt/test
RedHat下的NFS配置
在RedHat下,客户端与服务器端享用一样的软件,一样的启动方式。只是服务器端需要配置一下。
这里先记录一下NFS客户端的操作:
Client
[forrest@host ~]$ /etc/init.d/portmap startStarting portmap: [ OK ]touch: cannot touch `/var/lock/subsys/portmap': Permission denied[forrest@host ~]$ sudo /etc/init.d/portmap startStarting portmap: [ OK ][forrest@host ~]$ sudo /etc/init.d/nfs restartShutting down NFS mountd: [FAILED]Shutting down NFS daemon: [FAILED]Shutting down NFS quotas: [FAILED]Shutting down NFS services: [FAILED]Starting NFS services: [ OK ]Starting NFS quotas: [ OK ]Starting NFS daemon: [ OK ]Starting NFS mountd: [ OK ]Starting RPC idmapd: [ OK ][forrest@host ~]$ sudo mount 10.20.131.157:/home/admin /mnt/efs/www
必须先启动portmap才能启动nfs后台进程,否则会报如下错误:
[forrest@host ~]$ sudo /etc/init.d/nfs startStarting NFS services: [ OK ]Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refusedrpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp). [FAILED]Starting NFS daemon: [FAILED]
可以通过status检查:
[forrest@host ~]$ sudo /etc/init.d/portmap statusportmap (pid 19086) is running...
必须启动NFS后台进程才能够mount成功,否则会mount了很久,然后报如下错误:
[forrest@host ~]$ sudo mount 10.20.131.157:/home/admin /mnt/efs/wwwPassword: mount.nfs: Input/output error
原因:
Each time that you start the NFS service, a dynamic port number is assigned to nfsd. This assignment is made through the 'Portmapper' daemon. So, before starting NFS, you need to switch on the portmapper service.
可以用如下status检查:
[forrest@host ~]$ sudo /etc/init.d/nfs statusrpc.mountd (pid 19207) is running...nfsd (pid 19183 19170 19153 19152 19151 19150 19149 19148) is running...rpc.rquotad (pid 19142) is running...
除了使用/etc/init.d/nfs脚本,我们也可以使用简便的命令——service
如:
[root@host mnt]# service portmap startStarting portmap: [ OK ][root@host mnt]# service nfs startStarting NFS services: [ OK ]Starting NFS quotas: [ OK ]Starting NFS daemon: [ OK ]Starting NFS mountd: [ OK ]Starting RPC idmapd: [ OK ][root@host mnt]# sudo mount 10.20.131.157:/home/admin /mnt/efs/www
[root@localhost /]# chkconfig --list nfsnfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off[root@localhost /]# chkconfig nfs on[root@localhost /]# chkconfig --list nfsnfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
SUSE下的NFS安装与配置
in SUSE, you may need to use
/etc/rc.d/init.d/portmap start /etc/rc.d/init.d/nfs start
参考文章:系统mount.nfs: Input/output error
- NFS 服务学习笔记
- NFS学习笔记
- busybox nfs 学习笔记
- NFS服务学习笔记
- LInux学习笔记 --NFS
- solaris学习笔记----------配置nfs
- LinuxCast学习笔记三十二:NFS
- linux学习笔记之nfs
- Linux NFS 服务器配置 学习笔记
- hadoop学习笔记之-NFS配置
- hadoop学习笔记之-NFS配置
- ubuntu操作系统学习笔记之NFS安装
- Ubuntu操作系统学习笔记之NFS基础
- NFS笔记
- nfs 笔记
- NFS学习
- 学习笔记_安装和配置NFS服务(For Ubuntu)
- iTop-4412开发板学习笔记之NFS服务搭建
- C++本质:类的赋值运算符=的重载,以及深拷贝和浅拷贝
- javaScript对只能输入某些特殊组合字符串的验证
- DIY 新浪微博Android客户端 ----用Android手机发送来自iPhone的微博
- Treap树头文件C语言
- C++类在内存的分配问题
- NFS学习笔记
- 推荐的Python书籍
- Makefile的编写详解
- Treap树实现文件C语言
- 存储过程及其调用
- Builder建造者模式
- Android画图板 - 创建图形
- Python语言学习笔记
- 软件开发的流程