-->
  • Recent Articles

    How To Expand A Filesystem in AIX

    How To Expand A Filesystem in AIX


    On One  fine day our /data directory reached 90%. We have been alarmed to extend the file system.



    Our /data directory reached 90%
    # df -k /data
    Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd1 2097152 218780 90% 25894 30% /data
    #

    Do we have enough space available in VG to expand?

    How much space is available in the VG?

    # lsvg rootvg
    VOLUME GROUP: rootvg VG IDENTIFIER: 0007b8420000d9000000011f2491100e
    VG STATE: active PP SIZE: 128 megabyte(s)
    VG PERMISSION: read/write TOTAL PPs: 599 (76672 megabytes)
    MAX LVs: 256 FREE PPs: 282 (36096 megabytes)
    LVs: 13 USED PPs: 317 (40576 megabytes)
    OPEN LVs: 11 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: 1016 MAX PVs: 32
    LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
    HOT SPARE: no BB POLICY: relocatable
    #

    Use chfs command to expand
    Examples
    chfs -a size=4G /data
    chfs -a size=4000M /data
    chfs -a size=+4G /data
    chfs -a size=+50M /data

    What those mean
    The “M” stands for megabytes
    The “G” stands for gigabytes
    The “+” is relative sizing: change the current amount by adding this much
    Without the “+” is absolute sizing: change the current amount TO this much
    .

    Here we are increasing the filesystem by 2.5G or 2500M

    Check before File system expansion
    # df -k /data Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd1 2097152 218780 90% 25894 30% /data
    We'll Now Increase the Filesystem size to  2.5 G more.
    # chfs -a size=+2500M /data Filesystem size changed to 5242880

    Now Check the Filesystem again after increment

    # df -k /data
    Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd1 2621440 742988 72% 25894 13% /data
    #

    No comments