zoukankan      html  css  js  c++  java
  • NFS服务器搭建

    创建NFS共享目录,

    服务端ip192.168.1.11  主机名:hate

    客户端ip192.168.1.10  主机名:love

    [root@hate ~]# mkdir -p /nfs/backup

    [root@hate ~]# chmod -R 777 /nfs

    修改/etc/exports

    /nfs/backup        love(rw,async,nohide,no_subtree_check)

    注意:这里的解析名一定要用hostname,否则会出现权限的问题

    [root@hate ~]# showmount -e

    mount clntudp_create: RPC: Program not registered

    遇到这个问题时解决办法

    [root@hate ~]# /etc/init.d/nfs restart

    [root@hate ~]# showmount -e

    Export list for hate:

    /nfs/backup love
    [root@hate ~]# service nfs restart

    [root@hate ~]# chkconfig nfs on

    客户端192.168.1.10挂载NFS文件系统

    [root@love ~]# mkdir /mynfs

    手动挂载

    [root@love ~]#  mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 hate:/nfs/backup /mynfs

    [root@love ~]# df -h

    Filesystem            Size  Used Avail Use% Mounted on

    /dev/mapper/VolGroup00-LogVol00

                           45G  9.3G   33G  23% /

    /dev/sda1              99M   12M   82M  13% /boot

    tmpfs                1014M     0 1014M   0% /dev/shm

    hate:/nfs/backup       45G  6.5G   36G  16% /mynfs

    实现开机自动挂载

    [root@love ~]# vi /etc/rc.local 

    #!/bin/sh

    #

    # This script will be executed *after* all the other init scripts.

    # You can put your own initialization stuff in here if you don't

    # want to do the full Sys V style init stuff.

    touch /var/lock/subsys/local

    添加如下配置:这样还可以支持RMAN备份。

    modprobe hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

    /bin/mount -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600  hate:/nfs/backup /mynfs

    重启系统

    [root@love ~]# reboot

    [root@love ~]# df -h

    Filesystem            Size  Used Avail Use% Mounted on

    /dev/mapper/VolGroup00-LogVol00

                           45G  9.3G   33G  23% /

    /dev/sda1              99M   12M   82M  13% /boot

    tmpfs                1014M     0 1014M   0% /dev/shm

    192.168.1.11:/nfs/backup   45G  6.5G   36G  16% /mynfs

     

  • 相关阅读:
    react-native 之ScrollView的使用
    gitHub 克隆项目慢
    react native 给View添加点击事件
    React Native View属性onLayout
    react native 样式与布局
    react native 对日期的处理
    react native 顶部菜单栏效果的实现
    iOS self.navigationController 推出界面怎么一次性回到指定第一个
    Java
    2021-5-13讲课内容hibernate主键id映射_XML方式
  • 原文地址:https://www.cnblogs.com/arcer/p/3632570.html
Copyright © 2011-2022 走看看