[root@localhost ~]# vi /etc/exports
#增加
/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async)

[root@testdg ~]# mount -t nfs 192.168.10.20:/nfs /rman
mount.nfs: Input/output error

NFS服务系统重启后自动运行
[root@testdg ~]# chkconfig --list nfs
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@testdg ~]# chkconfig nfs on
[root@testdg ~]# chkconfig --list nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off

NFS挂载共享目录
[root@testdg ~]# showmount -e 192.168.10.20
Export list for 192.168.10.20:
/nfs 192.168.10.132

[root@testdg ~]# mount -t nfs 192.168.10.20(NFS机器IP):/nfs /rman
mount.nfs: Input/output error

--这里主要是服务没启动导致的,启动下就可以了
[root@testdg ~]# service portmap status
portmap is stopped
[root@testdg ~]# service portmap start
Starting portmap: [ OK ]
[root@testdg ~]# service portmap status
portmap (pid 5183) is running...

查看是否成功
[root@testdg ~]# df -h |grep /rman
192.168.10.20:/nfs 2.0T 1.2T 686G 65% /rman
现在已经挂上了。。。

NFS备份自动挂载和卸载
[oracle@test-db01 ~]$ crontab -l
00 03 * * 1,4 /home/oracle/dba/backup/backup_datafile_nas.sh
--NFS 有时不大稳定,现在让其在备份时候才挂上,备份完再去掉
[oracle@test-db01 ~]$
[oracle@test-db01 ~]$ cat /home/oracle/dba/backup/backup_datafile_nas.sh
#!/bin/bash
sudo mount -l |grep /rman
if [ $? -ne 0 ]
then
sudo mount -t nfs 192.168.10.20:/nfs /rman
sudo mount -l |grep /rman
if [ $? -ne 0 ]
then
exit
fi
fi
source /home/oracle/.bash_profile
$ORACLE_HOME/bin/rman target / log=/home/oracle/dba/backup/log/rman_backup_nas_`date +%m%d`.log append <<EOF
run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
backup as compressed backupset database format '/rman/db_%d_%T_%U_full.bak';
backup current controlfile format '/rman/ctl_%d_%T_%U.bak';
backup as compressed backupset archivelog all format '/rman/arch_%d_%T_%U_full.bak';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}
EOF
sudo umount -l /rman

最新文章

  1. 让LinqToSQL使用Web.Config中的链接字符串(修改Settings.Designer.cs)
  2. 数据库MySQL基本语法思维导图
  3. [SharePoint] SharePoint 错误集 1
  4. 详解 iOS 上机题!附个人见解
  5. SQL调用存储过程
  6. (八)shell中的循环结构
  7. mysql 在insert 时防止出现主键冲突错误的方法
  8. cocos2d-x回收池原理
  9. MAVEN 工程打包resources目录外的更多资源文件
  10. Form 表单常用正则验证 (收藏)
  11. JavaWeb 后端 &lt;二&gt; 之 Servlet 学习笔记
  12. [05] 利用private来封装
  13. JAVA数组的定义以及使用1
  14. SP8791 DYNALCA - Dynamic LCA 解题报告
  15. mysql 修改配置文件my.cnf失败
  16. sublime设置tab为四个空格
  17. MapServer Tutorial——MapServer7.2.1教程学习——第一节用例实践:Example1.1 A map with single layer
  18. python 06函数
  19. ElasticSearch 2 (34) - 信息聚合系列之多值排序
  20. java基础18 String字符串和Object类(以及“equals” 和 “==”的解析)

热门文章

  1. jsp页面日期格式不正确
  2. springcloud(十):服务网关zuul(转)
  3. Hibernate中的常用API
  4. mysql分表经验总结
  5. eclipse工具按键翻译
  6. SqlSugar 盲点
  7. opencv利用hough概率变换拟合得到直线后,利用DDA算法得到直线上的像素点坐标
  8. Android开发的一些总结
  9. SVN客户端和服务器端下载地址
  10. web页面测试