HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

HDLM volume group migration

 
Richard Pereira_1
Regular Advisor

HDLM volume group migration

Hi,

I have a situation where we will be installing HDLM on hpux 11.iv1 using LVM. A required step is to migrate our volume groups using vgextend onto the /dev/dsk/chxtxdx device file and vgreduce the /dev/dsk/cxtxdx device file. We have a very limited maintenance window and was wondering if any admins out there have automated the task via a script?
5 REPLIES
Steven E. Protter
Exalted Contributor

Re: HDLM volume group migration

Shalom,

I've automated the vg commands in the past.

I just develop a working test script on a test server, and change the device being worked on.

vgextend /dev/vg05 /dev/dsk/chxtxdx (interesting device file here)

lvextend -m 1 /dev/vg05/lvol1 /dev/dsk/chtxdx
# repeat for each logical volume.

lvreduce -m 0 /dev/vg05/lvol1
or

lvsplit

vgreduce /dev/vg05 /dev/dsk/cxtxdx

Again a little work would be needed on your part to insure the right devices were used and the right switches were put on the command line.

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
SoorajCleris
Honored Contributor

Re: HDLM volume group migration

What about opting a pvmove option ??

It will reduce the time.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
James R. Ferguson
Acclaimed Contributor

Re: HDLM volume group migration

Hi Richard:

Using LVM mirroring as Steven suggested offers a safety net that 'pvmove' doesn't. A 'pvmove' is actually a "poor-man's" mirror operation. The problem is that any interruption of 'pvmove' may leave you with stale logical extents.

While mirror creation takes some time, there is no loss of overall availability. Breaking the old mirror just takes a few seconds at most.

Regards!

...JRF...

Richard Pereira_1
Regular Advisor

Re: HDLM volume group migration

Hi Guys,

Thanks for the quick response.

I think I should have clarified what we're doing.

I already have HDLM running and the vgs are using hdlm device files for load balancing. No data needs to be moved, no mirroring required.

We are migrating the servers from 1 hardware platform to newer one using make_net_recovery. I have tested it and it works fine for restoring the OS. Ignite will re-import my data volume groups for me using SCSI device files. So I loose my hdlm load balancing and the scsi device files will have new names on the new OS hardware.

After I need to reinstall the HDLM device (as per hitachi documentation). SO my problem is I will have a bunch of new hdlm device files. For each vg, I need to quickly correlate the scsi devices to a hdlm device and then vgextend the hdlm device to vgreduce the scsi device.

I know i can use dlnkmgr view -lu to help correlate hdlm to scsi and i have strings /etc/lvmtab to find the scsi under each vg. i was wondering is someone had a quick way to merge the 2 sources together via script to perform the lvm commands rapidly.
Richard Pereira_1
Regular Advisor

Re: HDLM volume group migration

no one?


ok, I wont have a fully automated script but a good process. when the new hardware is up. i will do a vgdisplay -v vgname, grab the PV Name devices into a list. then run dlnkmgr view -drv and grep for each PV Name its hdlm counter part. then run vgextend on the hdlm list, vgreduce on the first PV name list and voila, should be ok.