Operating System - HP-UX
1834554 Members
3737 Online
110069 Solutions
New Discussion

LVM Mirroring Question on SC10

 
Mike_305
Super Advisor

LVM Mirroring Question on SC10

Hello,

I am trying to mirror my /dev/vg01/lvol1 and we have 4 disks that we can use. What is the best way I mirror this? This disk is in SC10 Rack.

Can I build the "VG" with c3t0d0 and c4t0d0 and then mirror on c8t0d0 and c9t0d0?

Please let me know if I am correct on my steps.

1) vgextend /dev/vg01 /dev/dsk/c8t0d0

2) vgextend /dev/vg01 /dev/dsk/c9t0d0

3) lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c8t0d0 /dev/dsk/c9t0d0 (Can I put both path on the same command, and this way will it use both disk equiil.)

The question that I have is will this LVEXTEND command will user both disk (c8t0d0 & c9t0d0) or can me run the lvextend command without specifying the disk path.

lvextend -m 1 /dev/vg01/lvol1

Appreciate your help.

Regards,

M
If there is problem then don't think as problem, think as opportunity.
10 REPLIES 10
Ramesh S
Esteemed Contributor

Re: LVM Mirroring Question on SC10

Hi

will this LVEXTEND command will user both disk (c8t0d0 & c9t0d0)
>> Until unless the LVOL exceeds the size of a PV, it wont span the mirror copy on another PV.

can me run the lvextend command without specifying the disk path.
>> Yes, you can use this command. It will mirror the LVOL on free PE's available on the PV.If the LVOL Allocation is Strict, it wont mirror on the same PV. By deafult LVOL Allocation is strict only.

Thanks & Regards

Ramesh
Warren_9
Honored Contributor

Re: LVM Mirroring Question on SC10

Hi M,

which OS version is using??

If using the 11iV3, the new LVM can have RAID0+1 or RAID1+0. Therefore the LV will have stripping and mirroring...

http://docs.hp.com/en/LVM-11iv3features/LVM_New_Features_11iv3.pdf

GOOD LUCK!
Warren.
TTr
Honored Contributor

Re: LVM Mirroring Question on SC10

If you are using all 4 disks in their entirety (assuming all 4 are same size/geometry) just for lvol1, you commands will work fine. Otherwise you have no control where the mirror copies are selected from. Of course with your commands you are not using any kind of striping.

If you want to use striping and mirroring you have to use extend based striping and either do it with a script extending one extend at a time or create two PV groups with 2 disks each and use
lvcreate -D y -s g -m 1 -L (or -l) XXXX vg01

Look at "man lvextend" and scroll down in the examples under the "distributed allocation policy" paragraph.
Mike_305
Super Advisor

Re: LVM Mirroring Question on SC10

Hello,

So the question I have is;

If I mirroring c3 and c4 and I want them to mirror on c6 and c7 then I can do following.

lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c6tXdX /dev/dsk/C7tXdX

---------OR-----------

also I can do;

lvextend -m 1 /dev/vg01/lvol1

In the above command would the mirror copy will be created on c6 & c7 or not?

Appreciate your help enjoy the points.

Thanks,

M
If there is problem then don't think as problem, think as opportunity.
TTr
Honored Contributor

Re: LVM Mirroring Question on SC10

> lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c6tXdX /dev/dsk/C7tXdX

> ---------OR-----------

> lvextend -m 1 /dev/vg01/lvol1

Both commands will give you the same result. If you don't specify the disks the mirroring will start using the first available disk (c6) and when that fills up it will use the next one. Like I said before this will happen if you are dedicating the entire disks for this volume and only for this volume. If lvol1 does not use the entire two disks or there are other volumes in the same volume group, there are gaps of extends in the PVs and you have no control where the mirrorng PEs are going to end up.
Mike_305
Super Advisor

Re: LVM Mirroring Question on SC10

Hello,

If I don't specify the disk then is their a chance that mirror copy might fall on my primary disk (c4 or c5) when I do that.

I want to make sure my mirror copy is distributed on c6 and c7 and not on c4 and c5?

Appreciate your help and feedback.

Thanks,

MP
If there is problem then don't think as problem, think as opportunity.
TTr
Honored Contributor

Re: LVM Mirroring Question on SC10

If your primary disks are not completely used up by the primary copy of lvol1, yes the mirrors will go on the primary disks.
Siju Vadakkan
Trusted Contributor

Re: LVM Mirroring Question on SC10

provide the following output, need to know how LV is created initially.

vgdisplay -v vg01
lvdisplay /dev/vg01/lvol1
Mike_305
Super Advisor

Re: LVM Mirroring Question on SC10

Hello,

I think I will go ahead and use the following to make sure mirror is done correctly.

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c4t0d0 /dev/dsk/c6t0do

and

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c5t0d0 /dev/dsk/c7t0d0

This way I think it should mirror evenly.

Thanks,

MJ
If there is problem then don't think as problem, think as opportunity.
Mike_305
Super Advisor

Re: LVM Mirroring Question on SC10

THX for your help.

MJ
If there is problem then don't think as problem, think as opportunity.