免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5852 | 回复: 4
打印 上一主题 下一主题

请教一个Linux裸设备的权限问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-02 20:59 |只看该作者 |倒序浏览
我在RedHat AS4下做Oracle RAC,打算把OCR和voting信息放在裸设备上。创建分区后,又指定了裸设备,还为裸设备指定了权限。当系统重新启动后,发现裸设备的权限又改成最初的样子了,请教高手,这个问题怎么解决?
看了一些文档,介绍说在目录/etc/udev/permissions.d下创建一个文件,在这个文件中指定裸设备的权限即可。请教大家,这个文件的名称和格式应该是什么样子的?
谢谢!

论坛徽章:
5
荣誉会员
日期:2011-11-23 16:44:17CU大牛徽章
日期:2013-09-18 15:15:15CU大牛徽章
日期:2013-09-18 15:15:45未羊
日期:2014-02-25 14:37:19射手座
日期:2014-12-26 22:55:37
2 [报告]
发表于 2008-03-03 16:24 |只看该作者
那个改起来颇麻烦,不如直接写rc.local算了。不过如果要开机放在rc*.d中启动ORACLE,还是要给permissions.d

论坛徽章:
0
3 [报告]
发表于 2008-03-03 17:06 |只看该作者
Oracle Clusterware fails to start after a reboot due to permissions on raw devices reverting to default values, How to fix?
After a successful installation of Oracle Clusterware a simple reboot and the Clusterware fails to start. This is because the permissions on the raw devices for the OCR and voting disks e.g. /dev/raw/raw{x} revert to their default values (root:disk) and are inaccessible to Oracle. This change of behavor started with the 2.6 kernel; in RHEL4, OEL4, RHEL5, OEL5, SLES9 and SLES10. In RHEL3 the raw devices maintained their permissions across reboots so this symptom was not seen.



The way to fix this is on RHEL4, OEL4 and SLES9 is to create /etc/udev/permission.d/40-udev.permissions (you must choose a number that's lower than 50). You can do this by copying /etc/udev/permission.d/50-udev.permissions, and removing the lines that are not needed (50-udev.permissions gets replaced with upgrades so you do not want to edit it directly, also a typo in the 50-udev.permissions can render the system non-usable). Example permissions file:
# raw devices
raw/raw[1-2]:root:oinstall:0640
raw/raw[3-5]:oracle:oinstall:0660

Note that this applied to all raw device files, here just the voting and OCR devices were specified.



On RHEL5, OEL5 and SLES10 a different file is used /etc/udev/rules.d/99-raw.rules, notice that now the number must be (any number) higher than 50. Also the syntax of the rules is different than the permissions file, here's an example:

KERNEL=="raw[1-2]*", GROUP="oinstall", MODE="640"
KERNEL=="raw[3-5]*", OWNER="oracle", GROUP="oinstall", MODE="660"

This is explained in details in Note: 414897.1.

论坛徽章:
0
4 [报告]
发表于 2008-03-04 08:50 |只看该作者
楼上两位介绍的方法我都试过了,都可行。多谢了!

论坛徽章:
5
荣誉会员
日期:2011-11-23 16:44:17CU大牛徽章
日期:2013-09-18 15:15:15CU大牛徽章
日期:2013-09-18 15:15:45未羊
日期:2014-02-25 14:37:19射手座
日期:2014-12-26 22:55:37
5 [报告]
发表于 2008-03-04 16:06 |只看该作者
顺便说一下,在10.2.0.2以后,不需要用/dev/raw了,直接用/dev/sdxx后者/dev/XXVG/xxlv
将来在LINUX下面,raw会被废除。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP