建立raw device tablespace報Linux Error: 13: Permission denied
---查詢oracle使用者的使用者組
[root@rhel5 ~]# id oracle
uid=502(oracle) gid=102(oinstall) groups=102(oinstall),103(dba)
---給新建的卷組vg2授權
[root@rhel5 ~]# chown -Rf oracle:oinstall /dev/vg2
[root@rhel5 ~]# chmod -Rf 777 /dev/vg2
---切到oracle
[root@rhel5 ~]# su - oracle
-bash-3.2$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 10:02:56 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 159386712 bytes
Database Buffers 146800640 bytes
Redo Buffers 6336512 bytes
Database mounted.
Database opened.
SQL> select file#,name from v$datafile
FILE# NAME
---------- --------------------------------------------------
1 /oracle/app/oracle/oradata/zxy/system01.dbf
2 /oracle/app/oracle/oradata/zxy/sysaux01.dbf
3 /oracle/app/oracle/oradata/zxy/undotbs01.dbf
4 /oracle/app/oracle/oradata/zxy/users01.dbf
5 /oracle/newwisdomone.dbf
6 /oracle/rawfile
7 /oracle/rawfile2
8 /oracle/tbs_mod1.dbf
9 /oracle/tbs_mod2_newposition.dbf
9 rows selected.
---建立裸裝置表空間報許可權不足
SQL> create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m;
create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m
*
ERROR at line 1:
ORA-01119: error in creating database file '/dev/vg2/lv2'
ORA-27041: unable to open file
Linux Error: 13: Permission denied
Additional information: 1
---確認卷組vg2的許可權與使用者組,是正確的
[root@rhel5 ~]# ls -l /dev/vg2
total 0
lrwxrwxrwx 1 oracle oinstall 19 Jun 21 09:59 lv2 -> /dev/mapper/vg2-lv2 ----注意:這裡lv2是個連結檔案
[root@rhel5 ~]# ls -l /oracle/tbs_mod2_newposition.dbf
-rw-r----- 1 oracle oinstall 26222592 Jun 21 10:03 /oracle/tbs_mod2_newposition.dbf
[root@rhel5 ~]# ls -l /dev/vg2/lv2
lrwxrwxrwx 1 oracle oinstall 19 Jun 21 09:59 /dev/vg2/lv2 -> /dev/mapper/vg2-lv2
----檢視lv2連結檔案對應的真正檔案
[root@rhel5 ~]# ls -l /dev/mapper/vg2-lv2
brw-rw---- 1 root disk 253, 1 Jun 21 09:59 /dev/mapper/vg2-lv2 --可以看到還是root:disk
----給lv2對應的真正檔案授權
[root@rhel5 ~]# chown -Rf oracle:oinstall /dev/mapper/vg2-lv2
[root@rhel5 ~]# ls -l /dev/mapper/vg2-lv2
brw-rw---- 1 oracle oinstall 253, 1 Jun 21 09:59 /dev/mapper/vg2-lv2
[root@rhel5 ~]# chmod -Rf 777 /dev/mapper/vg2-lv2
[root@rhel5 ~]# su - oracle
-bash-3.2$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 10:07:28 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
---建立裸裝置表空間成功
SQL> create tablespace tbs_top datafile '/dev/vg2/lv2' size 30m;
Tablespace created.
---為了防止重啟主機反覆授權直接新增裸裝置的連結及真正檔案到/etc/profile中
[root@rhel5 ~]# tail -5 /etc/profile
chown -Rf oracle:oinstall /dev/mapper/vg2-lv2
chmod -Rf 777 /dev/mapper/vg2-lv2
chown -Rf oracle:oinstall /dev/vg2
chmod -Rf 777 /dev/vg2
小結:
1,連結與真正裝置檔案都要進行授權
2,上述授權指令碼寫入到/etc/profile中
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-764556/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle程式命令的6571(Linux Error: 13: Permission denied)OracleLinuxError
- nginx部署(13:Permission denied)報錯Nginx
- [Oracle] Raw device上Create TablespaceOracledev
- Nginx: stat() failed (13: permission denied)NginxAI
- Python 執行報錯 PermissionError: [Errno 13] Permission denied: '***.***'PythonError
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- PermissionError: [Errno 13] Permission denied 如何解決Error
- nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)NginxErrorORB
- Error: Permission denied @ apply2filesErrorAPP
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- PermissionError: [Errno 13] Permission denied解決辦法Error
- 詳解Nginx 13: Permission denied 解決方案Nginx
- mysql [ERROR] Can't create IP socket: Permission deniedMySqlError
- linux下如何使用raw device來建立管理asm diskLinuxdevASM
- Android10 建立檔案 Permission deniedAndroid
- raw devicedev
- redhat linux上不用dd清空raw device可以重複使用raw device嗎RedhatLinuxdev
- FATAL: Failed to make swap directory /etc/squid/cache: (13) Permission deniedAIUI
- Nginx 日誌 failed (13: Permission denied) 錯誤(13:許可權被拒絕)NginxAI
- 在Linux上使用raw device方式Linuxdev
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\hao\\Desktop\\test.xlsx'Error
- solaris 10_raw device_建立資料庫dev資料庫
- Nginx報錯:Permission denied,沒有許可權!Nginx
- Hexo deploy git permission deniedHexoGit
- IOError: [Errno 13] Permission denied 解決:linux下python安裝並使用非root模組ErrorLinuxPython
- PermissionError: [Errno 13] Permission denied:的許可權該怎麼解決。。。Error
- raw device, first blockdevBloC
- about raw device[zt]dev
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- Angular macOS Err:EACCES: permission deniedAngularMac
- Permission Denied(publickey) 解決
- -bash: ./backup.sql: Permission deniedSQL
- Raw Device vs File Systemdev
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jason\\Documents\\t2'的解決方案Error
- PHP中 mkdir: Permission denied 問題PHP
- adb remount of system failed: Permission deniedREMAI
- How to Choose Size of Datafile on Raw Devicedev