Operating System - HP-UX
1833785 Members
2676 Online
110063 Solutions
New Discussion

Re: lvcreate and lvextend

 
brian_31
Super Advisor

lvcreate and lvextend

Here are the steps i am going to follow to create a new lvol by 1gb and extend and mirror it .


lvcreate -n lvindex /dev/vg_ora

lvextend -l 256 /dev/vg_ora/lvindex /dev/dsk/c3t2d0

lvextend -m 1 /dev/vg_ora/lvindex /dev/dsk/c5t2d0

are these steps OK?

Thanks

Brian
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: lvcreate and lvextend

You could combine your second and third steps.

lvextend -l 256 -m 1 /dev/vg_ora/lvindex /dev/dsk/c3t2d0 /dev/dsk/c5t2d0
Hein van den Heuvel
Honored Contributor

Re: lvcreate and lvextend

>> are these steps OK?

Definitly Maybe!
There is not nearly enough information presented here for us to properly help.
Not enough about what is there, nothing much about the targetted use. Ok, it is likely to be used to hold an index or tow for an Oracle database, and I _suspect_ you'll use raw devices

IF the the pe_size for vg_ora is the default 4 MB, which you did share with us, then the steps are OK.

To avoid worrying about the pe_size, why not specify the size as -L 1024 ?

Of course the selected pv's had better be part fo the vg, and had better have enough free PE's on them to support the request.

So you want to run vgdisplay to make sure none of the maximums are exceeded with this command, or close to being exceeded.

Assuming there is the space to allocate, is there enough time to do the access? That is, be sure that the selected PVs have enough performance to spare to support to additional usage.

You may want to run lvchange to further select (mirroring) attributes.

Finally... 1GB is not a whole lot these days.
Why nickle and dime this stuff?
"SAME"! Make it bigger, make it better, make it auto-extend.

hth,
Hein.
Avinash20
Honored Contributor

Re: lvcreate and lvextend

Check the vgdisplay -v output to check if you have Free PE available on the primary and mirror disk

If yes, then create LV of 1GB
# lvcreate -L 1024 -n lvindex /dev/vg_ora /dev/dsk/c3t2d0

# lvextend -m 1 /dev/vg_ora/lvindex /dev/dsk/c5t2d0

Docs: http://docs.hp.com/en/B2355-90672/ch03s10.html
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Prasanth Thomas
Valued Contributor

Re: lvcreate and lvextend

Hi ;;

You have to follow these steps

lvcreate -n lvindex /dev/vg_ora

lvextend -l 256 -m 1 /dev/vg_ora/lvindex /dev/dsk/c3t2d0 /dev/dsk/c5t2d0

Regards

Prasanth Thomas
Sajjad Sahir
Honored Contributor

Re: lvcreate and lvextend


Dear Brian

in first step u creating 0 space logical volume
in second step u are extending 4*256MB in logial volume
u can use lvextend -l 256 /dev/vgora/lvindex

if u want mirroring u can use -m1 for one copy

u can do in step lvextend and mirroring in single step

sajjad