1833461 Members
3216 Online
110052 Solutions
New Discussion

Re: vgexport/vgimport

 
nitren
Frequent Advisor

vgexport/vgimport

Hi !

Scenario: Server A with vg02(disks on EMC A).
Server B with vg02(disks on EMC B). The disks on EMC A are syn'ed to disks on EMC B. When splitting we want to run the application on server B with the EMC B disks in vg02. What's the recommended approach?? Do you have any suggestions??

Rgds

NilsI
8 REPLIES 8
Bill McNAMARA_1
Honored Contributor

Re: vgexport/vgimport

Are you using serviceGuard?

You can switch the package or vgchange in exclusive mode

Otherwise vgexport with the -m option to create a mapfile,

copy the map file to the new server, vgimport the vg

Later,
Bill
It works for me (tm)
Domenico_5
Respected Contributor

Re: vgexport/vgimport

I don't understand how you have syncronized EMC.

If you use the emc software, you must split the mirror and after you can see the disk's on server B.

Have you any detail about it?
Jordan Bean
Honored Contributor

Re: vgexport/vgimport

You're using EMC TimeFinder/SRDF. Very nice.

Study this thread.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x66d494f22a31d6118fff0090279cd0f9,00.html

This is basically what to do:

On host A, export the vg maps of vg01:
# vgexport -p -m vg01.map -f vg01.pv vg01

Copy vg01.map and vg01.pv to host B.

On host B:
split the RDF links so the host can see the volumes, install the disks (ioscan; insf -e). edit vg01.pv to reflect the correct pv paths, and create the new volume group:
# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgimport -m vg01.map -f vg01.pv /dev/vg02

Naturally, there may be a little more to this.
Michael Tully
Honored Contributor

Re: vgexport/vgimport

Hi,

You can add after doing the import:

# vgchange -a y /dev/vg02

if any of these are mounted volumes you will
need to mount them as well. You may need to
change the /etc/fstab file and then mount
them using 'mount -a'

Michael
Anyone for a Mutiny ?
Jason VanDerMark
Trusted Contributor

Re: vgexport/vgimport

Hmmm, Being an EMC using/loving HP-UX admin, I don't think that what Jordan suggested will work perfectly. The problem I see is that when vgexporting, you can't rely on the -f option because the physical volume special files will undoubtedly change when moving over to the other server. I would suggest either using 'inq'(which doesn't require you to install solutions enabler) which will allow you to determine the pv name for each BCV hyper, on server B or you can use sam to import the vg using your map file. Once the vg exists, simply get all of the pv names and create a script that will mkdir your /dev/vg, mknod your group file, vgchgid (changes vgid on the drives to allow for the mounting of the bcv on the same host as the standard devices), vgimport, vgchange, fsck, and then finally mount the drives.

I can give you more details if you need them. I hope that this is useful.

Regards,
Jason V.
Tie two birds together, eventhough they have four wings, they cannot fly.
MANOJ SRIVASTAVA
Honored Contributor

Re: vgexport/vgimport

Nils

Jason is right , you have to do a vgchgid on all the disks togeether in the volume gtroup vg02 . and then only it can be imported. You can import w/o using the map files tooo and it work properly , just you got to know where the ountpoints get mounted.


Manoj Srivastava
Mark van Hassel
Respected Contributor

Re: vgexport/vgimport

Hi,

Use symrdf to split the SRDF link, set the R2 devices in Read/Write mode and use vgimport to import the volume group. You can use a map file, but that is not necessary if your logical volumes are in the correct order. Also, if you know the R2 device files which belong to the VG you can specify them. ALternatively you can let vgimport search for the correct devices which takes longer.
After the vgimport activate them using vgchange -a y. There is no need for vgchgid since you activate the R2 volume group on a different system than the R1 VG.


All you need to do now is to mount the file systems. If this is a disaster-recovery setup, please be aware that you need the mountpoint info when the server A crashes.

Note: under "normal" operation it is possible to import the vg in read only mode and mount the file systems read only on server B, while the R1 vg is active on server A.
This way you have a chance to test the procedure.

All this can be automated using MC ServiceGuard together with the MCSG EMC SRDF toolkit which can be buight from HP.

HtH,

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Mark van Hassel
Respected Contributor

Re: vgexport/vgimport

Just an update: In stead off using "symrdf split" it could be better to use "symrdf failover" which write disables the R1 volumes.
An "symrdf failback" will synch the R1 volumes with the R2 volumes.

Mark
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us