Unable to extend volume group(VG)

Would some help me on this below

I am trying to extend file system on AIX and however unable to extend the file system.

0516-306 extendvg: Unable to find physical volume 20 in the Device
        Configuration Database.
0516-321 extendvg: Physical volume u01-lv is not configured.
0516-792 extendvg: Unable to extend volume group.


� The details are as below

#lsvg
rootvg
oravg
#lsvg oravg
VOLUME GROUP:       oravg                    VG IDENTIFIER:  00f76b1400004c000000013825c12284
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1439 (184192 megabytes)
MAX LVs:            256                      FREE PPs:       1 (128 megabytes)
LVs:                2                        USED PPs:       1438 (184064 megabytes)
OPEN LVs:           2                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     2032                     MAX PVs:        16
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      non-relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no

#lspv
hdisk0          00f76b14f6227370                    rootvg          active
hdisk1          00f76b14159e4a06                    rootvg          active
hdisk2          00f76b1425c12078                    oravg           active

� After increasing the lun in the storage

Run the #cfgmgr

� Unable to extend the VG

#extendvg oravg 20 hdisk2
0516-306 extendvg: Unable to find physical volume 20 in the Device
        Configuration Database.
0516-792 extendvg: Unable to extend volume group.

Thanks in advance

Thanks
Murali

Your command

#extendvg oravg 20 hdisk2

Why the 20?
I would think

#extendvg oravg hdisk2

since you are adding a physical volume to the volume group

Still i got the below error


#extendvg oravg hdisk2
0516-1398 extendvg: The physical volume hdisk2, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-792 extendvg: Unable to extend volume group.


Your lspv command seems to show that hdisk2 belongs to oravg.
Right?

Yes

2# lspv
hdisk0          00f76b14f6227370                    rootvg          active
hdisk1          00f76b14159e4a06                    rootvg          active
hdisk2          00f76b1425c12078                    oravg           active

extendvg is for adding ( extend...) a new PV to a vg, which is not your case... I have not enough knowledge of AIX with lpar vio etc.. to tell you what command you will have to use, but the system if you did nothing knows nothing about the new size of the PV, that cfgmgr will perhaps notice the change, but I am sure there are some specific commands for LUNS... then you may have to change some VG attributes (smitty LVM...)...

So, you are attempting to add a PV that is already attached to a different VG. Hence this new (and correct) error.

I am not sure if AIX allows for a PV to be split and assigned to two different VG. However, to go this route, I would think the PV would need to be detached from its existing VG - and that could result in lost data on that volume.

Hi Joe, I understand the LUN size was changed, so the device has to be scanned again to report the change and after perhaps there will be some chvg with fancy options.. but since we know nothing about the disks subsystem...

If that is the case, you are correct VBE and the OP should use chvg -g to have the new size be recognized.
And Joey you are correct too - a PV can only belong to one VG.

When you have run chvg -g and you see that the VG size is increased (check Total or Free PPs), you can do a chfs -a size=+20G /yourfilesystem if you want to extend a specific filesystem.

1 Like

are you making the disk larger from the SAN and then looking to see the disk change in AIX? or are you assigning a new disk to AIX and then extending the VG?

extendvg 

will work if you are combining two disk into one vg. Based on your outputs I did not see any new PV's.

if you are adding a new disk to the system you would then use:

extendvg oravg <New_PV>  

I'm not to sure where the "20" came from.

example:

extendvg oravg hdisk3

if you added the space directly to the PV and you are not seeing the change (not recommended) and you are not seeing this try the following:

unmount all filesystems
varyoffvg oravg 
rmdev <hdisk> 
and then run cfgmgr
mount back filesystems 

if it still fails you might want to check with the san team to ensure they added the LUN correctly with the correct WWPN

if you are not assigning it directly to that storage and you are actually assigning it to a new PV and you are just not seeing it, can you run this command and send the output:

lsdev -Cc disk

His cfgmgr output doesn't list a new PV so it seems he is trying to enlarge an existing PV/LUN which has been added some space on the SAN side.
I bet the 20 is GB, since there is no hdisk20 listed and hdisk2 is already part of a VG.
The OP has misinterpret the function of extendvg .

@Murali: It would be nice, if you enlighten us if we are on the right track and if you got along with your problem or not.

Yes,the above is correct

---------- Post updated at 08:13 AM ---------- Previous update was at 08:09 AM ----------

I would like to add number of PPS to ORAVG volume

bash-3.2# chvg -g oravg
0516-1382 chvg: Volume group is not changed. None of the disks in the
        volume group have grown in size.
0516-732 chvg: Unable to change volume group oravg.
bash-3.2#

bash-3.2# extendvg -f oravg hdisk2
0516-029 extendvg: The Physical Volume is a member of a currently
        varied on Volume Group and this cannot be overidden.
0516-1397 extendvg: The physical volume hdisk2, will not be added to
the volume group.
0516-792 extendvg: Unable to extend volume group.
bash-3.2#


bash-3.2# lsvg -p oravg
oravg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            active            1687        169         00..00..00..00..169

Thats is because the system doest not know things have changed... run cfgmgr and see after if your PV is of same size... and its not an extendvg you need but chvg -g but this will work ONLY once the system has seen the change!

+1 to what vbe said.

when using extendvg you are saying you want to combine 2 or more hdisk into one vg. this is not to actually increase the size of the vg. ok so according to your first post you did try

cfgmgr 

and you did not see the change.

using extendvg would be used if you had assinged a new disk and then wanted to combine that disk to oravg.
usage would be:

extendvg oravg hdisk3 (or whatever the new disk number is) 

This is not your case.

do try this:

unmount all filesystems within the oravg
(use lsvg -l oravg) 
varyoffvg oravg
lspv - make sure the vg is not in active state
run cfgmgr
lspv - see if the vg came back online
if it didn't use varyonvg oravg and lspv again to ensure the vg is active
lsvg oravg
confirm the vg has the disk change.

if you are not seeing the disk changes make sure the disk changes are made correctly.
how are you assigning the disk changes? are you using SAN or assigned to the vio, NPIV?
send the output of:

lsdev -Cc disk |grep hdisk2

highly suggest reviewing the man pages before using these commands:

extendvg
chvg 

if

chvg -g and cfgmgr 

are not seeing the change I'm going to strongly suggest to review how the storage was added.

You don't have to unmount file systems or varyoffvg .

Are you 100% positive the storage admin have increased the LUN size?

run 

bootinfo -s hdisk2 --> what is the size

cfgmgr -i hdisk

bootinfo -s hdisk2 --> what is the size(if SAN admin increased the LUN size you should see it here)

Now,
lsvg oravg | grep 'TOTAL PPs'

chvg -g oravg

lsvg oravg | grep 'TOTAL PPs' --> You should see the PP increase here.

You cannot extend a hdisk, which is already assigned to a VG.

DO NOT use extendvg command

1st figure out the LUN is increased in size or not.

Sorry for delay,I back to work again