Operating System - HP-UX
1753713 Members
4769 Online
108799 Solutions
New Discussion юеВ

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

 
SOLVED
Go to solution
James R. Ferguson
Acclaimed Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi:

> As i know c3t8d0 data is syncd with c3t12d0 and c3t14d0 data also is syncd with c3t12d0...Is it correct?

Yes.

> If it is correct, i would like to sync the c3t8d0 data with another disk, for that can i fallow the below:

> reducing the mirror copy c3t12d0 which is having the data of the disk c3t8d0:

This will mean that the mirrored extents on c3t14d0 are no longer mirrored, either.

# lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t12d0

NOTE that I corrected this.

> and I would like to make new copy of mirror for data in c3t8d0 in the disk c3t10d0:

# lvextend -m 1 /dev/vg01/lvol23 /dev/dsk/c3t10d0 /
Yes, once you have 'pvcreate'd the physical disk; and 'vgextend'ed it into the volume group.

Regards!

...JRF...
Ganesan R
Honored Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi,

Forgot to update you this..

You said,
>>>reducing the mirror copy c3t12d0 which is having the data of the disk c3t8d0:


lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t12d0 /dev/dsk/c3t8d0<<<

Again I want to make it clear that one copy of data is there on c3t8d0+c3t14d0 and other copy is on c3t12d0. So your above command won't work. You can either reduce the first copy from c3t8d0+c3t14d0 or second copy from c3t12d0. So the two possiblities are,

lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t14d0 /dev/dsk/c3t8d0
lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t12d0

You decide which copy you want to reduce. After that you can extend the mirror with new disk or whatever disk you want.
Best wishes,

Ganesh.
sabinkarvijay
Frequent Advisor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

My current requirement is:

I would like to reduce the mirror copy c3t12d0 and would like to sync the data of c3t8d0 with c3t10d0(New disk) , and c3t14d0 data with c3t12d0..

How can i proceed?

Thanks in advance,

Regards,
Vijay Sabinkari.
Ganesan R
Honored Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi Again,

>>>I would like to reduce the mirror copy c3t12d0 and would like to sync the data of c3t8d0 with c3t10d0(New disk) , and c3t14d0 data with c3t12d0..<<<

I am bit confused now. Will go your requirement step by step.
Your first step,I would like to reduce the mirror copy c3t12d0.

#lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t12d0

Now you don't have mirror and the lv is distributed on two disks c3t8d0+c3t14d0.

Your second step, and would like to sync the data of c3t8d0 with c3t10d0(New disk) , and c3t14d0 data with c3t12d0..

sync the data on c3t8d0 with c3t10d0 means what? you want to move the data from c3t8d0 with c3t10d0 or mirror the data from c3t8do with c3t10d0? If move use pvmove command. if mirror the entire lv (both c3t8+c3t14 data)will be mirrored with c3t10d0. You don't have option to mirror portion of lv to one disk and remaining portion of the lv to another disk.

Best wishes,

Ganesh.
sabinkarvijay
Frequent Advisor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi Ganeshan,

I will explain you clearly:

Previously the logical volume : lvol23 associated with four disks as below:


#lvdisplay -v /dev/vg01/lvol23

--- Logical volumes ---
LV Name /dev/vg01/lvol23
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 25000
Current LE 6250
Allocated PE 12500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c3t8d0 4499 4499
/dev/dsk/c3t10d0 4499 4499
/dev/dsk/c3t12d0 1751 1751
/dev/dsk/c3t14d0 1751 1751

now when we reduced the disk c3t12d0, lvol23 was associated with only two disks i.e. c3t8d0 and c3t14d0..

once we have done increasing the lv as below:

lvextend -m 1 /dev/vg01/lvol23 /dev/dsk/c3t12d0

lv has been increased as below:

--- Logical volumes ---
LV Name /dev/vg01/lvol23
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 25000
Current LE 6250
Allocated PE 12500
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c3t8d0 4499 4499
/dev/dsk/c3t14d0 1751 1751
/dev/dsk/c3t12d0 6250 6250

previously only 1751 PE's were taken from the PV c3t12d0, now it took 6250 PE's from that..

now the other disk is available c3t10d0 where it has 4499 PE's,

Is there anything we can do with this Logical Volume to become as previous state?

Regards,
Vijay
Ganesan R
Honored Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi Vijay,

I could understand what you did.

>>now when we reduced the disk c3t12d0, lvol23 was associated with only two disks i.e. c3t8d0 and c3t14d0..<<

Yes. You should understand onething here. When you reduce the lv from c3t12d0, it will reduce the lv from both c3t12d0 and c3t10d0. because the mirror copy is distributed on both disks. At this stage you have only one copy on c3t8d0+c3t14d0.

>>once we have done increasing the lv as below:
lvextend -m 1 /dev/vg01/lvol23 /dev/dsk/c3t12d0
lv has been increased as below:
previously only 1751 PE's were taken from the PV c3t12d0, now it took 6250 PE's from that..<<

This is what I have explained in earlier reply. When you extend the mirror, the mirror data will be copied to the first available disk then goto the next disk if space is not enough. In your case the entire data is mirrored to c3t12d0 since it has enough space. Now the data is like this...
Primary(c3t8+c3t14) <=> Mirror(c3t12)

>>now the other disk is available c3t10d0 where it has 4499 PE's,

Is there anything we can do with this Logical Volume to become as previous state?<<

Why do you want do so? there is no benefit out of it. You can use c3t10d0 for some other purpose. And also you can consider to have primary copy on single disk (either on c3t8 or c3t12) instead of two disks provided if you have enough space(6250 free PE's) on any one of the disk.

Hope this helps you..


Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi Vijay,

There is typo error in my last reply..

//And also you can consider to have primary copy on single disk (either on c3t8 or c3t12) instead of two disks provided if you have enough space(6250 free PE's) on any one of the disk.//

I have mentioned the disk name c3t12 instead of c3t14.Correct sentence is,
//And also you can consider to have primary copy on single disk (either on c3t8 or c3t14) instead of two disks provided if you have enough space(6250 free PE's) on any one of the disk.//

Sincere apologize for the mistake..

Best wishes,

Ganesh.
Steven E. Protter
Exalted Contributor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Shalom,

You ask:

Is there anything we can do with this Logical Volume to become as previous state?

Answer:
Yes, you can back up the data, and rebuild the raid array from scratch. Then you can restore the data.

This scheme strikes me as overly complex.

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
sabinkarvijay
Frequent Advisor

Re: removing disk from volume group where associated lvm's are mirrored with stripping...

Hi All,

Finally I did the below,

lvreduce -m 0 /dev/vg01/lvol23 /dev/dsk/c3t12d0

lvextend -m 1 /dev/vg01/lvol23 /dev/dsk/c3t10d0 /dev/dsk/c3t12d0

Now it has been like previous..

Thanks all for your prompt responses..

Regards,
Vijay Sabinkari.