Unable To Extend the Size of a Logical Volume File System

Background:

# uname -a
HP-UX deedee B.11.23 U ia64 4294967295 unlimited-user license
deedee.rsn.hp.com:/
# 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.

[/COLOR]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.

# 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
VGDA 2
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 
 

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 ?

Thanks in advance!

Rob S.

Dunno about exact disk layout (stripe or non-stripe, probably not striped since it's root VG).

For these operations you must have online JFS option/depot installed (resizing mount points without umounting them).
As you probably know, root lvm's cannot be umounted during runtime.

Commands you will be using are :

bdf <mountpoint of lvol9> ## check how many free space you have here.
fsadm <options> ## to reduce free space on <mountpoint> and return it as Free PE to lvol9.
lvreduce <options> on lvol9 # to reduce lvol9 and return Free PE's to vg00
vgdisplay /dev/vg00 # will now show Free PE's avalible.
lvextend <options> /dev/vg00/lvol6
lvdisplay /dev/vg00/lvol6 should now show added extents.
fsadm <options> to increase mountpoint size of lvol6

Remember be careful when looking PE have their size, so if you are using fsadm be sure calculate first for reduction/increase and use appropriate switches (-l and -L). Also, after adding PE's to your LV, fsadm operation requires complete size (old + added) of LV.

Also take backups :slight_smile: (ignite is kewl here).

Here is a nice link.
HP-UX Logical Volume Manager (LVM)

  1. Do you have OnlineJFS installed? (License required)

Secondly, we need to understand the fact that most of the things specified on books does not work when it comes to production environment. There are steps to do a lot of things, but, sometimes its a pain. Like, migrating a server from 11.11 to 11.31, its possible. But, again, you need to go through a lot of pain.

If I was going to do this, I would take a ignite backup (ignite is free), plan a downtime, restore it with the modified sizes. Should not take much time, no
confusions, no data loss, no pain. :slight_smile:

Alternatively, you can also add up a lun / extend it from storage install DLE and work, or, extend your lvol on another disk under vg00 and proceed, but, again complicated.

Again, your scenario is possible. But, ignite would do a charm! :slight_smile:

-DB

I fixed the problem by running:

pvmove -n /dev/vg00/lvol9 /dev/dsk/c8t0d1s2 /dev/dsk/c8t0d3

Thanks for your help and pointers!

Rob S.