Operating System - HP-UX
1835359 Members
3367 Online
110078 Solutions
New Discussion

adding space to a logical volume

 
SOLVED
Go to solution
simon_164
Super Advisor

adding space to a logical volume

I have a disk presented from san and put in a volume group and I have created some logical volumes on that. Now from san i increased the space for example by 5 GB. how can i increase the volume group size and the logical volume size? in the volume group i am not being able to see the new size as empty space. i have not emtpy extents.

12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: adding space to a logical volume

man vgextend
man lvextend


Pete

Pete
Sandman!
Honored Contributor

Re: adding space to a logical volume

You need to extend the filesystem using fsadm if you have OnlineJFS otherwise unmount the filesystem and extendfs i.e.

# fsadm -F vxfs -b 5120M /mnt_point
OR
# umount /mnt_point
# extendfs -F vxfs /dev/vgXX/rlvol??
# mount /dev/vgXX/lvol?? /mnt_point
simon_164
Super Advisor

Re: adding space to a logical volume

Maybe I did not explain well. Or u did not read well. The volume group does not show the new space, so i have a new disk which is 65 GB and the volume group is still have 15000 extent which is 60 GB. I am not able to see the new 5 GB.
Pete Randall
Outstanding Contributor

Re: adding space to a logical volume

Maybe I did not explain well. Or u did not read well:

You need to use vgextend to "grow" the volume group, then lvextend to "grow" the logical volume with the vg.


Pete

Pete
Torsten.
Acclaimed Contributor
Solution

Re: adding space to a logical volume

Sounds like you increased the LUN. Did you?

HP-UX cannot handle this at the moment.
You need to create a new LUN and add it as a new PV to your existing VG.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Mel Burslan
Honored Contributor

Re: adding space to a logical volume

if you run an ioscan -fnC disk, you should be able to see the new LUN (or whatever your favorite term is) with a device driver path right underneath line containing the hardware path like /dev/dsk/cXtXdX

if you do not see the device path, but see the hardware path, run

insf -e

command to assign device drivers.

then

pvcreate /dev/rdsk/cXtXdX
vgextent /dev/myvolumegroup /dev/dsk/cXtXdX
lvextend -L finalsize /dev/myvolumegroup/mylvol

should be quite straightforward
________________________________
UNIX because I majored in cryptology...
simon_164
Super Advisor

Re: adding space to a logical volume

Yeahh, I guess I have increased the LUN, I took the vdisk in the EVA and increase it by 5 GB. no workaround about this? i should create a new vdisk to increase ?
Torsten.
Acclaimed Contributor

Re: adding space to a logical volume

Yes, you will need a new vdisk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Pupil_1
Trusted Contributor

Re: adding space to a logical volume

what does diskinfo /dev/rdsk/cxtxdx show?

There is always something new to learn everyday !!
Bill Hassell
Honored Contributor

Re: adding space to a logical volume

Volume managers must put extent information at the front of the disk. But disk arrays do things that are impossible for disks to do: increase or decrease the size. While it easy to change the SAN definitions of LUN presented to the computer. Make the disk (LUN) smaller and filesystem and volume group corruption are the result. Increasing the LUN is not noted by the LVM software because the volume has already been created. To add 5Gb to the volume, create a new LUN and vgextend the volume group.

Note also that if you add some space to a logical volume (lvextend) with a filesystem, the filesystem is unaffected. You must use extendfs to remap the filesystem to take advantage of the additional space.


Bill Hassell, sysadmin
sysadm_1
Valued Contributor

Re: adding space to a logical volume


HP-UX doesnt support increasing the LUN size which is already part of VG.Now you can create new LUN and add in to same VG then extend the lvols and do extendfs.

-sysadm
Steven E. Protter
Exalted Contributor

Re: adding space to a logical volume

Shalom,

Certain HP disk arrays do suport HP-UX expanding a LUN that is already in a vg.

If the lun has increased, usually you do have to boot.

Then you have to lvextend the logical volume.

Then you need to umount the filesystem and run extendfs

If you have Online JFS you can skipp the umount and use fsadm to extend the filesystem on the fly.

If your Volume group was not built to properly use the space, you may have to vgexport it and use vgcreate with the -p parameter to rebuild it with proper allocation for the amount of space required.

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