Operating System - HP-UX
1829147 Members
2653 Online
109986 Solutions
New Discussion

Importing a VG with Reduced Number of PVs

 
SOLVED
Go to solution
Narender Kumar
New Member

Importing a VG with Reduced Number of PVs

I am having A VG with 4 PV.All the logical volumes are mirrored in such a way that 2PV are copy of the remaining two.
My question is can i export the VG and reimport using only 2 PV.Means reimport using a single copy of the data?

Thanks in Advance

Narender Kumar
9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: Importing a VG with Reduced Number of PVs

It's better to reduce the mirror first.

see man lvreduce.

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!   
Prashanth.D.S
Honored Contributor

Re: Importing a VG with Reduced Number of PVs

Hi Kumar,

Agreed with above statement..you can do the above mentioned activity follow the below procedure..

1. lvreduce
2. vgreduce
3. vgexport
4. vgimport

Best Regards,
Prashanth
James R. Ferguson
Acclaimed Contributor

Re: Importing a VG with Reduced Number of PVs

Hi:

Once you do the 'lvreduce -m 0 lv_path pv_path' for the physical volumes that you want to remove, then simply, 'vgreduce' the physical volumes that (now) lack logical extents. There is no need to 'vgexport' and 'vgimport'.

Regards!

...JRF...
Narender Kumar
New Member

Re: Importing a VG with Reduced Number of PVs

I forgot to mention i wanted to keep the other copy intact.

Means do not want to lvreduce and vgreduce.

Just export with 4pv and reimport with 2pv.

Regards
Narender
Torsten.
Acclaimed Contributor

Re: Importing a VG with Reduced Number of PVs

Please explain your plan!

Do you want to preserve one copy?

In this case you should have a look at the lvsplit command.

man lvsplit

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!   
Narender Kumar
New Member

Re: Importing a VG with Reduced Number of PVs

I want to keep both the copies in tact.And import the Vg with one copy without destroying the second copy.

So taht in case second copy is required the Vg can be imported with second copy.

Narender
Siju Vadakkan
Trusted Contributor
Solution

Re: Importing a VG with Reduced Number of PVs

Hi,

export the vg without -s option.

vgexport -v -p -m

while importing specify the disks u want to use.,

vgimport -v -m

nanan
Trusted Contributor

Re: Importing a VG with Reduced Number of PVs

Hi
You can do that
No problem, do like above comments.

1. vgexport -v -p -m vgmap.map

2. vgimport -v -m vgmap.map vgname /dev/dsk/cXtYdZ /dev/dsk/cxtydz

Before you do 2nd step u have to create vg directory and mknod

Regards
nanan
IT_2007
Honored Contributor

Re: Importing a VG with Reduced Number of PVs

You have to use lvsplit command so that your data on mirror disk won't be deleted.