Operating System - HP-UX
1836459 Members
2546 Online
110101 Solutions
New Discussion

Replacing disk on a live Oracle db.

 
SOLVED
Go to solution
William Pribble
Frequent Advisor

Replacing disk on a live Oracle db.

I am running HP-UX 11.0 and have a Oracle db installed on the same machine. I need to replace the disk. It is mirrored and hot swappable. Has anyone tried this on a live db? Any information provided would be greatly appreciated. Thanks..
6 REPLIES 6
Carol Garrett
Trusted Contributor
Solution

Re: Replacing disk on a live Oracle db.


If the disk is indeed mirrored and hot swappable then exchanging it for a new one should not be a problem at all. Your Oracle db will not even notice its replacement. Weve done it lots of times before and no problems. Just follow the normal procedure for replacing it, removal, new disk, vgcfgrestore, vgsync etc.
Rhonda Thorne
Frequent Advisor

Re: Replacing disk on a live Oracle db.

Carol:

Why would you do a vgcfgrestore and sync?

All ya need to do is just remove the mirror, reduce the vg of the bad disk, swap it, vgextend to the new disk, then mirror 1 to the new disk.

Good luck Elaine
Sharing my knowledge of UNIX flavors
William Pribble
Frequent Advisor

Re: Replacing disk on a live Oracle db.

I went ahead and tried the hot-swap. Unfortunately, we had some database corruption. Below are the steps that I used to perform the hot-swap and re-sync. I would appreciate it if someone could tell me if the steps that I followed are correct. Thank you.

1. Pull the bad drive.
2. Insert the new drive.
3. vgcfgrestore -n /dev/vg01 /dev/rdsk/c3t13d0
4. vgchange -a y /dev/vg01.
5. vgsync /dev/vg01.
Carol Garrett
Trusted Contributor

Re: Replacing disk on a live Oracle db.


Elaine, you didnt specify if the faulty disk was a primary disk or a mirror copy ?

If it was a mirror disk then to be safe you could have reduced the mirror (lvreduce -m 0), replaced the disk, then simply re-extended the mirror using lvextend -m 1.

If however, it was a primary disk then the procedure straight from the Administration tasks manual is;

1. vgcfgbackup [not necessary though]
2. replace the drive
3. vgcfgrestore
4. vgchange -a y [vg the disk is in]
5. vgsync

Thats all. Apart from not using these commands in sequence the only other way I can think of a corruption ocurring is if your db is using raw logical volumes ?
William Pribble
Frequent Advisor

Re: Replacing disk on a live Oracle db.

Carol:

The disk that we replaced was the mirror. I did not run the lvreduce command. How can I find out if our Oracle db is using raw logical volumes, and if it is what are the ramifications? Thanks for your help!
Carol Garrett
Trusted Contributor

Re: Replacing disk on a live Oracle db.

To identify if your oracle db is using raw lvols do a bdf command, and check the /etc/fstab file. Are all lvols listed under the volume group in /dev/vgxx listed in the fstab file or visible under bdf ? if not then its possible your oracle db is using raw lvols. This is for supposed performance reasons, it shouldnt affect your disk replacement. did you carry out all the commands as listed in my last reply ? what was the corruption you experienced ?