Operating System - HP-UX
1748235 Members
3458 Online
108759 Solutions
New Discussion юеВ

Re: Restoring database files, using mirroed disk...

 
SOLVED
Go to solution
Shahbaz_1
Regular Advisor

Restoring database files, using mirroed disk...

Hi Friends,
One of the database-datafile was deleted by mistake.
I've the backup of the databaes.
But I want to restore it from the mirrored disk, all the disks in system are mirrored.

How to do it?

Please help me to get it done.

Thanks in Adv

Regards
Shah
Let's share the great thing "THE KNOWLEDGE"
8 REPLIES 8
Scott Van Kalken
Esteemed Contributor

Re: Restoring database files, using mirroed disk...

Theoretically, if the disks are mirrored, if you deleted it, the changes would have been written to the mirror.

Shahbaz_1
Regular Advisor

Re: Restoring database files, using mirroed disk...

Thanks Scott,for the quick response.

Ok, that means, the only use of mirrored disks is when the master disk get crashed.

Can we see the mirroed-disk configuration?

What is the state of second disk (mirroed one) ?

If the master disk or the current disk, get crashed, how to activate the mirroed disk?

please ...

Thanks & Regards
Shah




Let's share the great thing "THE KNOWLEDGE"
T G Manikandan
Honored Contributor

Re: Restoring database files, using mirroed disk...

yes you can see the configuration using

vgdisplay -v /dev/vg00

you can boot the mirrored disk
by rebooting the server.
interrupting the boot process.

boot from the mirrored disk.


Also you can use the setboot
command to set to boot from the mirrored disk.


Thanks
Steven Sim Kok Leong
Honored Contributor

Re: Restoring database files, using mirroed disk...

Hi,

1) If a database datafile on a mirrored filesystem was deleted by mistake, you won't be able to restore it from the mirrored disk simply because all changes (including the deletion) are synchronized with the mirrors. In this case, your only choice is to restore from offline backup tapes.

On the other hand, if a harddisk containing one of your mirrors had crashed, you have the harddisk replaced and you want to resynchronize the mirrors, you will need to use vgcfgrestore and vgsync to synchronize the mirror extents.

Check out the step-by-step HP technical document for restoring your data on a replaced harddisk:

http://support2.itrc.hp.com/service/ciss/doLogin.do?TargetPage=http://support2.itrc.hp.com/service/cki/docDisplay.do?docId=200000058036738

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: Restoring database files, using mirroed disk...

Hi,

>> If the master disk or the current disk, get crashed, how to activate the mirroed disk?

If one of the disks in your mirrored set crashes, your data will continue to be available via the other working disk in the mirror set. There is no need to manually activate the mirrored disk i.e. it is automatically used.

The manual effort needed is with resynchronizing the data on the mirrored disk to the new harddisk replacing the faulty one.

Hope this helps. Regards.

Steven Sim Kok Leong
Bill Hassell
Honored Contributor

Re: Restoring database files, using mirroed disk...

As mentioned, mirroring makes an exact copy of the original. There is no way for the mirroring software to know that you are about to make a mistake. The datafile was deleted and the mirrors made a copy of that task.

The vast majority of reasons to restore data from backup copies is human error...someone typed the wrong command. You'll have to recover the datafile from your backup tape.

HOWEVER: databases often make changes to several at the same time and if you don't restore the entire set of database files, the one missing file may be out of sync with the rest of the data, thus creating database errrors.


Bill Hassell, sysadmin
Shahbaz_1
Regular Advisor

Re: Restoring database files, using mirroed disk...

Thanks every body,

Ok, that means, if one of the disk get crashed, then second will continue.
--But do we get any warning of disk crashed?
or we need to look into some log file ?

When we begin to work on a new server, setup, how should be know that the disks are mirrored?
or what RAID level is implemented?

Can any body, please sugguest me some good, simple notes on "Mirrong, RAID and Oracle".

Thanks

Regards
Shah
Let's share the great thing "THE KNOWLEDGE"
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Restoring database files, using mirroed disk...

Hi,

Usually disk errors are reflected in /var/adm/syslog/syslog.log. If you have EMS or Predictive, they will flag the errors as well.

To check whether a logical volume is mirrored (RAI
D 1) or striped (RAID 0) at the software level, use lvdisplay. Example:

# lvdisplay -v /dev/vgora/lvu1

For I/O performance tuning with Oracle on HP-UX, a google search should suffice. There are quite a number of good performance tuning documents around.

Hope this helps. Regards.

Steven Sim Kok Leong