asm管理二
来源:互联网 发布:java socket网络编程 编辑:程序博客网 时间:2024/04/28 18:37
创建磁盘组
假设asm_diskstring初始化参数设置成/devices/*,下面的磁盘被asm发现
ASM disk discovery identifies the following disks in directory /devices
.
/devices/diska1
/devices/diska2
/devices/diska3
/devices/diska4
/devices/diskb1
/devices/diskb2
/devices/diskb3
/devices/diskb4
The disks
diska1
-diska4
are on a separate SCSI controller from disksdiskb1
-diskb4
.
SQL> STARTUP NOMOUNT
SQL> CREATE DISKGROUP dgroup1 NORMAL REDUNDANCY
2 FAILGROUP controller1 DISK
3 '/devices/diska1',
4 '/devices/diska2',
5 '/devices/diska3',
6 '/devices/diska4'
7 FAILGROUP controller2 DISK
8 '/devices/diskb1',
9 '/devices/diskb2',
10 '/devices/diskb3',
11 '/devices/diskb4';
添加磁盘组
Adding Disks to a Disk Group: Example 1 The following statement adds disks to dgroup1:
ALTER DISKGROUP dgroup1 ADD DISK '/devices/diska5' NAME diska5, '/devices/diska6' NAME diska6;
Because no FAILGROUP
clauses are included in the ALTER DISKGROUP
statement, each disk is assigned to its own failure group. TheNAME
clauses assign names to the disks, otherwise they would have been assigned system-generated names.
删除磁盘组
Dropping Disks from Disk Groups: Example 1 This example dropsdiska5
(the operating system independent name assigned to /devices/diska5
in"Adding Disks to a Disk Group: Example 1") from disk group dgroup1
.
ALTER DISKGROUP dgroup1 DROP DISK diska5;
Dropping Disks from Disk Groups: Example 2 This example dropsdiska5
from disk group dgroup1
, and also illustrates how multiple actions are possible with oneALTER DISKGROUP
statement.
alter diskgroup dgroup1 drop disk diska5 add failgroup failgrp1 disk '/devices/diska9' name diska9;
手工平衡一个磁盘组
Manually Rebalancing a Disk Group: Example The following example manually rebalances the disk groupdgroup2
. The command does not return until the rebalance operation is complete.
alter diskgroup dgroup2 rebalance power 5 wait;
挂载和卸载磁盘组
ALTER DISKGROUP dgroup1 MOUNT;
ALTER DISKGROUP ALL DISMOUNT;
检查磁盘组元数据的内部一致性
ALTER DISKGROUP dgroup1 CHECK ALL;
删除磁盘组
如果要删除磁盘组中包含的所有数据文件,你可以指定including contents,默认的是excluding contents.
DROP DISKGROUP dgroup1;
管理磁盘组中的目录
example of a system-generated filename:
+dgroup2/sample/controlfile/Current.256.541956473
The plus sign represents the root of the ASM file system. The dgroup2
directory is the parent directory for all files in thedgroup2
disk group. The sample
directory is the parent directory for all files in thesample
database, and the controlfile
directory contains all control files for thesample
database.
创建目录
Creating a New Directory: Example 1 The following statement creates a hierarchical directory for disk groupdgroup1
, which can contain, for example, the alias name +dgroup1/mydir/control_file1
:
ALTER DISKGROUP dgroup1 ADD DIRECTORY '+dgroup1/mydir';
Creating a New Directory: Example 2 Assuming no subdirectory exists under the directory+dgoup1/mydir
, the following statement fails:
ALTER DISKGROUP dgroup1 ADD DIRECTORY '+dgroup1/mydir/first_dir/second_dir';
重命名目录
系统命名的目录不能重命名
Renaming a Directory: Example The following statement renames a directory:
ALTER DISKGROUP dgroup1 RENAME DIRECTORY '+dgroup1/mydir' TO '+dgroup1/yourdir'管理别名v$asm_alias视图提供了asm实例中的每个别名Adding an Alias Name for an ASM Filename: Example 1 The following statement adds a new alias name for a system-generated file name:
ALTER DISKGROUP dgroup1 ADD ALIAS '+dgroup1/mydir/second.dbf' FOR '+dgroup1/sample/datafile/mytable.342.3';重命名别名Renaming an Alias Name for an ASM Filename: Example The following statement renames an alias:
ALTER DISKGROUP dgroup1 RENAME ALIAS '+dgroup1/mydir/datafile.dbf' TO '+dgroup1/payroll/compensation.dbf';删除别名ALTER DISKGROUP dgroup1 DROP ALIAS '+dgroup1/payroll/compensation.dbf';删除文件及相关的别名Dropping Files and Associated Aliases from a Disk Group: Example 1The following statement uses the alias name for the file to delete both the file and the alias:ALTER DISKGROUP dgroup1 DROP FILE '+dgroup1/payroll/compensation.dbf';Dropping Files and Associated Aliases from a Disk Group: Example 2In this example the system-generated filename is used to drop the file and any associated alias:ALTER DISKGROUP dgroup1 DROP FILE '+dgroup1/sample/datafile/mytable.342.372642';管理模板当磁盘组被创建了,asm为磁盘组创建一些默认的模板,对每种类型的文件都有模板。v$asm_template视图提供了asm中的所有模板。模板属性Table 12-3 Permitted Values for ASM Template Striping Attribute
Striping Attribute Value Description FINE
Striping in 128KB chunks.COARSE
Striping in 1MB chunks.Table 12-4 Permitted Values for ASM Template Redundancy Attribute
Redundancy Attribute Value Resulting Mirroring in Normal Redundancy Disk Group Resulting Mirroring in High Redundancy Disk Group Resulting Mirroring in External Redundancy Disk Group MIRROR
2-way mirroring3-way mirroring(Not allowed)HIGH
3-way mirroring3-way mirroring(Not allowed)UNPROTECTED
No mirroring(Not allowed)No mirroringTable 12-5 ASM System Default Templates Attribute Settings
Template Name Striping Mirroring, Normal Redundancy Disk Group Mirroring, High Redundancy Disk Group Mirroring, External Redundancy Disk Group CONTROLFILE
FINE
HIGH
HIGH
UNPROTECTED
DATAFILE
COARSE
MIRROR
HIGH
UNPROTECTED
ONLINELOG
FINE
MIRROR
HIGH
UNPROTECTED
ARCHIVELOG
COARSE
MIRROR
HIGH
UNPROTECTED
TEMPFILE
COARSE
MIRROR
HIGH
UNPROTECTED
BACKUPSET
COARSE
MIRROR
HIGH
UNPROTECTED
PARAMETERFILE
COARSE
MIRROR
HIGH
UNPROTECTED
DATAGUARDCONFIG
COARSE
MIRROR
HIGH
UNPROTECTED
FLASHBACK
FINE
MIRROR
HIGH
UNPROTECTED
CHANGETRACKING
COARSE
MIRROR
HIGH
UNPROTECTED
DUMPSET
COARSE
MIRROR
HIGH
UNPROTECTED
XTRANSPORT
COARSE
MIRROR
HIGH
UNPROTECTED
AUTOBACKUP
COARSE
MIRROR
HIGH
UNPROTECTED
想磁盘组中添加模板ALTER DISKGROUP disk_group_name ADD TEMPLATE template_name ATTRIBUTES ([{MIRROR|HIGH|UNPROTECTED}] [{FINE|COARSE}]);Adding Templates to a Disk Group: Example 1 The following statement creates a new template named
reliable
for the normal redundancy disk groupdgroup2
:ALTER DISKGROUP dgroup2 ADD TEMPLATE reliable ATTRIBUTES (HIGH FINE);Adding Templates to a Disk Group: Example 2 This statement creates a new template named
unreliable
that specifies files are to be unprotected (no mirroring). (Oracle discourages the use of unprotected files unless hardware mirroring is in place; this example is presented only to further illustrate how the attributes for templates are set.)ALTER DISKGROUP dgroup2 ADD TEMPLATE unreliable ATTRIBUTES (UNPROTECTED);修改磁盘组模板Modifying a Disk Group Template: Example The following example changes the striping attribute specification of the
reliable
template for disk groupdgroup2
.ALTER DISKGROUP dgroup2 ALTER TEMPLATE reliable ATTRIBUTES (COARSE);删除磁盘模板Dropping Templates from a Disk Group: Example This example drops the previously created template
unreliable
fromdgroup2
:ALTER DISKGROUP dgroup2 DROP TEMPLATE unreliable;
- asm管理二
- ASM管理
- asm二
- ASM三 管理ASM实例
- ASM创建与管理
- ASM管理学习
- ASM管理实践
- ORACLE ASM 管理
- Oracle ASM 日常管理
- ASM管理DG过程
- ASM磁盘管理总结
- ASM技术 diskgroup管理
- ASM实例管理
- ASM简单管理
- Oracle ASM 管理
- 管理ASM磁盘组
- 管理Oracle ASM实例
- Oracle ASM操作管理
- ListIterator
- H.264分析器
- Oracle最大值加1
- ZOJ Problem Set - 2001 Adding Reversed Numbers
- 【Python Challenge-4】linkedlist
- asm管理二
- 麻将网络模块分析
- Oracle字段包含其他字段
- ListView添加header问题
- Cracking the Coding Interview Q2.2
- Js参数值中含有单引号或双引号解决办法
- BFS ZOJ 3814 Sawtooth Puzzle
- JavaScript面向对象 组合使用构造函数模式和原型模式
- 百度 一面 面试题 移动端 2015