Operating System - HP-UX
1826432 Members
3922 Online
109692 Solutions
New Discussion

migrating data using lvmirror

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

migrating data using lvmirror

hi all

Here are the steps that I would like to go over it with you

insf -e - to bring in the new disk
pvcreate -f /dev/rdsk/newdisk
vgextend /dev/vgx /dev/dsk/newdisk
lvextend -m 1 /dev/vgx/lvol1 /dev/dsk/newdisk
lvreduce -m 0 /dev/vgx/lvol1 /dev/dsk/olddisk

my question: when i do lvreduce to reduce the mirror on the old disk, this doesn't automatically remove the /dev/dsk/olddisk from the vgx... am I correct on this... ? thanks so much your help
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: migrating data using lvmirror

After you have migrated and lvreduced all LVOL's in question then you do a vgreduce to remove the physical volume from the VG.
If it ain't broke, I can fix that.
hpuxhelp
Regular Advisor

Re: migrating data using lvmirror

the reason that I don't want to use vgreduce to reduce the old disk out because only a certain logical volume that I need to migrate into the new disk ...
Sridhar Bhaskarla
Honored Contributor

Re: migrating data using lvmirror

Hi,

Yes. You will need to do a 'vgreduce' on it.

vgreduce vgxx /dev/dsk/cxtyd0

Before that make sure you don't have any logical volumes on it by

pvdisplay -v /dev/dsk/cxtyd0

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor
Solution

Re: migrating data using lvmirror

I am sorry. My previous response was not for your second question. I clicked submit and waited so long to get it posted.

If you do an lvreduce -m 0, you don't have to worry about the physical volume being reduced out of the VG. Only the logical volume will be reduced.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try