设为首页 加入收藏

TOP

NFS挂载异常 mount.nfs: Input/output error
2019-09-17 18:38:34 】 浏览:30
Tags:NFS 异常 mount.nfs: Input/output error

[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

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇mongodb复制+分片集原理 下一篇mysql数据库优化之 如何选择合适..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目