Operating System - HP-UX
1849253 Members
4903 Online
104042 Solutions
New Discussion

I want to lvextend lvol1 of mirrorring vg01 with new disk.

 
SOLVED
Go to solution
Lee Tae-kyung
Regular Advisor

I want to lvextend lvol1 of mirrorring vg01 with new disk.

Current, vg01 is composed of two mirroring 9G disks.
The lvol1 of vg01 is 6G.
The lvol2 of vg01 is 3G.
I want to extend the lvol1 of vg01 that have 15G capacity with new disk.
HOW~~~~~
Please. answer me.....

From South of korea
I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

Couldn't quite understand your message. Are you going to add a new disk in vg01 to increase the size of lvol1 to 15G?.


-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Lee Tae-kyung
Regular Advisor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

yes...
I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA
Denver Osborn
Honored Contributor
Solution

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

You'll either need to add 2 more 9GB disks (total of 4 PVs) to vg01 or you could add one 18GB disk (total of 3 PVs), lvreduce -m 0 /dev/vg01/lvol1 mirror and lvextend lvol1 to 15GB (now it would span the 2 9GB PVs) then mirror the lvol to the 18GB PV.

Either way you look at it, you'll need Free PE on both sides of the mirror.

Hope this helps
-denver
Animesh Chakraborty
Honored Contributor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

Hi,
First you need to do a vgextend
vgextend /dev/vg01 /dev/dsk/c*t*d* /dev/dsk/c*/t*/d*
lvextend -L 15000 /dev/vg01/lvol1
extendfs /dev/vg01/rlvol1

do lvdisplay -v /dev/vg01/lvol1 to check

best of luck
Animesh
Did you take a backup?
Michael Tully
Honored Contributor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

Hi,

Once the disk has been installed:

Add the disk to the volume group

# pvcreate /dev/rdsk/cXtXdX (substitute yours)
# vgextend /dev/vg01 /dev/dsk/cXtXdX
# lvextend -L 15360 /dev/vg01/lvol1 /dev/dsk/cXtXdX

Only problem I can see with this is that
your mirror may end up on two disks.
How large is the new disk being installed?
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

You need to destroy the mirror if you need to extend the logical volume. Or you need to disable the strict allocation policy by doing

lvchange -s n /dev/vg01/lvol1. This does no good and will allot mirror extents from the same disk. Moreover, you can't retain the mirror as you need to have atleast 30GB of space available to mirror your 15GB of logical volume.

What are you plans?.. How many disks are you going to add and what sizes are they?.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Lee Tae-kyung
Regular Advisor

Re: I want to lvextend lvol1 of mirrorring vg01 with new disk.

two new disks are 9G...
therefore, vg01 will be composed of four disks.

I think I am a specialist in IT Korea^^. I am a programmer and SE and DBA