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

  • 相关阅读:
    C# 串口操作系列(2) -- 入门篇,为什么我的串口程序在关闭串口时候会死锁 ?
    C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子。
    嵌入式
    [转] Java程序员学C#基本语法两个小时搞定(对比学习)
    test
    LeetCode 【困难】数据库-第1412 :查找成绩处于中游的学生
    LeetCode 【困难】数据库-第1384 :按照年度列出销售总额(每个产品、每年、总销额)
    LeetCode 【困难】数据库-第1369 :获取最近第二次的活动
    LeetCode 【困难】数据库-第1336(超困难):每次访问的交易次数
    LeetCode 【困难】数据库-第1225:报告系统状态的连续日期
  • 原文地址:https://www.cnblogs.com/FlyAway2013/p/6009043.html
Copyright © 2011-2022 走看看