Chinaunix首页 | 论坛 | 博客
  • 博客访问: 38384
  • 博文数量: 7
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 113
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-10 17:29
个人简介

asdfasdfasdfasdf

文章分类

全部博文(7)

文章存档

2014年(6)

2013年(1)

我的朋友

分类: 服务器与存储

2014-06-13 18:04:35

1.服务器端安装
yum install nfs-utils rpcbind
chkconfig nfs on
service iptables stop

[root@pc10 ~]# service nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped
[root@pc10 ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  62756  status
    100024    1   tcp  63194  status
[root@pc10 ~]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
[root@pc10 ~]# rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  62756  status
    100024    1   tcp  63194  status
    100005    1   udp   1933  mountd
    100005    1   tcp  55590  mountd
    100005    2   udp  34027  mountd
    100005    2   tcp  32705  mountd
    100005    3   udp  57740  mountd
    100005    3   tcp  64882  mountd
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100021    1   udp  51452  nlockmgr
    100021    3   udp  51452  nlockmgr
    100021    4   udp  51452  nlockmgr
    100021    1   tcp  25539  nlockmgr
    100021    3   tcp  25539  nlockmgr
    100021    4   tcp  25539  nlockmgr

2.配置nfs
[root@pc10 lvm]# vim /etc/exports 
输入:   /mnt/lvm/nfs pc11(rw,no_root_squash)
[root@pc10 lvm]# cat /etc/exports 
/mnt/lvm/nfs pc11(rw,no_root_squash)

3.客户端
[root@pc11 ~]#  yum install nfs-utils rpcbind
[root@pc11 ~]# showmount -e pc10
Export list for pc10:
/mnt/lvm/nfs pc11
[root@pc11 ~]# mkdir /mnt/nfs
[root@pc11 ~]# mount -t nfs pc10:/mnt/lvm/nfs  /mnt/nfs/

vim /etc/fstab
添加自动挂载  pc10:/mnt/lvm/nfs /mnt/nfs/ nfs nodev,rw,rsize=32768,wsize=32768 0 0

reboot 之后
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/vg_pc7-lv_root   36G  2.2G   32G   7% /
tmpfs                       1.9G     0  1.9G   0% /dev/shm
/dev/vda1                   485M   32M  428M   7% /boot
pc10:/mnt/lvm/nfs           9.8G  139M  9.1G   2% /mnt/nf



阅读(1400) | 评论(0) | 转发(0) |
0

上一篇:lvm 学习

下一篇:虚拟化--用nfs模仿san

给主人留下些什么吧!~~