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
下一篇: smarty 原来也不过如此~~呵呵