AIX tips

Adding user to group

please take in mind that in AIX u cant add new group to existing ones by single command/parameter like in RHEL/SUSE, so be carefull using -G parameter

USER=jamesbond; NEWGROUP=wheel; usermod -G `id -nG $USER | tr " " ","`,$NEWGROUP $USER

Extending FS on AIX

1) we are interrested in mountpoint /sapmnt/sap
2) we need to know volume name => volume name is lv4
3) lslv lv4 -> i need to find volume group name => d4dvg
4) lsvg d4dvg => we need to know available free space we can use for extending "FREE PPs:"
5) ok, we can extend for maximum of 1GB: chfs -a size=+1G <mount point>

opr879@udv:/home/opr879 $ df -sk
Filesystem   1024-blocks     Free* %Used    Iused %Iused Mounted on
/dev/hd4     327680    181520   45%     3225     8% /
/dev/lv4     9043968    329432   97%  1277966    95% /sapmnt/sap

server:/ # lslv lv4
LOGICAL VOLUME:     lv4               VOLUME GROUP:   d4dvg
LV IDENTIFIER:      00ca3fcd00004c000000011ecfc6c298.10 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                138                    PPs:            138
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    128
MOUNT POINT:        /sapmnt/sap            LABEL:          /sapmnt/sap
MIRROR WRITE CONSISTENCY: on/ACTIVE                              
EACH LP COPY ON A SEPARATE PV ?: yes                                    
Serialize IO ?:     NO                                     

server:/ # lsvg d4dvg
VOLUME GROUP:       d4dvg                    VG IDENTIFIER:  00ca3fcd00004c000000011ecfc6c298
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3258 (208512 megabytes)
MAX LVs:            512                      FREE PPs:       16 (1024 megabytes)
LVs:                13                       USED PPs:       3242 (207488 megabytes)
OPEN LVs:           12                       QUORUM:         4 (Enabled)
TOTAL PVs:          6                        VG DESCRIPTORS: 6
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         6                        AUTO ON:        yes
MAX PPs per VG:     130048                                    
MAX PPs per PV:     1016                     MAX PVs:        128
LTG size (Dynamic): 128 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable


server:/ #chfs -a size=+1G /dev/lv4

Sometimes attempt to extend FS failes because number of LPs is approaching to MAX LPs:

root@server2:/ # lslv lv5
LOGICAL VOLUME:     lv5              VOLUME GROUP:   edi01vg
LV IDENTIFIER:      005a6c5a00004c00000000f66adb3cb4.3 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            2048                 PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                1994                PPs:            1994
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        /e                 LABEL:          /e
MIRROR WRITE CONSISTENCY: on/ACTIVE                             
EACH LP COPY ON A SEPARATE PV ?: yes                                   
Serialize IO ?:     NO    

if this is the issue we can increase MAX LPs

chlv -x 3000 <log.vol>

and then we can try to extend FS again

Leave a Reply

Your email address will not be published. Required fields are marked *

Write numbers u see, eg. 365 *