zoukankan      html  css  js  c++  java
  • nfs 笔记 2

    http://woxihuanpes.blog.163.com/blog/static/12423219820097139145238/
    http://blog.csdn.net/willvc123/article/details/6325615

    [root@lk1 ~]# exportfs -au
    [root@lk1 ~]# df
    df: `/mnt': Stale file handle
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/vg_lk1-lv_root
    6795192 2285828 4157520 36% /
    tmpfs 510120 0 510120 0% /dev/shm
    /dev/sda1 487652 28371 433681 7% /boot
    [root@lk1 ~]#
    [root@lk1 ~]#
    [root@lk1 ~]# exportfs -rv
    exporting 192.168.4.0/24:/home/test
    [root@lk1 ~]#
    [root@lk1 ~]# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/vg_lk1-lv_root
    6795192 2285828 4157520 36% /
    tmpfs 510120 0 510120 0% /dev/shm
    /dev/sda1 487652 28371 433681 7% /boot
    192.168.4.51:/home/test
    6795264 2285824 4157568 36% /mnt

    使用 exportfs -rv 后, 就立即自动挂载好了!

    +++++++++++++++

    /tmp 192.168.4.50(rw,no_root_squash)
    /home/public 192.168.4.0/24(rw)
    /home/test lk0(rw)
    /home/linux lk*(rw,all_squash,anonuid=40,anongid=40) 主机名是不能包含 * 的

    service nfs restart
    Shutting down NFS daemon: [ OK ]
    Shutting down NFS mountd: [ OK ]
    Shutting down NFS quotas: [ OK ]
    exportfs: No host name given with /home/test  lk1(rw) (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534), suggest *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534) to avoid warning
    exportfs: No host name given with /tmp     192.168.4.50(rw,no_root_squash) (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534), suggest *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534) to avoid warning
    Shutting down NFS services: [ OK ]
    Shutting down RPC idmapd: [ OK ]
    Starting NFS services: exportfs: No options for /tmp     192.168.4.50(rw,no_root_squash) : suggest (sync) to avoid warning
    exportfs: No options for /home/public 192.168.4.0/24(rw) : suggest (sync) to avoid warning
    exportfs: No options for /home/test  lk0(rw) : suggest (sync) to avoid warning
    exportfs: Failed to stat /home/linux : No such file or directory

    exportfs: Failed to stat /home/test  lk0(rw): No such file or directory

    exportfs: Failed to stat /home/public 192.168.4.0/24(rw): No such file or directory

    exportfs: Failed to stat /tmp     192.168.4.50(rw,no_root_squash): No such file or directory

    ++++

    [root@lk2 ~]# mount -t nfs 192.168.4.51:/home/public /mnt
    mount.nfs: Stale file handle --------- 表示没有服务器那个目录或者没有权限

    [root@lk0 ~]# mount -t nfs 192.168.4.51:/tmp /mnt
    mount.nfs: /mnt is busy or already mounted
    [root@lk0 ~]# mount -t nfs 192.168.4.51:/tmp /mnt2
    mount.nfs: mount point /mnt2 does not exist
    [root@lk0 ~]#
    [root@lk0 ~]# mkdir mnt2
    [root@lk0 ~]#
    [root@lk0 ~]# mount -t nfs 192.168.4.51:/tmp /mnt2
    mount.nfs: mount point /mnt2 does not exist
    [root@lk0 ~]# mkdir /mnt2
    [root@lk0 ~]#
    [root@lk0 ~]# mount -t nfs 192.168.4.51:/tmp /mnt2
    [root@lk0 ~]# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/rhel_es-root 28784916 5585388 23199528 20% /
    devtmpfs 926776 0 926776 0% /dev
    tmpfs 942256 84 942172 1% /dev/shm
    tmpfs 942256 9160 933096 1% /run
    tmpfs 942256 0 942256 0% /sys/fs/cgroup
    /dev/sda1 508588 160576 348012 32% /boot
    tmpfs 188452 16 188436 1% /run/user/42
    tmpfs 188452 0 188452 0% /run/user/0
    192.168.4.51:/home/test 6795264 2285824 4157568 36% /mnt
    192.168.4.51:/tmp 6795264 2285824 4157568 36% /mnt2

  • 相关阅读:
    关于 NSTimer 和 NSRunLoop 的一些理解
    通过 CocoaPods 集成 WeexSDK 到iOS项目中
    iOS 从相册取出的图片默认 取中间部分 裁剪成方形的
    Trilynn分享了炼数成金邀请码
    highcharts分段显示不同颜色
    H5手机开发锁定表头和首列(惯性滚动)解决方案
    为移动端开发提供纯前端的路由方案
    ionic系列
    2014总结
    margin 相关 bug 系列
  • 原文地址:https://www.cnblogs.com/FlyAway2013/p/6009043.html
Copyright © 2011-2022 走看看