This discussion is archived
9 Replies Latest reply: May 22, 2013 12:53 PM by 864103 RSS

md_backup

864103 Newbie
Currently Being Moderated
Hi Expert ,
today i read some articals about how to backup ASM metadata vie applying this command ,
please can you confirm if i have 2 diskgroup

+DATA inside this diskgroup i have 6 disk present in node 1 and 2 , so if i have backup on this DG and let's say i lose the disk00
or anyone i can restore the disk00 and then i have rman backup to restore data? if i'm wrong please correct me ?

oracle 11.2.2 ASM RAC under OEL 5.6

Thanks
  • 1. Re: md_backup
    Alvaro Pro
    Currently Being Moderated
    Hello,

    I think you are a bit confused.

    MD_BACKUP command and metadata backup are there for restore operations in case the header and/or the metadata of the diskgroup gets corrupted,preventing you from mounting. It doesn't backup de diskgroup content itself, only it's metadata.

    Your diskgroup +DATA has 6 disks. Because of a thing called stripping, which is by default incorporated in your diskgroup and redundancy (hardware level if it's RAID enabled or set at the ASM level), if disk00 fails, it will trigger an automatic rebalance of the data inside your diskgroup, which will redistribute data among the remaning disks that are online. No data wil be lost, and your database will remain online. You might experience an increase I/O activity during the rebalance.

    Also, this rebalance operation depends on how much free space you have on your diskgroup, because losing a disk will cause you to lose overall disk space. If you are on 90% + used right now, then your rebalance may actually fail due to space constraints.
  • 2. Re: md_backup
    rarain Explorer
    Currently Being Moderated
    You can also refer the similar thread where the md_backup is answered with example.

    How to take ASM database/Instance backup?

    Thanks
  • 3. Re: md_backup
    864103 Newbie
    Currently Being Moderated
    thanks for your feedback this is that i say the md_backup is just for metadata not for data itself , so let's say now i lose the disk00
    and i have md_backup in this case i restore the corrupted disk and then i have valid rman backup so i can restore the data inside this empty disk ?

     if disk01 fails, it will trigger an automatic rebalance of the data inside your diskgroup, which will redistribute data among the remaning disks that are online
    before 3 week i do a mistake by format the header of disk00 in node 1 (fdisk) so when i do ls -l /dev/oracleasm/disks i found 5 disks in node 1
    in node 2 i found all disks and the database is still up can you please tell me what happen in my case ?
    i run the command
    fdisk /dev/sdb
    sdb is marked as asm disk01
  • 4. Re: md_backup
    Dude! Guru
    Currently Being Moderated
    Why do you think that fdisk modifies ASM disk metadata? ASM does not rely on the fdisk partition table of a disk. ASM metadata and data used by your database files are both stored in the usable data areas of the disk. You need to use the dd command or ASM tools to erase ASM metadata.
  • 5. Re: md_backup
    864103 Newbie
    Currently Being Moderated
    thanks for your reply , actually i do the below before 3 weeks
    and i lose the disk01 when i do ls /dev/oracleasm/disks the disk01 is disappear , any way
    now my question is if i take the backup by md_backup and for any reason i lose one of my disk ,
    i can restore the disk only metadata and then i can restore data vie rman ?if iam wrong tell me ?
    fdisk /dev/sdb
  • 6. Re: md_backup
    Dude! Guru
    Currently Being Moderated
    ASM is not a software RAID and does not work on the basis of disks. It uses the free space available on failure groups to provide data redundancy. If you have a ASM diskgroup with normal or high redundancy than loosing a disk should not mean you have to use rman to restore the data. You will however have to repair the missing disk and re-add it to the diskgroup, so that ASM can rebalance and continue to operate normally. You can use the md_restore command to restore disk group information, for instance if you need to rebuild the complete diskgroup. Imagine if you have 50 disks and 10 diskgroups and delete a diskgroup by accident.
  • 7. Re: md_backup
    864103 Newbie
    Currently Being Moderated
    HI , thanks for your time and support ,

    actually my disk-group is not mirror (not high or normal ) is low there is no mirror on disk-group ,
    so when i lose the disk01 on node 1 all the DBMS and ASM instance is done and all services ,scan ip ,
    but on node 2 it's working fine ,

    now just please confirm to be clear to me if i lose the disk01 and i have md-backup it will be easy to me to
    just restore the disk01 and then restore from rman backup and that's it , no need to create new disk ?
  • 8. Re: md_backup
    Dude! Guru
    Currently Being Moderated
    If you do not have any ASM redundancy (external redundancy) then a failure of any device in a diskgroup is going to be fatal and you will have to restore the data content (rman). If your devices use a hardware RAID, ASM won't notice unless the RAID device fails. If you have a shared device and the device fails, all of your nodes that use the device will be affected, sooner or later, depending on what or how long information is being cached.

    For ASM to work, all devices that build a diskgroup must be available. If a failure occurs and you have ASM redundancy then you have a specified time window to fix the underlying hardware issue, or remove the device and re-add the device for ASM to have enough free space top resume it's normal internal rebalance operation to provide redundancy and increase performance.

    The md_backup does not restore a disk. It restores diskgroup metadata that ASM needs in order to control and maintain a diskgroup, such as disk path, disk name, failure groups, attributes, templates and directory structure. Again, ASM is not RAID and does not work on the basis of mirroring disks.
  • 9. Re: md_backup
    864103 Newbie
    Currently Being Moderated
    now i get your point
    md backup utl. is used to backup the ASM metadata(the metadata here is the directory and paths structure of the ASM disk group) in case of your database get corrupted you only need to restore your database backup,in case you ASM disk group get corrupted then you have to rebuild your ASM disk group after that you have rebuild the Directory structure(metadata) that is taken using MD_backup utility previously....then restore your database backup)
    thanks man

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points