Operating System - HP-UX
1827612 Members
3137 Online
109966 Solutions
New Discussion

How to mirror the lvol without database shut down

 
SOLVED
Go to solution
Cat_4
Advisor

How to mirror the lvol without database shut down

My vg02 have 1 lvol which is created under my 2 * 9GB hdd. I have another 18G available. Please advise how could I mirror the lvol without system reboot ?

Thanks & Best regards,
Cat
9 REPLIES 9
Elmar P. Kolkman
Honored Contributor

Re: How to mirror the lvol without database shut down

Normally you can do things like lvextend on mounted lvols.
So you can do:
lvextend -m 1 /dev/vg02/lvol1
while the database is running. Though it could slow down the database, it keeps on running.
Every problem has at least one solution. Only some solutions are harder to find.
aparna challagulla
Valued Contributor

Re: How to mirror the lvol without database shut down

hi
You can mirror can existing lvol to a new pv using

lvextend -m 1 /dev/vg02/lvol1 /dev/dsk/cNtNdN

HTH
aparna

If you don't have time to do it right you must have time to do it over
Hoefnix
Honored Contributor

Re: How to mirror the lvol without database shut down

You first have to put the 18 GB disk in the volumegroup using vgextend /dev/vg02 /dev/dsk/c?t?d0

Then you can extend the lvol with a mirror copy.
lvextend -m 1 /dev/vg02/lvol?

Normal the database wil not have a problem with this. Only your system will be busy for some minutes sync the data to the other disk. (you need to have MirrorDisk/UX installed on the system)
Ps. No system reboot is needed!
Rajeev  Shukla
Honored Contributor

Re: How to mirror the lvol without database shut down

You dont need to shutdown the database or reboot the system to mirror you'r lvol on vg02. Just do following things
1. pvcreate the 18GB disk.
2. vgextend /dev/vg02 /dev/dsk/<18GB disk>
3. lvextend -m 1 /dev/vg02/lvol? /dev/dsk/<18GB disk>

Thats it..and verify the mirror by having a look at
lvdisplay -v /dev/vg02/lvol?

Tim D Fulford
Honored Contributor

Re: How to mirror the lvol without database shut down

some of the above seems to be contary to each other.

1 - You can mirror the lvol ON-LINE IF you have Mirror/UX. Once mirrored it will maintain the data between the two disks or PVs.
2 - if you DO NOT HAVE mirror/UX, then you will NOT be able to mirror the lvol. You can take a "snapshot" or backup of it by dding the lvol to another (off-line). But once the database comes backup & is written to they will be inconsistent.

I would not advise doing a "dd" or copy to another disk/lvol. I would back it up to tape, which is essentally all you are doing, but with a different media!

Tim
-
Thayanidhi
Honored Contributor
Solution

Re: How to mirror the lvol without database shut down

Hi,

I see another problem here. Your PE per PV
in the VG02 may be limited with 9GB disks.
If you add 18GB to this VG then you can access only 9GB. PE per PV connot be modified
When you recreate VG add higher capcity
first or use -e option in vgcreate.

Backup first !!!!

TT
Attitude (not aptitude) determines altitude.
Cat_4
Advisor

Re: How to mirror the lvol without database shut down

Hi, Thayanidhi,

Yes, exactly this is my problem here.

Objectives :
I just want to mirror my only lvol of VG02.

However, this VG got only 9GB PE per PV. I asked the peer in previous and they suggest me to re-create the vg but I can't stop my machine... so, what should I do ?

Cat


Rajeev  Shukla
Honored Contributor

Re: How to mirror the lvol without database shut down

Hi Cat,
But i am affraid, thats the only way.
If you want to utilize the full 18GB disk then either,
1. take backup, re-create VG using 18GB disk and restore the data, and add 9gb disk also to it and mirror.
2. Create another VG with a different name, copy all data from this Vg to new one and blow off this VG

these are the only 2 options with you.
Thayanidhi
Honored Contributor

Re: How to mirror the lvol without database shut down

Hi Cat,

If absolutely it's possible to shutdown the VG, then you may
add 2*9GB disks instead of 1*18GB and do the mirroring.

That is the only workaround.

Regards

TT
Attitude (not aptitude) determines altitude.