Monday, March 28, 2011

Cleaning Oracle ASM disk headers


I wanted to create a new ASM diskgroup using asmca, so I started asmca as user oracle.

When asmca was up i could not see the disks that were available as CANDIDATES




The Header Status on some of the  disks were FORMER and MEMBER. From the Oracle docs
Per-instance status of the disk as seen by discovery:
  • UNKNOWN - Automatic Storage Management disk header has not been read
  • CANDIDATE - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement
  • INCOMPATIBLE - Version number in the disk header is not compatible with the Automatic Storage Management software version
  • PROVISIONED - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement. The PROVISIONED header status is different from the CANDIDATE header status in that PROVISIONED implies that an additional platform-specific action has been taken by an administrator to make the disk available for Automatic Storage Management.
  • MEMBER - Disk is a member of an existing disk group. No attempt should be made to add the disk to a different disk group. The ALTER DISKGROUP statement will reject such an addition unless overridden with the FORCE option.
  • FORMER - Disk was once part of a disk group but has been dropped cleanly from the group. It may be added to a new disk group with the ALTER DISKGROUP statement.
  • CONFLICT - Automatic Storage Management disk was not mounted due to a conflict
  • FOREIGN - Disk contains data created by an Oracle product other than ASM. This includes datafiles, logfiles, and OCR disks.


    It's good to clean the ASM disk headers if the disks have been used before, and you want to start fresh. I did the following to clean the disk headers on three of the disks that I planned to use for the diskgroup.



    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk12
    1000+0 records in.
    1000+0 records out.
    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk11
    1000+0 records in.
    1000+0 records out.
    isvp18> dd if=/dev/zero bs=8k count=1000 of=/dev/rhdisk13
    1000+0 records in.
    1000+0 records out.




After that my disk were available to asmca as candidates.

 


No comments: