Thursday, March 15, 2018

Volume group types in AIX


Types of Volume group and their characteristic in AIX
Nomal VG- Max PV 32
Big VG- Max PV 128
 Scalable VG- Max PV 1024


Below table give exact Idea types of volume group in AIX.


VG 
Maximum PVs
Maximum PPs per VG
Normal VG
32
32,512 (1016 * 32)
Big VG
128
130,048 (1016 * 128)
Scalable VG
1024
2,097,152

Scenario
Convert AIX Volume group from Normal to big using following command

prerequisite before conversion from MAN page of AIX chvg:

The -B flag cannot be used if there are any stale physical partitions.

Once the volume group is converted, it cannot be imported into AIX 4.3.1 or lower versions.

The -B flag cannot be used if the volume group is varied on in concurrent mode.

There must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful.
Because the VGDA resides on the edge of the disk and it requires contiguous space for expansion, the free partitions are required on the edge of
the disk. 

#chvg -B vgname

Example

# chvg -B myvg
0516-1164 chvg: Volume group myvg changed.  With given characteristics myvg
        can include up to 128 physical volumes with 1016 physical partitions each.

============================================================

Scenario
Convert AIX Volume group from big to scalable using following command

Varyoff vg first then execute command chvg like below.


Prerequisites before converting AIX volume group from Big to scalable
====================================================
1.No stale partition in VG
2.AIX volume group must be varied off state
3.on AIX VG there must be some free PP.


# varyoffvg myvg

# chvg -G myvg

then varyon vg using below command

# varyonvg myvg

check Volume group type in AIX by using following command

lsvg myvg |grep -i MAX PV





 From MAN page of chvg AIX:

**Once the volume group is converted, it cannot be imported into AIX 5.2 or lower versions.


===============================================================

understanding T-Factor in AIX

AIX admin every time add new disk to volume group.so while adding physical volume to volume group need to concider following calculation.

Total number of PP= disk size / PP size.

max PP per PV in AIX like below

MAX PPs per PV:     1016   //maximum PP in VG where we adding new disk.

suppose PV in volume group rootvg having size 20 GB then above calculation looks like below

Total number of PP on PV =20480 /128

Total number of PP on PV=160

but there is situation while adding PV to volume group you get following error:

**Unable to extend volume group

**use chvg command with -t option to attempt to change the 
maximum Physical Partitions per Physical volume for this volume group


so in above situation T factor comes in picture .

so how to decide T factor:

suppose i want add 200 GB disk in volume group then number of PP on new disk is 1600.

200*1024 (convert to MB)=204800
204800 / 128 (PP size in Vg)     =   1600 PP on new PV.


here this PV will be rejected by VG giving reason that limitation of max PP which is 1016.

to increase PP per PV in volume group command is like below

#chvg -t vgname

factor value = number off PPs on new disk / 1016

factor value= 1600 / 1016

factor value=1.5  //

factor value should be round up so it will be 2.

chvg -t 2 rootvg

after this command  "MAX PPs per PV:  2032"

now after changing T factor AIX admin tried to add the command  will definitely succeed.

AIX chvg T -Factor table for reference :






In short we can say that T-factor increase Number of PP per PV in AIX ,but deceases number of PV in AIX Volume group.









Saturday, March 10, 2018

Troubleshooting AIX file system extend issue

Troubleshooting AIX file system extend issue
=================================

scenario:

extend /test on AIX client by 100 GB.

current size /test is 5GB.

chfs -a size=+100G /test

Error Message:  0516-787 extendlv: Maximum allocation for logical volume is 512

analysis:

here found that PP size in VG is 128 MB and MAX limit of LP is 512,so maximum allowed File system extend is 65GB.

calculation
=============================
current LV MAX size
128 (PP size)*512(max LP limit of LV)= 65GB
here need to extend max limit so that we extend FS to 105 GB

MAX LP calculation 
1024*105=107520/128 =840 LP require to set in MAX LP .

solution:

extend LV's  maximum LP limit by using following command

chlv -x [no of lp] [lvname]
extendlv testlv [no. of LP]
or 
smit chlv==>change characteristic to logical volume==>select LV=>find and enter MAX LP value and press enter

 and then execute filesystem extend command.

chfs -a size=+100G /test

=============================================================

How to Extend Physical volume in AIX volume group from storage end.

solution:

i came across this type of scenario when there was no free PP available on AIX volume group.
so i requested to storage guy to extend existing Physical volume.
following details requested storage guy to identify Lun at storage side
1.Lun ID 
2.Physical volume size
3.Lun name.

after Physical volume expanded from storage side AIX admin need to execute following command to add free PP in Physical volume.

#chvg -g testvg

-g   this flag scan disk in volume group and add addtional PP to Physical volume on AIX if its grown in size.

please dont  confuse between "-g" and "G" flag of chvg.here capital "G" is for changing volume group to scalable format.remember that if there is stale partition on AIX volume group we cant proceed with this command ,first we need to sort out this issue.


In AIX there are three types of volume group .

1.normal -32 PV
2.Big-128 PV
3.scalable-1024 PV

command example:

#chvg -B vgname  -convert volume group to Big type which can accommodate 128 physical volume.there must be no stale partition before executing this command 

#chvg -G vgname -covert to scalable volume group.
while executing above command please make sure that there is no stale PP on volume group.
also there is free PP available on each physical volume to accommodate VGDA expansion and most important AIX volume group must be varied off state.







 








Vfiler mount error mount: 1831-011

Vfiler mount troubleshoot on AIX server
=============================

while mounting Vfiler on AIX client getting follwing error :

#mount -t nfs [vfiler path] /mount point

"mount.nfs: access denied by server while mounting"
 Error: mount: 1831-011

incident analysis :

NetApp filer
  :From storage side check whether AIX client has access to Vfiler.

Observation: From NetApp filer side AIX client didn't Vfiler access .

Action done to solve issue:
Add AIX client to Vfiler access list.



#mount -t nfs [vfiler path] /mount point

IT works !!!!!!

other checks for vfiler troubleshoot:

  • check required ports are open at filer side and confirm that firewall is not blocking communication between vfiler and AIX client.
  • check whether mount point is not busy at AIX client side.