asm中删除无效磁盘组,并修改参数文件

    xiaoxiao2023-03-24  5

    关于asm_diskgroups 参数

    asm_diskgroups参数记录asm实例启动时加载的磁盘组,具体语法如下(摘自官网) PropertyDescriptionParameter typeStringSyntaxASM_DISKGROUPS = diskgroup [, diskgroup ] ...Default valueThere is no default value.ModifiableALTER SYSTEMRange of valuesComma-separated list of strings, of up to 30 charactersReal Application ClustersMultiple instances can have different values.

    Note:

    This parameter may only be specified in an Automatic Storage Management instance.

    ASM_DISKGROUPS specifies a list of names of disk groups to be mounted by an Automatic Storage Management instance at instance startup or when an ALTER DISKGROUP ALL MOUNT statement is issued.

    Automatic Storage Management (ASM) automatically adds a disk group to this parameter when the disk group is successfully created or mounted, and automatically removes a disk group from this parameter when the disk group is dropped or dismounted.

    Issuing the ALTER DISKGROUP...ALL MOUNT or ALTER DISKGROUP...ALL DISMOUNT command does not affect the value of this parameter.

    这个参数是一个动态参数文件。

    案例

    在一个11gRAC 的环境中,一般有三个磁盘组,FRA(存放归档)、DATA(存放数据)、CRS(仲裁盘)。这三个磁盘组是基本的,有的可能有多个data组,我的案例中还有一个 crsmrr (crs的镜像磁盘组)

    su - grid

    conn / as sysdbba 

    show parameter asm_diskgroups

    FRA  CRS DATA CRSMRR

    现在想加一个crs镜像磁盘组 crsmr,替换掉crsmrr

    磁盘组建好,设好兼容性。

    ./ocrconfig -delete +CRSMRR

    ./ocrconfig -add +CRSMR

    ./ocrcheck

    添加成功,此时,想要看看CRSMR是不是随着crs启动而启动

    show parameter asm_diskgroups

    FRA  CRS DATA CRSMRR CRSMR

    CRSMRR磁盘组是正常dismount,并且在crs资源中手动remove

    srvctl remove diskgroup -g CRSMRR -f

    在crsctl stat res -t 中已经显示不到这个磁盘组了。不过在parameter 中还是显示该磁盘组。

    手动修改(上面官方文档的显示的该参数不是静态参数)

    alter system set asm_diskgroups='DATA','FRA','CRS‘,'CRSMR'; 

    再查询

    show parameter asm_diskgroups

    FRA  CRS DATA CRSMR

    转载请注明原文地址: https://ju.6miu.com/read-1202826.html
    最新回复(0)