永发信息网

oracle11G对ASM磁盘组加磁盘操作中一条语句求详解

答案:2  悬赏:70  手机版
解决时间 2021-02-24 00:17
oracle11G对ASM磁盘组加磁盘操作中一条语句:

chdev -l hdisk6 -a reserve_policy=no_reserve -a pv=clear

求详解,这条语句的详细意思和在哪些情况下需要用到
最佳答案
Oracle RAC需要将reserve_lock(reserve_policy)设置成NO或no_reserve,目的是因为RAC 需要并发的共享盘,所以盘不能被一台机器锁住。

官方文档相关内容如下
To enable simultaneous access to a disk device from multiple nodes, you must set the appropriate Object Data Manager (ODM) attribute, depending on the type of reserve attribute used by your disks. The following section describes how to perform this task using hdisk logical names. Refer to your operating system documentation to find logical device names.

To determine the reserve setting your disks use, enter the following command, where n is the hdisk device number:

# lsattr -E -l hdiskn | grep reserve_
The response is either a reserve_lock setting, or a reserve_policy setting. If the attribute is reserve_lock, then ensure that the setting is reserve_lock = no. If the attribute is reserve_policy, then ensure that the setting is reserve_policy = no_reserve.

If necessary, change the setting with the chdev command using the following syntax, where n is the hdisk device number:

chdev -l hdiskn -a [ reserve_lock=no | reserve_policy=no_reserve ]
For example, to change a setting for the device hdisk4 from reserve_lock=yes to reserve_lock=no, enter the following command:

# chdev -l hdisk4 -a reserve_lock=no
To verify that the setting is correct on all disk devices, enter the following command:

# lsattr -El hdiskn | grep reserve
全部回答
磁盘组操作,grid用户下: sqlplus /nolog 1 sql> conn / as sysasm 查询现有磁盘组及磁盘信息: sql> select group_number gno,name,state,type,total_mb,free_mb,required_mirror_free_mb rmfmb,usable_file_mb ufmb from v$asm_diskgroup; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 gno name state type total_mb free_mb rmfmb ufmb ---------- ------------------------------ ------------ ---------- ---------- ---------- ---------- 1 dg1 mounted normal 4076 575 879 -152 2 dg2 mounted normal 4076 3531 139 1696 sql> sql> col name format a10 sql> col fgno format a20 sql> select group_number gno,name,failgroup fgno,state,total_mb,free_mb,header_status from v$asm_disk; gno name fgno state total_mb free_mb header_status ---------- ---------- -------------------- ---------------- ---------- ---------- ------------------------ 0 normal 0 0 provisioned 0 normal 0 0 provisioned 1 vol1 vol1 normal 1019 141 member 1 vol2 vol2 normal 1019 144 member 1 vol3 vol3 normal 1019 140 member 1 vol4 vol4 normal 1019 150 member 2 vol5 vol5 normal 1019 880 member 2 vol6 vol6 normal 1019 883 member 2 vol7 vol7 normal 1019 885 member 2 vol8 vol8 normal 1019 883 member 10 rows selected. --创建磁盘组 sql> create diskgroup dg3 normal redundancy disk 'orcl:vol9','orcl:vol10'; 1 2 3 4 5 6 diskgroup created. 或: sql> create diskgroup dg3 normal redundancy disk 'orcl:vol9' disk 'orcl:vol10'; diskgroup created. --添加磁盘 1 2 3 4 sql> alter diskgroup dg1 add disk 'orcl:vol9'; diskgroup altered. --删除磁盘 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 sql> alter diskgroup dg1 drop disk vol9; diskgroup altered. sql> select group_number gno,name,failgroup fgno,state,total_mb,free_mb,header_status from v$asm_disk; gno name fgno state total_mb free_mb header_status ---------- ------------------------------ -------------------- ---------------- ---------- ---------- ------------------------ 0 normal 0 0 former 1 vol1 vol1 normal 1019 284 member 1 vol2 vol2 normal 1019 286 member 1 vol3 vol3 normal 1019 284 member 1 vol4 vol4 normal 1019 287 member 2 vol5 vol5 normal 1019 880 member 2 vol6 vol6 normal 1019 883 member 2 vol7 vol7 normal 1019 885 member 2 vol8 vol8 normal 1019 883 member 1 vol9 vol9 dropping 1019 451 member 10 rows selected. --取消删除 1 alter diskgroup dg1 undrop disks; --调整大小 1 alter diskgroup dg1 resize disk vol4 size 1024 m --unmount和mount磁盘组 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 sql> alter diskgroup dg3 dismount; diskgroup altered. sql> select group_number gno,name,state,type,total_mb,free_mb,required_mirror_free_mb rmfmb,usable_file_mb ufmb from v$asm_diskgroup; gno name state type total_mb free_mb rmfmb ufmb ---------- ------------------------------ ---------------------- ------------------------------ ---------- ---------- ---------- ---------- 1 dg1 mounted normal 4076 575 879 -152 2 dg2 mounted normal 4076 3531 139 1696 0 dg3 dismounted sql> alter diskgroup dg3 mount; diskgroup altered.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
梦里遇见我喜欢的女人是什么意思?请大家来解
有个词叫XX而行,还是XX独行的,意思是一个人
这个极限怎么求,帮我看看错在哪
Aのように略して记载する的翻译是:什么意思
印刷广告这个地址在什么地方,我要处理点事
落叶没有声打一个数字0―9
警察锅哥第二季
请问,在张店火车站附近到博山,有没有直达的
华创商行这个地址在什么地方,我要处理点事
中公教育2014年内蒙古公务员考试成绩查询入口
已知左移移位寄存器现态为1101,其次态应为
为什么问道手游国色天香这个区不能激活
求助,重装win7系统后,键鼠不能用,都为usb
徐州玫彩佳人女子形象设计室地址在哪,我要去
我的世界电脑版怎么去村庄的监狱
推荐资讯
关于晨昏线的错误叙述是A. 晨昏线上的太阳高
轩麦h30f立式和面机多少钱
谁知道昌河福瑞达6390le3多少钱怎么样
袁家沟怎么去啊,有知道地址的么
心有守护,所以强大
牙刷软毛价格,牙刷排行榜,牙刷哪个牌子好
朗讯通信技术有限公司地址在什么地方,想过去
怎样既可以欺负弱小,又不损害自己的名誉
山水人家农家乐我想知道这个在什么地方
(2005)半导体二极管的正向伏安(V-A)特性是一
振兴装饰材料大全这个地址在什么地方,我要处
2016山东工地钢筋小料加工多少钱一平米?
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?