重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 453|回复: 0
打印 上一主题 下一主题

[参考文档] 12.2 Flex diskgroup quota management

[复制链接]
跳转到指定楼层
楼主
发表于 2025-7-20 12:29:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
目标:
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

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-18 03:02 , Processed in 0.268514 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表