Creating Normal,Big,Scalable VG on AIX

 
 
 

Tuesday, 17 July 2012

 

Creating Normal,Big,Scalable VG on AIX

After SAN team assigned Disks/LUNs to the server,we need to scan it from OS side and once scanned completed successfully and disks are available we will be able to create Volume Group , Logical Volume and File Systems.
Remeber :
Volume Groups have 3 different types:
Regular – Limit of 128 Physical Volumes per VG, and 256 Logical Volumes per VG
Big Format – Limit of 256 Physical Volumes per VG, and 512 Logical Volumes per VG
Scalable Format – only for AIX 5.3 and above, PV and LV limitations can be defined by the administrator
To read more about AIX Volume Group Click Volume Group In AIX . Here I have taken example of creating a VG named sapvg . The creation procedure of paging space or log lv we will cover in another tutorial.

Procedure for creating filesystem :

1. Run cfgmgr to rescan the harware for OS. If any new Luns are presented to the system it will detect . On our example these Luns are hdisk2 , hdisk3 and hdisk4
cfgmgr
As you can see below Luns hdisk2 , hdisk3 and hdisk4 are free ( None)
$ lspv
hdisk0 00083535e5c25171 None
hdisk1 00083535457a51d6 rootvg active
hdisk2 00083535f98c392b None
hdisk3 0008353512aa7bd8 None
hdisk4 000835357cb3824b None
2.creates Normal vg with 128MB PP size
mkvg -y sapvg -s 128 hdisk2 hdisk3

OR

creates vg with default PP size
mkvg -y sapvg hdisk2 hdisk3
To Create Big volume group
mkvg –B –y [VG Name] -s [PP Size] [PV Name]
The –B flag creates a “big” volume group. A regular format VG has an LV limit of 256. The big VG format has a limit of 512.
Similarly to Create Scalable volume group
mkvg –S –y [VG Name] -s [PP Size] [PV Name]
3 .Verify it
lsvg -p sapvg;
lsvg sapvg
4.Creating an enhanced (JFS2) LV saplv on sapvg Volume group with 32 GB space
mklv -y saplv -t jfs2 sapvg 32G

Or

Creating an enhanced (JFS2) LV saplv on sapvg Volume group with 32 GB space on hisk2
mklv -y saplv -t jfs2 -a e sapvg 32G hdisk2
5.Creates fs with specified saplv and set auto mount
crfs -v jfs2 -a -d /dev/saplv -m /sap
6.Mount the filesystem
mount /sap
7.Set owner/permission as required
chown -R sapuser:dba /sap

Extending a VG

1. In our case we have one disk left unassigned hdisk4 . Let’s use it to extend sapvg VG
extendvg sapvg hdisk4
2. Verify it
lsvg -p sapvg

Reducing a VG

reducevg -f sapvg hdisk3

Increasing/Reduceing a filesystem

1) Check the available space in the VG . Read more about lsvg command click lsvg VGName: Explanation of the Volume Group Characteristics
lsvg sapvg
2) If space is there increase it.
chfs -a size=+30G /sap
3. Reducing filesystem size is only possible for JFS2 not with JFS . Read more about filesystem click  JFS Vs JFS2
chfs -a size=-30G /sap

Removing a filesystem

1. Un mount it .
umount /sap
2. Remove the filesystem with rmfs and it will automatically remove the corresponding LV also.
rmfs /sap

Removing only LV

rmlv /dev/saplv

####
umount /filesystem
varyoffvg testvg
exportvg testvg
lspv

rmdev -dl hdiskXX

cfgmgr
lspv
importvg -y testvg hdiskXX
varyonvg testvg
mount /filesystem

mkvg -S -y testvg -s 256 hdiskXX
mklv -y lv_test -t jfs2 -L lv_test testvg 10240M
crfs -v jfs2 -m /pure -d lv_test -g testvg -A yes -p rw -a logname=INLINE

mount /filesystem
chmod 755 /filesystem
####

5 (1)
Article Rating (1 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
AIX oslevel version OS
Viewed 4863 times since Wed, Apr 17, 2019
AIX Errpt - Diag - Alog
Viewed 3595 times since Wed, Mar 20, 2019
Getting list users and groups in AIX
Viewed 3527 times since Mon, May 28, 2018
Oslevel shows wrong AIX’s level. Why
Viewed 4702 times since Thu, Feb 21, 2019
AIX, Networking Etherchannel failover testing
Viewed 2570 times since Fri, Apr 19, 2019
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 2490 times since Tue, Jul 17, 2018
AIX Creating EtherChannel Devices from Command Line
Viewed 3456 times since Mon, Jun 3, 2019
AIX - How to shutdown or reboot
Viewed 5467 times since Fri, Jun 8, 2018
Awesome Command to show top 15 processes using memory on AIX
Viewed 23804 times since Thu, Nov 29, 2018
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 90010 times since Thu, Jun 21, 2018