这是新的磁盘,还没创建磁盘组
验证新分配的磁盘,并确保所有新分配的新磁盘大小相同。
select name, path, group_number group_#, disk_number disk_#, mount_status, header_status, state,
os_mb/1024 from gv$asm_disk where mount_status = 'CLOSED' order by inst_id, name, path;
select group_number, disk_number, name, total_mb, free_mb, path
from v$asm_disk
select NAME,TOTAL_MB/(1024) TOTAL_GB,FREE_MB/1024 FREE_GB,(TOTAL_MB-FREE_MB)/1024
USED_GB,(FREE_MB/TOTAL_MB)*100 FREE_PER from v$asm_diskgroup;
select group_number, name, total_mb, free_mb
from v$asm_diskgroup
创建磁盘组,在次观查
create diskgroup LH_TEST normal redundancy disk '/dev/oracleasm/disks/TEST1','/dev/oracleasm/disks/TEST2';
这里面少了两块磁盘
select dg.NAME,ds.NAME,ds.MOUNT_STATUS,ds.HEADER_STATUS,ds.MODE_STATUS,ds.STATE,ds.FAILGROUP,
ds.LABEL,ds.PATH from v$asm_diskgroup dg,v$asm_disk ds
where dg.GROUP_NUMBER=ds.GROUP_NUMBER and dg.NAME='LH_TEST';
创建表空间
Create tablespace TEST_TS datafile '+LH_TEST' size 6G;
没地方了
alter tablespace TEST_TS add datafile '+LH_TEST' size 6G;
少加点吧
alter tablespace TEST_TS add datafile '+LH_TEST' size 3G;
增加磁盘到
alter diskgroup LH_TEST add disk '/dev/oracleasm/disks/TEST3';
等等后
删除磁盘组中的磁盘
找到要删除的磁盘
select DISK_NUMBER,name ,PATH, MOUNT_DATE from v$asm_disk;
alter diskgroup LH_TEST drop disk LH_TEST_0002;
加速用的,不太会用
ALTER DISKGROUP LH_TEST REBALANCE POWER 8 NOWAIT;