`

AIX平台下磁盘的PVID对ASM磁盘的破坏

 
阅读更多

  这篇文章将通过两篇MOS文章来讨论AIX平台下为磁盘分配PVID对ASM磁盘的破坏。

文章一:
   这篇文章说明的是对一个存在的ASM磁盘分配PVID将破坏ASM的磁盘头,导致ASM磁盘组无法正常MOUNT。

Assigning a Physical Volume ID (PVID) To An Existing ASM Disk Corrupts the ASM Disk Header (文档 ID 353761.1)
修改时间:2013-4-19类型:ALERT

In this Document

 

  Description

 

  Occurrence

 

  Symptoms

 

  Workaround

 

  History

 

  References

 


 

 

 

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
IBM AIX on POWER Systems (64-bit)
***Checked for relevance on 30-Apr-2010***

AIX5L Based Systems (64-bit)

DESCRIPTION

 

Assigning a Physical Volume ID (PVID) to an existing ASM disk will destroy the ASM disk header rendering the
ASM disk unusable.

Various documents including the 10gR1 and 10gR2 installation instructions for AIX platforms suggest to assign
a PVID to disks to be used for ASM using the following command:
  

 

  # /usr/sbin/chdev -l hdiskn -a pv=yes

 


These documents furthermore suggest that this command is to be run on ALL nodes of a RAC cluster. This
does not present a problem as long as the disks have not yet been used by ASM. If however the disk are 
already in use and above command is issued against an ASM disk the file header will be destroyed. 
This is likely to happen if a new node is added to an existing RAC cluster as the documentation seems
to imply this has to be done on all nodes.

To check if a device has an associated PVID , use lspv:
EXAMPLE:


# lspv

hdisk0 0003286f04bc73ee rootvg active
hdisk1 0003286f867d77e1 rootvg active
hdisk2 0003286fb3470dae vg01 active
hdisk3 0003286fb3474190 vg01 active
hdisk4 0003286fb34747d1 vg01 active
hdisk5 0003286fb3474dff vg01 active
hdisk6 0003286fb3475428 vg01 active
hdisk7 0003286fb347607d vg01 active
hdisk8 0003286fb34766f3 vg01 active
hdisk9 0003286fb3476d70 vg01 active
hdisk10 0003286fb34773d5 vg01 active
hdisk11 0003286fb34780b8 vg01 active
hdisk12 0003286fb347872f vg01 active
hdisk13 0003286fb347940c vg01 active
hdisk14 0003286fb3479a7b vg01 active

The second column is the PVID.

 

OCCURRENCE

 

This is more likely to happen in a RAC environment, specifically if a new node is added to an existing
cluster.

 

SYMPTOMS

 

If the 'chdev' command is run while ASM instances have the disk mounted nothing will be noticed immediately 
as the disk header is only read when the disk is mounted. If however the diskgroup is unmounted and re-mounted
(e.g. ASM instance restart) the disk is no longer recognized as an ASM disk and the diskgroup mount will fail
with 
ORA-15063 "diskgroup \"%s\" lacks quorum of %s PST disks; %s found"
or
ORA-15063: ASM discovered an insufficient number of disks for diskgroup s%
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "%" is missing

 

WORKAROUND

 

Do not assign a PVID to ASM disks, contrary to the documentation PVIDs are not required for ASM disks 
as ASM uses the ASM disk header to discover it's disks. 
This has been addressed in (Documentation)  Bug 3636335 which states:

 

       "This is a doc. bug and we are going to clearly document not to put PVIDs on
        disks given to ASM. The idea here is that ASM is the one which manages the
        disk and not any OS / vendor volume managers etc., PVIDs are needed for volume
        groups to work. For ASM to work, PVIDs are not needed. ASM has its own headers
        to identify the disk which is what is getting written here. "

 

As long as there is still an ASM instance which has the disk(group) mounted the 
contents may be backed up via RMAN as soon as possible.

Also the action plan from the Document 750016.1 can be applied. Also recommend to raise an SR with Oracle Support.

 

HISTORY

 

 Checked for relevance on 18-APR-2013

 

REFERENCES

BUG:3636335 - PVID IN DISK HEADER IS OVERWRITTEN AFTER ADDING A NEW DISK TO ASM DISKGROUP
NOTE:750016.1 - Corrective Action for ASM Diskgroup with Disks Having PVIDs on AIX


文章二:
    这篇文章解释了两方面的问题,其一,如 果在创建ASM磁盘组之前所属的ASM磁盘就有了PVID,磁盘组创建成功将磁盘头的PVID信息覆盖掉,但由于磁盘的PVID信息会存在磁盘头和ODM 库中,服务器一旦重启,AIX会尝试用ODM库中的PVID重新覆盖磁盘头,从而破坏ASM磁盘头。其二,如果出现了上述情况,在没有重启操作系统之前如 何清除磁盘的PVID。

Corrective Action for ASM Diskgroup with Disks Having PVIDs on AIX (文档 ID 750016.1)
修改时间:2013-4-7类型:HOWTO

In this Document

 

  Goal

 

  Solution

 

  References

 


 

 

 

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.2 [Release 10.1 to 11.2]
IBM AIX on POWER Systems (64-bit)
IBM AIX Based Systems (64-bit)

GOAL

 

You have created a diskgroup with disks having PVID and the diskgroup is in use. There is no diskgroup metadata corruption reported yet. You now know that ASM Disk should not have PVID as alerted in MetaLink Note 353761.1 

This note will give the steps to clear the PVID of these ASM Disks.

 

SOLUTION

 

When the PVID is set to a disk in a volume group, the PVID is stored in two locations. In Physical disk header ( within first 4K )and in AIX's system object database, called ODM ( Object Data Manager ). 

When the diskgroup is created, the disk header information of PVID is overwritten. However, with reboot the OS, from ODM, AIX might try to restore the PVID information onto the disk header, 
there by destroying the ASM metadata. 

If the ASM disk header Metadata has not been over written by PVID from ODM ( before a reboot ), then you can follow the following steps to update the ODM not to have PVID for the disks:

1] Do not reboot any node.

1.1] Drop one disk at a time from the diskgroup.

1.2] Clear the PVID of the dropped disk

# chdev -l hdisk5 -a pv=clear

Run this on ALL the nodes in case of RAC.

1.3] Check the disk does not have the PVID from ALL the nodes

# lspv

1.4] Add the disk back to the diskgroup

1.5] Do this for all the disks having PVID in the diskgroup, one by one. Take care that the rebalance is complete from the drop/add disk command before going for the next disk.

OR

2] This needs downtime:

2.1] Take 'dd' backup of the disk headers

# dd if=/dev/hdisk5 of=/tmp/d5.txt bs=1024 count=1024

2.2] Shutdown ASM instance ( on ALL the nodes in RAC setup ).

2.3] Clear the PVID

# chdev -l hdisk5 -a pv=clear

Run this on ALL the nodes in case of RAC.

2.4] Check the disk does not have the PVID from ALL the nodes

# lspv

2.5] Start the ASM Instance(s) and mount the diskgroup on ALL the nodes


WARNING:
Point-2 commands overrides the content of the disk header and so could be destructive if not correctly used. If you have any doubt, raise an SR with Oracle Support before any action. 


总结:
    不管是手动还是AIX自动为磁盘分配PVID都将破坏ASM磁盘头,导致ASM磁盘组无法加载。为了避免出现这种情况,我们应该遵守以下的规则:
1).确保在创建ASM磁盘组之前,清除所有节点所有ASM需要使用的磁盘的PVID。
2).磁盘组一旦创建成功,应该避免对ASM磁盘手动分配PVID。
3).磁盘组一旦创建成功,应该手动执行ASMCMD工具下的md_backup命令对磁盘组元数据进行备份。
4).在规划的时候,建议每次磁盘组由两个以上的ASM磁盘组成。

 

参考至:http://blog.itpub.net/23135684/viewspace-1079207/

如有错误,欢迎指正

邮箱:czmcj@163.com

分享到:
评论

相关推荐

    AIX下物理磁盘满,添加磁盘空间,实操

    以下是一个详细的步骤指南,介绍了如何在AIX环境下增加磁盘空间。 首先,我们需要了解当前磁盘的状态。通过执行`df -Ig`命令,我们可以查看文件系统的磁盘空间使用情况。这个命令会列出所有挂载点的大小、已用空间...

    AIX 系统中 PVID 的含义与作用

    AIX 系统中 PVID 的含义与作用AIX 系统中 PVID 的含义与作用

    AIX发现磁盘创建文件系统

    ### AIX新增硬盘,创建VG和文件系统的详细过程 #### 一、检查与准备 **1.1 检查存储资源是否被系统识别** 在进行任何操作之前,首先需要确保新添加的硬盘已经被系统正确识别。这一步骤至关重要,因为只有当系统...

    AIX更换本地磁盘

    ### AIX更换本地磁盘操作指南 在AIX操作系统中,更换本地磁盘是一项常见的维护工作,尤其是在磁盘出现故障或需要升级时。本文将基于提供的文件信息,详细阐述如何安全地更换AIX系统中的本地磁盘,并确保系统的稳定...

    aix下的oracle10-为Oracle Clusterware和数据库配置裸磁盘设备(不使用IBM HACMP或GPFS)

    ### AIX 下 Oracle 10g RAC 配置裸磁盘设备详解 #### 概述 在AIX操作系统上部署Oracle 10g RAC(Real Application Clusters)时,通常需要配置共享存储来支持Oracle Clusterware和数据库实例。本文档详细介绍了如何...

    AIX服务器磁盘操作命令汇总.docx

    本文将汇总AIX服务器上对磁盘进行操作的命令,特别是针对rootvg的管理。rootvg是AIX系统默认的卷组,包含了操作系统的核心文件系统。 首先,当有新的硬盘接入系统时,可以使用`cfgmgr -v`命令来检测硬件变更。例如...

    AIX平台上Oracle 10g RAC 架构选型的最佳实践

    本文将基于给定的文档摘要内容,详细阐述在AIX平台下Oracle 10g RAC架构选型的最佳实践。 #### RAC Interconnect Configuration: 10g 在Oracle 10g RAC环境中,网络配置对于确保集群成员之间的高效通信至关重要。与...

    IBM-AIX——查看硬件设备信息(如序列号等).doc

    本文将基于“IBM-AIX——查看硬件设备信息(如序列号等)”这一主题,详细解析AIX环境下如何查看和验证包括机器型号、序列号、操作系统版本、CPU信息、内存信息以及外存信息在内的关键硬件设备数据。 ### 第一章:...

    AIX存储管理之将磁盘配置为PV.docx

    4. **特殊情况处理**:在某些情况下,系统可能不允许重启,或者`cfgmgr`命令无法识别磁盘。这时可能需要使用更详细的硬件信息(如硬盘类型、子类、父设备名和位置编号)来手动创建物理卷。例如,`mkdev-c disk -s ...

    Oracle数据库从aix裸设备到ASM存储的迁移过程.pdf

    - 用`root`用户执行本地配置删除和添加操作,然后移除ASM磁盘的PVID。 - 将裸设备的读写权限赋予`oracle`用户,以便用户能够访问这些设备。 - 编辑ASM初始化参数文件(`init+ASM.ora`),定义ASM磁盘组(如`asm_...

    由于PVID和VID的设置不合理引起的故障分析

    通过对PVID和VID的合理配置,可以有效地避免数据包误入错误的VLAN而导致的网络访问问题。在多层网络架构中,确保上行接口和下行接口之间的PVID一致性至关重要,尤其是在涉及到不同VLAN间的通信时。此外,正确理解和...

    AIX存储管理之对物理卷的增删改操作.docx

    这将使`hdisk2`成为物理卷,并为其分配一个唯一的物理卷标识符(PVID),同时将PVID写入硬盘的引导记录中。 了解物理卷的状态和属性是进行管理的前提。可以使用以下命令来查看相关信息: 1. `lsdev -Cc disk`:列...

    AIX克隆操作方法(alt_disk_install).pdf

    AIX克隆操作方法(alt_disk_install) ...AIX克隆操作方法是指使用alt_disk_install命令来克隆系统磁盘的过程,涉及到硬盘扫描、配置磁盘信息、解镜像操作、克隆命令、克隆元成后的硬盘状态等方面的知识点。

    VLAN中的PVID与VID详解.docx

    ### VLAN中的PVID与VID详解 #### 一、概述 VLAN(Virtual Local Area Network,虚拟局域网)技术在现代网络架构中扮演着至关重要的角色。它通过逻辑方式将物理网络划分为多个独立的子网,从而实现更加灵活、安全的...

    AIX双机热备的在线扩容文件系统

    AIX双机热备的在线扩容文件系统是一项复杂但必要的任务,它能够保证在不中断服务的情况下,有效地利用和扩展存储资源,从而提高系统的可用性和性能。理解并熟练掌握这一过程对于任何AIX管理员来说都是至关重要的。

    AIX安装HA实验过程!!!!!.docx

    集群中的磁盘识别依赖PVID,为避免混淆,建议磁盘和VG名称保持一致,VG的MajorNumber也需要规划。HACMP 5.1之后不再使用.rhosts文件,而是使用clcomd进程进行控制。 3. **系统升级**: 确保AIX版本满足HACMP ...

Global site tag (gtag.js) - Google Analytics