ASM关于添加与删除磁盘组(DISKGROUP)

本文档介绍了Oracle ASM(Automatic Storage Management)如何创建和删除磁盘组。在创建磁盘组时,ASM会检查磁盘是否已属于其他组,如果已加入其他组,使用NOFORCE参数会导致错误。同时,可以使用FAILGROUP子句为故障组命名。删除磁盘组时,必须确保所有文件关闭且ASM实例已启动并挂载。删除操作会清除磁盘上的ASM格式信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

官方地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/storeman.htm#i1007979

 

 Creating a Disk Group

     TheASM instance ensures that any disk being included in the newlycreated disk group is addressable and is not already a member ofanother disk group. This requires reading the first block of thedisk to determine if it already belongs to a disk group. If not, aheader is written. It is not possible for a disk to be a member ofmultiple disk groups.

    If a disk has a header indicates that it is part of another diskgroup, you can force it to become a member of the disk group youare creating by specifying the FORCE clause. Forexample, a disk with an ASM header might have failed temporarily,so that its header could not be cleared when it was dropped fromits disk group. After the disk is repaired, it is no longer part ofany disk group, but it still has an ASM header. TheFORCE flag is required to use the disk in a new diskgroup. The original disk group must not be mounted, and the diskmust have a disk group header, otherwise the operation fails. Notethat if you do this, you may cause another disk group to becomeunusable. If you specify NOFORCE, which is thedefault, you receive an error if you attempt to include a disk thatalready belongs to another disk group.

即是:你如果attempt去添加一个已经属于其他磁盘组的磁盘,在指定关键字NOFORCE(这是CREATEDISKGROUP语句的一个默认值,下地址有关详细信息介绍),你将收到一个错误信息。

 

文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5008.htm#SQLRF01114

 

FAILGROUPClause

 

    Use thisclause to specify a name for one or more failure groups. Ifyou omit this clause, and you have specified NORMAL orHIGH REDUNDANCY, then Oracle Databaseautomatically adds each disk in the disk group to its own failuregroup. The implicit name of the failure group is the sameas the operating system independent disk name (see "NAME Clause").

 

   You cannot specify thisclause if you are creating an EXTERNALREDUNDANCY disk group.

 

 

地址:http://docs.oracle.com/cd/B19306_01/server.102/b14231/storeman.htm#i1020539

Dropping Disk Groups

 

    TheDROP DISKGROUP statement enables you to delete an ASMdisk group and optionally, all of its files. You canspecify the INCLUDING CONTENTS clause if you want anyfiles that may still be contained in the disk group also to bedeleted. The default is EXCLUDING CONTENTS, whichprovides syntactic consistency and prevents you from dropping thedisk group if it has any contents

    The ASMinstance must be started and the disk group must be mounted withnone of the disk group files open, in order for the DROPDISKGROUP statement to succeed. The statement does notreturn until the disk group has been dropped.

    When youdrop a disk group, ASM dismounts the disk group and removes thedisk group name from the ASM_DISKGROUPS initializationparameter if a server parameter file is being used. If a textinitialization parameter file is being used, and the disk group ismentioned in the ASM_DISKGROUPS initializationparameter, then you must remember to remove the disk group namefrom the ASM_DISKGROUPS initialization parameterbefore the next time that you shut down and restart the ASMinstance.

The following statement deletes dgroup1:

DROP DISKGROUP dgroup1;

    Afterensuring that none of the files contained in dgroup1are open, ASM rewrites the header of each disk in the disk group toremove ASM formatting information. The statement does notspecify INCLUDING CONTENTS, so the drop operation willfail if the disk group contains any files.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值