oracle11g查看asm磁盘组中有哪些设备
答案:1 悬赏:50 手机版
解决时间 2021-03-26 15:26
- 提问者网友:骨子里的高雅
- 2021-03-26 01:12
oracle11g查看asm磁盘组中有哪些设备
最佳答案
- 五星知识达人网友:一秋
- 2021-03-26 01:21
磁盘组操作,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.
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.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