重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛
标题:
12.2 Flex diskgroup quota management
[打印本页]
作者:
刘泽宇
时间:
2025-7-20 12:29
标题:
12.2 Flex diskgroup quota management
目标:
Distinct databases that use ASM for storage management. Quota management allows ASM administrators to control storage consumption.
细节:
1. Create a diskgroup with flex redundancy
2. Create quota group
ALTER DISKGROUP flex_dg ADD QUOTAGROUP QuotaGroup_QGRP1 SET 'quota'= '10m';
ALTER DISKGROUP flex_dg ADD QUOTAGROUP Quota_GRP3 SET quota = 300M;
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 10228 2452 0 2452 0 Y DATA/
MOUNTED FLEX N 512 512 4096 4194304 15336 6728 0 2242 0 N FLEX_DG/
ASMCMD> lsqg -G FLEX_DG
Quotagroup_Num Quotagroup_Name Incarnation Used_Quota_MB Quota_Limit_MB
1 GENERIC 1 8032 4294967295
ASMCMD> lsqg -G FLEX_DG
Quotagroup_Num Quotagroup_Name Incarnation Used_Quota_MB Quota_Limit_MB
1 GENERIC 1 8032 4294967295
2 QUOTA_GRP1 1 0 250
3. Assign the filegroup to PDBs as below
ALTER DISKGROUP flex_dg ADD FILEGROUP FileGroup_PDBorcl DATABASE PDBORCL SET 'quota_group' = 'Quota_GRP1';
SQL> !asmcmd lsfg
Group Number FileGroup Number Incarnation Name Client Type Client Name QuotaGroup Number QuotaGroup Incarn
2 0 1 DEFAULT_FILEGROUP 0 1 1
2 1 1 ORCL 1 ORCL 1 1
2 2 1 ORCL_PDB$SEED 1 ORCL_PDB$SEED 1 1
2 3 1 PDBORCL 1 PDBORCL 1 1
SQL> ALTER DISKGROUP flex_dg ADD FILEGROUP FileGroup_PDB DATABASE PDBORCL SET 'quota_group' = 'Quota_GRP1';
Diskgroup altered.
SQL> !asmcmd lsfg
Group Number FileGroup Number Incarnation Name Client Type Client Name QuotaGroup Number QuotaGroup Incarn
2 0 1 DEFAULT_FILEGROUP 0 1 1
2 1 1 ORCL 1 ORCL 1 1
2 2 1 ORCL_PDB$SEED 1 ORCL_PDB$SEED 1 1
2 3 1 PDBORCL 1 PDBORCL 1 1
2 4 1 FILEGROUP_PDB 1 PDBORCL 2 1
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 10228 2452 0 2452 0 Y DATA/
MOUNTED FLEX N 512 512 4096 4194304 15336 6728 0 2242 0 N FLEX_DG/
ASMCMD> lsqg
Group_Num Quotagroup_Num Quotagroup_Name Incarnation Used_Quota_MB Quota_Limit_MB
2 1 GENERIC 1 8032 4294967295
2 2 QUOTA_GRP1 1 0 250
4. We can modify the quota group to PDBs as below
ASMCMD> lsqg
Group_Num Quotagroup_Num Quotagroup_Name Incarnation Used_Quota_MB Quota_Limit_MB
2 1 GENERIC 1 8032 4294967295
2 2 QUOTA_GRP1 1 0 250
2 3 QUOTA_GRP2 1 0 300
ALTER DISKGROUP flex_dg MODIFY FILEGROUP FileGroup_PDBorcl SET 'quota_group' = 'QUOTA_GRP2';
SQL> ALTER DISKGROUP flex_dg MODIFY FILEGROUP FileGroup_PDB SET 'quota_group' = 'QUOTA_GRP2';
Diskgroup altered.
SQL> !asmcmd
ASMCMD> lsfg
Group Number FileGroup Number Incarnation Name Client Type Client Name QuotaGroup Number QuotaGroup Incarn
2 0 1 DEFAULT_FILEGROUP 0 1 1
2 1 1 ORCL 1 ORCL 1 1
2 2 1 ORCL_PDB$SEED 1 ORCL_PDB$SEED 1 1
2 3 1 PDBORCL 1 PDBORCL 1 1
2 4 1 FILEGROUP_PDB 1 PDBORCL 3 1
ASMCMD> lsqg
Group_Num Quotagroup_Num Quotagroup_Name Incarnation Used_Quota_MB Quota_Limit_MB
2 1 GENERIC 1 8032 4294967295
2 2 QUOTA_GRP1 1 0 250
2 3 QUOTA_GRP2 1 0 300
欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2