Operating System - HP-UX
1752793 Members
6158 Online
108789 Solutions
New Discussion юеВ

Re: Transfer physical volume map to a different disk.

 
TechC
Regular Advisor

Transfer physical volume map to a different disk.

Hello all,
HP-UX 11.11 (11iv1)
I have a single disk root volume group sitting on disk c3t6d0. If I do a pvdisplay -v /dev/dsk/c3t6d0 it shows the physical extent layout of all my root volume group logical volumes.

What do I need backup and or output to be able to
restore the logical volume information as well as the physical extent layout onto a different disk?

Just as a crude example..
I have 2 HP-UX boxes. I want to restore the logical volume and physical extent map/layout from a disk on this first box to a disk on the second box.
What are the steps necesssary to do this. A vgexport -m vgmap vgvolgrp and vgimport -m vgmap vgvolgrp will not do it will it? i think not..

With Linux LVM I can do this pretty easily with pvcreate and the --restorefile option.
But that is lvm2 and I am not sure it is possible in 10.20 or 11iv1.


Thank you
10 REPLIES 10
Hakki Aydin Ucar
Honored Contributor

Re: Transfer physical volume map to a different disk.

Check this procedure :

http://pagesperso-orange.fr/hvelasco.admin/LVM%20HP-UX/root.htm#move%20lvol

:MOVING DATA FROM ONE LVOL TO ANOTHER:
JASH_2
Trusted Contributor

Re: Transfer physical volume map to a different disk.

Why not just use ignite to create a clone of the first machine onto the second?

Use make_sys_image to tape then use that tape to create the other server.

Sorted!
If I can, I will!
TechC
Regular Advisor

Re: Transfer physical volume map to a different disk.

Hakki,
Thanks for responding. This procedure is nice but does not really accomplish what i am looking to do.
Basically I just want the same LVM layout, the logical volume sizes,and extent size that is on the originating physical volume and put it on another one. Justwondering if that information can be transferred from disk to disk.

Jash,
Thank you for responding as well.
I know of Ignite but this is not the question I posed. This is an LVM specific question..I want to know if its possible.

Thank you
JASH_2
Trusted Contributor

Re: Transfer physical volume map to a different disk.

Alternatively then, you could add the disk into the first machine, as an additional disk. (If there is a free slot) Add into original volume group and mirror your vg00 onto it, making sure that you create it as a bootable disk, within the 1st server environment. Split the mirror and remove the disk from the server etc. Put the disk back into the second server and it should boot the server as if it was the first one.

Sorted!
If I can, I will!
TechC
Regular Advisor

Re: Transfer physical volume map to a different disk.

Jash, thanks again.
I am only interested in knowing if the LVM layout, structures, and extent mapping can be moved from one disk to another using LVM commands. I am guessing maybe not.

If I wanted to have a clone of a single disk
dd would be the way. One command, swap the disks and done. Or I would create an ignite tape , swap the disk, and restore the recovery archive onto the new disk. But I am interested in the LVM part of it and if it is possible.
Patrick Wallek
Honored Contributor

Re: Transfer physical volume map to a different disk.

There's no way I know of to transfer only the LVM layout from one server to another easily.

The only way I know of to do it is to take all of your VG and LV configuration information and recreate the VGs and LVs manually.
JASH_2
Trusted Contributor

Re: Transfer physical volume map to a different disk.

Sorry, but I am sure that there is no way of doing it the way you were hoping.

My next suggestion would have been dd too.

Looks like you will have to do it another way.

Kind regards,

Jash
If I can, I will!
TechC
Regular Advisor

Re: Transfer physical volume map to a different disk.

Thanks guys appreciate it. I will close but first can any of the following individuals chime in? You may know something we don't..
These are the top LVM/VXVM names by points assigned. Pete W has already responded.

J.R.F
A.Clay
Pete Randall
SEP
Torsten
Sridhar Bhaskarla
S.K.
Robert-Jan

Thanks again
Viktor Balogh
Honored Contributor

Re: Transfer physical volume map to a different disk.

OK I know I'm not among these persons but I if wanted to have such a tool I would write a shell/perl script. As Patrick said it could only be done manually. But the process can be easily automated, just think about it. The script should query the original VG/LV for the extent sizes and LV names, and after that it could create the same layout on an another disk. If you would use it more than 10 times I think it would worth to write it. ;)
(And it would be another challenge in the boring everydays.)

I'm not sure what's the approach at other datacenters, but in our midst we automatize everything we can.
****
Unix operates with beer.