Operating System - HP-UX
1830899 Members
2724 Online
110017 Solutions
New Discussion

Mirroring for backup Restore of application software

 
SOLVED
Go to solution
Atul Goel
Frequent Advisor

Mirroring for backup Restore of application software

I have a application using Oracle, RAC servicguard Oracle AS, APA and hell lot of other softwares. Now i want to have a rollback of my software with minimum downtime (0 if possible). Proposed solution is do mirroring on HP disk and break it before upgrading. Idea is to take out one oft he mirrored disk using hot swap or by splitting and keep it as backup. Then Rollback using the secondary disk incase of upgrade failure. The application uses external disk which are mounted on shared mode and also, has raw partition.
Is it possible to use above mentioned strategy? If yes then how? If no how can i rollback with 0 down time
15 REPLIES 15
Wim Rombauts
Honored Contributor

Re: Mirroring for backup Restore of application software

First of all, what is it that you want to upgrade ? I presume you want a rollback for your Oracle RAC.
In general, the procedure you propose is certainly possible.
For shared VG's like the ones for RAC, first shutdown one instance and deactivate the volumegroup on that system. Then execute 'vgchange -a e -x ' on the system where RAC is still running.
With the VG in exclusive mode, you can split (lvsplit) the logical volumes. This split is now your backup/rollback solution.
After splitting, execute 'vgchange -a s -x ' to bring it back to shared mode.

When you need to split multiple VG's it is best to shutdown Oracle completely to be sure you have a consistent set of data on all VG's.

Then do your upgrade.

When the upgrade is successfull, you follow the same procedure but instead of splitting, use lvmerge.

When you want to rollback, shutdown Oracle completely, activate the volumegroup on 1 system and lvmerge, but merge the original with the split copy. This is the reverse merge as above.
Kapil Jha
Honored Contributor

Re: Mirroring for backup Restore of application software

First of all 0 downtime is not possible.
Which veriosn you are using , what exactly you need to remove.
I think ur doctor is DRD if your system support DRD creat a clone and do whatever you want to do on that disk and reboot to boot from this new disk.
Its simple procedure.
Although you can only install/remove patches in 11iv2 and patchesand produce in 11iv3.

Hope this help,
Kapil+
I am in this small bowl, I wane see the real world......
Eric SAUBIGNAC
Honored Contributor

Re: Mirroring for backup Restore of application software

Bonjour Atul,


"... which are mounted ... has raw partition"

Do you mean that Oracle RAC uses directly dsf like /dev/dsk or /dev/disk ? In this case you can't rely on LVM to lvsplit/lvmerge. Anyway, I am not an expert in Oracle, but as far as I know, only database can be configured on raw devices. So it shouldn't be an issue since I guess that you just want to rollback on binaries, not on database.

"The application uses external disk ..."

By chance, do you have a SAN storage system, like HP EVA or XP, EMC Symmetric or Clarion, or ... ? In this case ask your SAN administrator : maybe you have software to clone LUNs on which reside Oracle (Business Copye, TimeFinder, Snapview, ...).

"If no how can i rollback with 0 down time"

Definitivly no. You can shrink downtime through different ways, but you can't delete it.

Eric
Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

Tnak you all for the answers

We are using MSA 30 for external storage. No SAM is configured.
I have read about lvsplit but how will lvmerge work for my "vg00" I have some volume groups on vg00 which are extensively use by the application. So do i have to go to single user mode for that??
Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

And major issue with lvmerge is the lvol names
Is it possible to keep same original lvol names when doing my application rollback as oracle will look for those lvolnames
john123
Trusted Contributor

Re: Mirroring for backup Restore of application software

If u do an lvsplit and want to roll-back u have to boot the server in LVM maintenance mode and then edit fstab to point corresponding splited volumes... Also do an lvrmboot and lvlnboot with new splitted volumes from LVM maint mode..
john123
Trusted Contributor

Re: Mirroring for backup Restore of application software

