Operating System - HP-UX
1835116 Members
4526 Online
110076 Solutions
New Discussion

can i vgimport a vg back on a same system but using different devices

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

can i vgimport a vg back on a same system but using different devices

I plan to use vgexport -p -s -m to create a map file of vg01. Vg01 is currently using HSG80 as disk device. Then connect the other path of HBA to EMC SAN and use vgimport to vgimport back the vg01

*** want to accomplish this on the same system
vgexport -p -s -m data_map vgdata ( the current logcial volume for this map file is on different storage (HSG)
vgimport -v -m data_map /dev/dsk/emcdisk
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: can i vgimport a vg back on a same system but using different devices

your command will work.

I just did that last week, vgexported vg01 and imported it as vg02.

If you have trouble with the commands, sam disk will do it for you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: can i vgimport a vg back on a same system but using different devices

Yes, although vgimport -s will not guarantee that the path you want is the one that the system will find first. If one one SCSI path exists to the devices then your method will work but the more foolproof way to do this is to vgexport -m mapfile -p /dev/vg01 to preserve the lvol names and then vgimport -m mapfile /dev/vg01 /dev/dsk/c1t5d4 /dev/dsk/c1t6d3 ... specifying the desired PV's yourself.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: can i vgimport a vg back on a same system but using different devices

If I understood correctly, I don't think it will work. I think you wanted to create a map file from one VG and then import a different set of disk using the same map file. If yes, it is not possible since during vgimport the system checks for matching VGIDs on the devices (disks) and if not found it will fail.

In your case, since you are using a different set of disks (may be new) the VGIDs will not match and the vgimport will fail.

But if you wanted to vgexport a set of disks first and then import the same disks with a different name, that's possible.
Life is a promise, fulfill it!
Mark Greene_1
Honored Contributor

Re: can i vgimport a vg back on a same system but using different devices

Yes, it should work. I did something similar this past Sunday, moving volume groups on an EMC Clariion SAN from one RAID group to another.

However, if the emcdisk device is not already seen by your system, you'll need an ioscan -f and an insf -e "disk" inbetween the import and export. If this is a Clariion SAN, you'll also have to do a powermt check and powermt config for powerpath to see the new device. Finally (actually, this should be done prior to doing anything else), make sure the Fibre zoning is correct and complete.

mark
the future will be a lot like now, only later
Donny Jekels
Respected Contributor

Re: can i vgimport a vg back on a same system but using different devices

Time to play catch up on the point buddy.

have assigned points to 242 of 379 responses


"Vision, is the art of seeing the invisible"
Stuart Abramson_2
Honored Contributor

Re: can i vgimport a vg back on a same system but using different devices

I don't think this will work.

1. He has a VG on disks on an HSG80.

2. He vgexports the disk from his server.

3. What is on the EMC SAN? Nothing? Is he going to vgimport "Nothing" back onto his server? No VGDA/VGRA, Logical volumes? What?

4. If he already had something on his EMC he could vgimport it. But it's not clear to me that he does.

(Does any of this sound like a Seinfeld episode?)
Jeff Schussele
Honored Contributor
Solution

Re: can i vgimport a vg back on a same system but using different devices

Hmmm...sounds to me like you basically want to "move" the data over to the EMC & currently have dual paths to the HSG80.

If so, what I would do is:
1) Make a couple safe tape backups of data
2) Reduce out the alt paths
3) Hook the released HBA to the EMC
4) vgextend the existing VG to the new EMC LUNs.
5) Mirror the existing LVs to the EMC LUNs
6) Reduce out the HSG80 LVs
7) Reduce out the HSG80 VG
8) Hook the newly released HBA to the EMC as alt paths
9) vgextend the new paths to the VG now on the EMC

DONE. The only gotcha I see here is PV size. IF the HSG80 PVs are smaller than the EMC LUNs there will be wasted space on the EMC LUNs & in that case to get it back would take a fbackup & recreation of the VG/LV/FS structure to utilize all the space & then a frecover.
Well....I guess other gotchas could be A) No Mirror-UX B)Possible max pe/pv issues

My $0.02,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sridhar Bhaskarla
Honored Contributor

Re: can i vgimport a vg back on a same system but using different devices

If I understand your message correctly, it cannot be done. The disks from EMC SAN are not going to the PV structures as of HSG80 unless you do a backend mirroring between HSG80 and EMC if one such exists. Particularly 'vgimport' with -s option will try to read the VGID from each PV and fail.

Looks like this question is a follow-up question thread

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=386866

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: can i vgimport a vg back on a same system but using different devices

Hi,

Couple of other steps that really should be in there:

A) Between steps 3 & 4
1) Storage admin zones the LUNs to the WWN of the HBA
2) ioscan -fnC disk
3) insf

B) Same steps as above between steps 8 & 9 for the other HBA

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!