1753360 Members
4821 Online
108792 Solutions
New Discussion юеВ

Expanding new LUN /PV

 
SOLVED
Go to solution
Timothy Nibbe
Advisor

Expanding new LUN /PV

I am trying to expand an existing filesystem that has had the LUN replaced with a larger LUN

It is a 9000 running HP-UX 11.23 with mirror license.

I had an existing filesystem that is 500GB.

A new 600GB LUN was presented to the server and a new pv was created.

I incorporate the new pv into the existing vg with vgextend.

I mirrored the two pv's with lvextend -m 1

I removed the old (500GB) pv from the mirror with lvreduce -m 0

I removed the old pv from the vg with vgreduce

I removed the old pv from the LUN with pvremove

I now have a new 600GB pv that has free PEs that I would like to allocate and add to the existing vg.

# pvdisplay /dev/dsk/c6t0d3
--- Physical volumes ---
PV Name /dev/dsk/c6t0d3
PV Name /dev/dsk/c8t0d3 Alternate Link
VG Name /dev/vgsan04
PV Status available
Allocatable yes
VGDA 2
Cur LV 1
PE Size (Mbytes) 128
Total PE 4799
Free PE 801
Allocated PE 3998
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On


# vgdisplay /dev/vgsan04
--- Volume groups ---
VG Name /dev/vgsan04
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 65535
VGDA 2
PE Size (Mbytes) 128
Total PE 4799
Alloc PE 3998
Free PE 801
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


The goal is for the pv and vg to have Free PE = 0 and Allocated PE = 4799

Is it possible to do this without service disruption?
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: Expanding new LUN /PV

Hi:

> The goal is for the pv and vg to have Free PE = 0 and Allocated PE = 4799
Is it possible to do this without service disruption?

You need to 'lvextend' the logical volume that resides within the volume group. Then, use 'fsadm' to enlarge the filesystem contained within the logical volume. No service interruption is required assuming that you have OnlineJFS. Otherwise, you will need to unmount the filesystem in question; 'lvextend' the logical volume; use 'extendfs' to increase the filesystem size; and then re-mount.

Regards!

...JRF...
Timothy Nibbe
Advisor

Re: Expanding new LUN /PV

Thank you, it worked great. Using fsadm made me understand why I had to take computer math classes.

P Arumugavel
Respected Contributor

Re: Expanding new LUN /PV

hi...
You can extend or shrink mounted file systems using the fsadm command. Use the extendfs command to extend the size of an unmounted file system. But if a file system is full, busy, or too fragmented, the resize operation may fail. See the man pages of fsadm and extendfs.