AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Increasing a file system size on AIX 6.1

  • 1.  Increasing a file system size on AIX 6.1

    Posted Wed February 01, 2017 10:40 AM

    Originally posted by: SimionOnea


    Hello!

     

    We have an AIX 6.1 system.

    There is a file system which needs to be increased in size:

    # df -g /opt2

    Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

    /dev/opt2lv       80.00      3.04   97%   144641    15% /opt2

     

    From the output above we see that this filesystem is located on the "opt2lv" Logical Volume.

    To find out the Volume Group that this LV belongs to we issue the following command:

    # lslv opt2lv

    LOGICAL VOLUME:     opt2lv                 VOLUME GROUP:   rootvg

    LV IDENTIFIER:      00f66b5600004c000000012e523742ac.13 PERMISSION:     read/write

    VG STATE:           active/complete        LV STATE:       opened/syncd

    TYPE:               jfs2                   WRITE VERIFY:   off

    MAX LPs:            512                    PP SIZE:        256 megabyte(s)

    COPIES:             2                      SCHED POLICY:   parallel

    LPs:                320                    PPs:            640

    STALE PPs:          0                      BB POLICY:      relocatable

    INTER-POLICY:       minimum                RELOCATABLE:    yes

    INTRA-POLICY:       middle                 UPPER BOUND:    32

    MOUNT POINT:        /opt2                  LABEL:          /opt2

    MIRROR WRITE CONSISTENCY: on/ACTIVE

    EACH LP COPY ON A SEPARATE PV ?: yes

    Serialize IO ?:     NO

     

    From the output above we see that this Logical Volume is part of "rootvg" Volume Group.

    To find the status and parameters of the Volume Group we issue the following command:

    # lsvg rootvg

    VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00f66b5600004c000000012e523742ac

    VG STATE:           active                   PP SIZE:        256 megabyte(s)

    VG PERMISSION:      read/write               TOTAL PPs:      3326 (851456 megabytes)

    MAX LVs:            256                      FREE PPs:       1795 (459520 megabytes)

    LVs:                15                       USED PPs:       1531 (391936 megabytes)

    OPEN LVs:           13                       QUORUM:         1 (Disabled)

    TOTAL PVs:          4                        VG DESCRIPTORS: 4

    STALE PVs:          0                        STALE PPs:      0

    ACTIVE PVs:         4                        AUTO ON:        yes

    MAX PPs per VG:     32512

    MAX PPs per PV:     2032                     MAX PVs:        16

    LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no

    HOT SPARE:          no                       BB POLICY:      relocatable

    PV RESTRICTION:     none

     

    From the output above we see that the Volume Group has free PPs: 1795 (459520 megabytes).

    Taking into consideration that each Logical Partition of the Logical Volume is written on two Physical Partitions, we can conclude that we can increase the size of the Logical Volume to 200 GB and some free PPs will still be available.

    To change the size of the Logical Volume and the file system we can issue the following command:

    # chfs -a size=200G /opt2

     

    My questions are:

    1. Is the above line of thought correct?
    2. Are there any other aspects which must be taken into consideration before performing this operation?
    3. Can the command "chfs" be performed on a working system?
    4. Is it in any way disruptive (increased latency, forcibly closed file handles, etc.)?
    5. Are there any risks involved?

    Thanks!



  • 2.  Re: Increasing a file system size on AIX 6.1

    Posted Wed February 01, 2017 04:46 PM

    Originally posted by: AncientAIXer


    1. You're getting there.

    2. You have 459520 megabytes (448.75 Gb) free in the volume group.  The logical volume has max LPs at 512.  To add 200 Gb, you need 800 LPs (256 Mb/LP). You will have to increase the max LPs for the LV.  On top of that the LV is mirrored (copies = 2) which is reflected in PPs being twice the number of LPs. This means you will need 1600 PPs, which you have since the VG has 1795 free.  But since it is mirrored, that means at least 2 PVs, and with only 195 PPs left, depending upon how non-mirrored LVs are distributed, you may not have enough PPs that will fulfill the LV/mirroring strictness.  You could try to analyze the layout of the LVs, etc., but that is very time consuming and most admins will just go ahead and try to see if they get an error. If you do get an error, you will have to add space by adding a PV or expanding a SAN LUN.

    3. Yes. It's done all the time.

    4. Not really. It is usually so quick that even on a heavily used system no one would notice.

    5. Not really.  AIX will prevent any issues.