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

Unable To Extend the Size of a Logical Volume File System

Go to solution
Frequent Advisor

Unable To Extend the Size of a Logical Volume File System


# uname -a
HP-UX deedee B.11.23 U ia64 4294967295 unlimited-user license

# bdf /opt
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol6 6553600 6394216 158144 98% /opt

/opt is almost full and so lvol6 needs to be
extended in size

When I try to extend lvol6 from 400 PE's to
a new size of 493 PE's, I get the following:

# lvextend -l 493 /dev/vg00/lvol6
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol6" could not be extended.

I did a "pvdisplay -v" and discovered that
all of the PE's in lvol6 are located on disk
/dev/dsk/c8t0d1s2 /dev/dsk/c8t0d1s2 is part of
a SAN environment.

Running "pvdisplay -v /dev/dsk/c8t0d1s2"
shows that there are now zero Free PE available.

My question is this: Is it somehow possible to free up the extents shown for
one of the other file systems, specifically
/dev/vg00/lvol9, and make them available
for /dev/vg00/lvol6?

# pvdisplay -v /dev/dsk/c8t0d1s2 | more

--- Physical volumes ---
PV Name /dev/dsk/c8t0d1s2
PV Name /dev/dsk/c10t0d1s2 Alternate Link
VG Name /dev/vg00
PV Status available
Allocatable yes
Cur LV 9
PE Size (Mbytes) 16
Total PE 3463
Free PE 0
Allocated PE 3463
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol1 19 19
/dev/vg00/lvol2 256 256
/dev/vg00/lvol3 33 33
/dev/vg00/lvol4 32 32
/dev/vg00/lvol5 2 2
/dev/vg00/lvol6 400 400
/dev/vg00/lvol7 384 384
/dev/vg00/lvol8 288 288
/dev/vg00/lvol9 2049 2049

Rob Sandifer
Honored Contributor

Re: Unable To Extend the Size of a Logical Volume File System

Assuming that lvol9 (whatever might be on that volume) has free space. What does this report in the Avail column?:

bdf /dev/vg00/lvol9

If there is available space, you can reduce lvol9 and now vg00 will have Free Extents. However, how you reduce lvol9 depends on whether you have Online JFS installed. If true, then the man page for fsadm_vxfs will show a -b option. In that case, you can resize lvol9 with fsadm (be sure you use the badly documented "m" suffix to show megabytes (rather than the undefined default called 'sectors'). Once the filesystem has been reduced with fsadm, reduce the lvol9 size with lvreduce. Use -L (MB) rather than -l (PE) to match fsadm.

On the other hand, if you do not have the -b option for fsadm, you must backup the entire lvol9 volume, then umount the filesystem, use lvreduce to make lvol9 smaller, then run newfs, mount the volume and then restore lvol9 from your backup tape.

Now you can lvextend lvol6. Note: If you have Online JFS, fsadm -b will then extend the filesystem. If not, you must umount /opt (which will be very difficult while running multiuser mode) to run extendfs to extend the lvol6 filesystem.

Bill Hassell, sysadmin
Valued Contributor

Re: Unable To Extend the Size of a Logical Volume File System

If you have onlineJFS product, then you can reduce the file system & extend the FS which require.
Or, even, you can take a backup of lvol9 mount point. Delete & re-create it with required sizes.