1833894 Members
1797 Online
110063 Solutions
New Discussion

Re: Regarding VG & LVM

 
Srichandan T.
Occasional Advisor

Regarding VG & LVM

Hi,
How can we move Harddisk from one server to another server without loosing data.

I tried, vgimport, vgcfgbackup & vgexport. But this did not work. I am able to regenerated VG, but LVMs are not copied.

Can you please any guide?

Regards,
Srichandan
4 REPLIES 4
Torsten.
Acclaimed Contributor

Re: Regarding VG & LVM

Hi Srichandan,

please tell us more about your servers (model, operating system ...) and the kind of the disks (internal/external, vg00/01 ...).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Patrick Wallek
Honored Contributor

Re: Regarding VG & LVM

If the vg is contained on a single hard disk, the following should work if moved between HP-UX servers. I will use vg01 as an example. Use your vgname where ever I use vg01

1) Document all LVs and entries in /etc/fstab for this VG
2) Unmount all LVs.
3) Deactivate VG (vgchange -a n vg01)
4) Export VG and create map file (vgexport -v -p -s -m /var/tmp/vg01.map vg01)
5) Remove disk from 1 machine and put in the other.

On 2nd machine:

6) Copy /var/tmp/vg01.map from other machine to /var/tmp on this machine.
7) Make sure disk is seen by system - ioscan -fnC disk
8) Generate disk device files -- insf -e
9) Do another ioscan to make sure disk device file are there.
10) Create VG structure
10a) mkdir /dev/vg01
10b) mknod /dev/vg01/group c 64 0x010000
11) Import the VG -- vgimport -v -s -m /var/tmp/vg01.map vg01
12) Activate VG -- vgchange -a y vg01
13) Modify /etc/fstab with appropriate entries and mount filesystem

You should now be done.
Srichandan T.
Occasional Advisor

Re: Regarding VG & LVM

Patrick,
Thank you very much for information. I will try this and let you know.

If external AutoRAID is connected to machine and i want to move data (entire raid) to different server, what should i do ?

Request your support in this.

Regards,
Srichandan
Patrick Wallek
Honored Contributor

Re: Regarding VG & LVM

The same method applies.

If there are multiple VGs defined on the AUTORAID, be sure to do the steps I outline for ALL VGs on BOTH machines.

Just disconnect the AUTORAID from one machine and then connect it to the other.