System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing Volume group size

SOLVED
Go to solution
Randy Durden
Frequent Advisor

Increasing Volume group size

I have a HP UX 11.11 machine that has a mounted drive that points towards a LUN coming off of a NETAPP storage unit. The LUN was 20G in size, but I had to increase it to 60G in size. How do I get my mount file system to recognize the new size?
36 REPLIES
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

You need to vgremove/vgcreate. If you had made a new, separate LUN, you could have used vgextend.


Pete

Pete
Torsten.
Acclaimed Contributor

Re: Increasing Volume group size

With 11.11 you can only backup your data, delete the VG and recreate.

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!   

Re: Increasing Volume group size

You can't on HP-UX 11.11 (at least not with supported tools anyway) - a reboot would allow the kernel to see the new size of the disk, but the LVM structures on the disk cannot be changed with standard customer tools.

Better to set the disk size back to what it was, and then present another 2 x 20GB LUNs. You can then vgextend the volue group and then lvextend the logical volume with the filesystem on it. How you resize the filesystem depends on whether you have OnlineJFS or not.

In 11.23 and 11.31 there is a tool to change LVM structures on disk in the form of the "vgmodify" command. This was never officially back-ported to 11.11, although unsupported versions do exist... using unsupported tools on your data is not something I would consider.

HTH

Duncan

HTH

Duncan
TTr
Honored Contributor

Re: Increasing Volume group size

With 11.11 you are out of luck. You can not change the disk size without pvcreating it. Your mountpoint is two levels above that. First you have the disk, then the volume and then the filesystem(mountpoint).

What you could have done would be to add a separate LUN (say 40GB) and then extend the volume on the new LUN/disk and then extend the filesystem.

What you should do now is to backup your current 20GB and create the volume again with the new size (60GB) and then restore the original 20GB of data.
Torsten.
Acclaimed Contributor

Re: Increasing Volume group size

At the time when 11.11 was designed all disks had a fixed size ...

This is different in 11.23 and 11.31, where disks can grow, but this depends on the LVM version you use (1.0;2.0;2.1).

If you shrink the disks now, you have a risk to hit your data during this operation, so at this point I would do a backup ...

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!   
UVK
Trusted Contributor

Re: Increasing Volume group size

The only solution you have is to backup you data on the 20g mount. remove the PV related to the 20g lun and follow the regular procedure of creating the new pv and add the new pv to the vg. once you have your mount back with increased size you can restore the data.
-------------------------------------------
Like it or worked !! Click kudos !!
Sajjad Sahir
Honored Contributor

Re: Increasing Volume group size



Dear Randy

u can extend the the volume group
by adding new disk with the vgextend command

thanks and regards

Sajjad Sahir
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

I have changed the LUN size back to 20G. Are you saying I can make a new LUN and then do the lvextend?
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

lgextend
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

I'm not sure how we are supposed to know that your original LUN/VG is uncompromised. You'll need to verify that first, then run vgextend, giving it the new LUN. If all that succeeds, run extendfs.


Pete

Pete
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

Is there a command to run so the HP machine will recognize the new LUN or should it show up automatically?
Torsten.
Acclaimed Contributor

Re: Increasing Volume group size

Simply do an ioscan, the disk without device files is your new disk.
Now run "insf -eCdisk" to create new device files.

Create the PV (pvcreate) and extend the VG (vgextend).

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!   
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

I have created the new LUN but I do not see it on my HP machine.
Tingli
Esteemed Contributor
Solution

Re: Increasing Volume group size

Run
# ioscan -fnC disk
# insf -e

You should see the new lun.
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

I see the new lun. It shows up with 4 devices under /dev/rdsk. Do I need to extend my vg to all 4?
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

I see the new LUN. I have performed the pvcreate and vgextend. But I'm having problems with the lvextend. But I am having problems with the lvextend.
Receiving the following error.

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg_audev_backup/audev_backup" could not be extended.
Failure possibly caused by strict allocation policy

The new LUN I created is 60G. Below is my vgdisplay for vg_audev_backup

VG Name /dev/vg_audev_backup
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 5119
VGDA 4
PE Size (Mbytes) 4
Total PE 10238
Alloc PE 5000
Free PE 5238
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg_audev_backup/audev_backup
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 5000
Allocated PE 5000
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c49t3d0
PV Name /dev/dsk/c55t3d0 Alternate Link
PV Name /dev/dsk/c52t3d0 Alternate Link
PV Name /dev/dsk/c58t3d0 Alternate Link
PV Status available
Total PE 5119
Free PE 119
Autoswitch On

PV Name /dev/dsk/c52t3d1
PV Name /dev/dsk/c49t3d1 Alternate Link
PV Name /dev/dsk/c58t3d1 Alternate Link
PV Name /dev/dsk/c55t3d1 Alternate Link
PV Status available
Total PE 5119
Free PE 5119
Autoswitch On
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

We need the lvdisplay output for the LV you're trying to extend.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

To be more definitive, you should run lvdsiplay on the LV in question and look for the "Allocation" line. If it says strict/contiguous, then you are going to have to recreate (backup, lvremove, lvcreaate, restore) your logical volume with a non-contiguous policy (no -C switch on lvcreate).


Pete

Pete
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

LV Name /dev/vg_audev_backup/audev_backup
VG Name /dev/vg_audev_backup
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 20000
Current LE 5000
Allocated PE 5000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

Is there anyway to turn off the strict allocation so I can extend this volume?
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

"you are going to have to recreate (backup, lvremove, lvcreaate, restore)"


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

Disregard that last answer and see the lvchange command.


Pete

Pete
Randy Durden
Frequent Advisor

Re: Increasing Volume group size

Can you give me the format I should use for the lvchange command?
Pete Randall
Outstanding Contributor

Re: Increasing Volume group size

lvchange -C n /dev/vg_audev_backup/audev_backup


Pete

Pete