得之坦然,失之淡然,争其必然,顺其自然!
(63)
(2)
(22)
(39)
分类: oracle
2013-02-07 15:29:00
磁盘组操作,grid用户下:
sqlplus /nolog
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;
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';
diskgroup created. 或: sql> create diskgroup dg3 normal redundancy disk 'orcl:vol9' disk 'orcl:vol10'; diskgroup created.--添加磁盘
sql> alter diskgroup dg1 add disk 'orcl:vol9'; diskgroup altered.--删除磁盘
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.
--取消删除
alter diskgroup dg1 undrop disks;--调整大小
alter diskgroup dg1 resize disk vol4 size 1024 m
--unmount和mount磁盘组
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.
上一篇:
下一篇: