平台:Oracle 10.2.0.1 on CentOS 5.1,mount一个windows2008上的共享目录
mount:
[root@standby /]# id oracleuid=500(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@standby /]# mount -t cifs //172.16.4.223/df -o uid=500,gid=501,rsize=32768,wsize=32768,file_mode=0777,dir_mode=0777,rw,hard,directio,noperm,username=administrator,password=@mzh50537381 /nfstt/
已经给oracle用户足够的权限,可以用ll验证一下:
drwxrwxrwx 1 oracle oinstall 4096 2010-05-20 nfstt |
同时使用oracle用户mkdir、touch以及vi都没有问题。
登陆sqlplus测试:
SQL> create tablespace dfakj datafile '/nfstt/asdf.dbf' size 10m extent management local;
*
ERROR at line 1:
ORA-19510: failed to set size of 1280 blocks for file "/nfstt/asdf.dbf"
(blocksize=8192)
ORA-27044: unable to write the header block of file
Linux Error: 13: Permission denied
Additional information: 7
根据ORA-19510的error code搜索metalink,找到一篇[ID 444809.1]:
We do not in general certify against particular storage vendors and use of NAS devices (NFS/CIFS) is treated as any other file system.
Oracle does not support CIFS protocol in general because CIFS does not guarantee
atomic write of 512 byte (Oracle log block size) like NFS can (with wsize parameter). So in case of power failure, it is possible to corrupt Oracle archived logs.
However, RMAN does NOT rely on 512-byte atomic writes (we write the ENTIRE file and then close it) so the answer is yes: CIFS is fine for RMAN files: backup pieces, datafile copies, archived logs but it is not certified by oracle. In other words if there are any problems involved in using rman and cifs, then we cannot get the RDBMS development involved.
大意是Oracle是不支持CIFS协议的,但RMAN可以,原因是CIFS协议无法保证512字节的最小写入单位,而NFS可以通过wsize参数实现[虽然cifs mount时也支持此参数,但可能如文档所说does not guarantee无法保证吧。 ]。而RMAN因为不依赖512字节的写限制,而是直接写入整个文件,所以原理上说是可以的,但Oracle官方没有确认,实际我执行的结果是失败的,错误堆栈如下:
RMAN-03009: failure of backup command on t1 channel at 05/20/2010 02:57:17
ORA-19504: failed to create file "/nfstt/db_02le490b_1_1.bak"
ORA-27040: file create error, unable to create file
Linux Error: 13: Permission denied
以我实验的环境来看,不管是Oracle还是RMAN备份,都无法通过cifs操作。
阅读(1999) | 评论(2) | 转发(0) |