Lvol names doesnot matter if u use filesystems..But in case u are concerned about raw volumes.. just mv them as u require( to the old name..
Eric SAUBIGNAC
Honored Contributor

Re: Mirroring for backup Restore of application software

"how will lvmerge work for my "vg00" ... So do i have to go to single user mode for that??"

lvmerge can be done online as long as you keep "master copy" as the reference. If you want to rollback to the "slave copy", you will have to unmount the "master copy". It should not be a problem as long as you don't want to rollback a critical filesystem like /, /opt, /usr etc ...

Be aware that lvmerge takes its argument in the other side than a command like cp, ln etc ... that is :

lvsplit

"And major issue with lvmerge is the lvol names"

With VG other than vg00, it is not an issue if you can stop applications, dismount corresponding filesystems and de-activate corresponding VG. Here is an example if you want to do a total rollbock on a VG, named vg01 in this case :

- unmount all FS from vg01 :
"umount /dev/vg01/lvol1"
.../...
"umount /dev/vg01/lvoln"

- Do the rollback :
"lvmerge /dev/vg01/lvol1 /dev/vg01/lvol1b"
.../...
"lvmerge /dev/vg01/lvoln /dev/vg01/lvolnb"

- De-activate VG : "vgchange -a n vg01"

- Rename the lvols :
"mv /dev/vg01/lvol1b /dev/vg01/lvol1" and "mv /dev/vg01/rlvol1b /dev/vg01/rlvol1"
.../...
"mv /dev/vg01/lvolnb /dev/vg01/lvoln" and "mv /dev/vg01/rlvolnb /dev/vg01/rlvoln"

- Re-activate the VG

Be-aware that if you de-activate a VG before merging all LV, you will loose the bit map that keeps track of writes. In other words lvmerge will speed down dramatically if you de-activate the VG before merging since all the LV will be synchronised instead of modified blocks.

Unfortunatly, if you have some LV to rollback in vg00 and wants to keep their original names you will have to do it in maintenance mode. So I strongly suggest that you move all non system data outside vg00.

Something else : lvsplit cannot be performed if the volume group is activated in shared mode

Eric


Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

Thanks Eric and John for such a detailed information
Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

Thanks Eric and John for such a detailed information

One more question
Can i use lvreduce commands for my rollback ?
Once i remove mirroring using lvreduce do the reduced disk still have the data? Can the data on reduced disk be availabel for use?
Eric SAUBIGNAC
Honored Contributor
Solution

Re: Mirroring for backup Restore of application software

Not sure to clearly understand your question.

Once mirror has been delete with "lvreduce -m 0", data on the old mirror is still available, but LVM structure has been modified, so that it doesn't keep track of the mirrored part. So it will be difficult to access data on the removed mirror part. Not impossible, but difficult. If you want to keep in a corner the mirror disk I would do this way (short description as I must leave ;-) :

- deactivate VG
- remove the disk(s) that support mirrored LV parts and keep in a safe place.
- ioscan --> mirror disk in "NO_HW" state
- reactivate the vg with quorum option "-q n"
- suppress mirroring with option "-m 0 -k - suppress removed disk with option "-f" of vgreduce
- de-activate then re-activate the VG

The disk you have extracted is now available for use in an other system. You will have some manipulations to do, but it will be OK.

Regards

Eric
john123
Trusted Contributor

Re: Mirroring for backup Restore of application software

If u just lvreduce i think it will not work.... But another idea would be to pull the mirror disk out, then do an lvreduce -f. it should work.. although I wont recommend you to do that.

regards
John
James R. Ferguson
Acclaimed Contributor

Re: Mirroring for backup Restore of application software

Atul:

You don't state what HP-UX release you are running. If you are on 11.23 or 11.31 you should look at Dynamic Root Disk (DRD):

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=DynRootDisk

Regards!

...JRF...
Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

Can i use that disk for rollback of the system. what manipulations do we need to perform?? Can you kindly detail them??
Atul Goel
Frequent Advisor

Re: Mirroring for backup Restore of application software

Thanks all of you for wonderful answers