file system size

Dear ALL

Today I faced one problem in the file system, during invoking the command #df -k , I saw /usr reached to 95% Used, could any one give advice ?

thanks & regarded

What sort of advice are you looking for ?

Is it to find the process that is using so much of space and to kill it ?
To identify the userid dumping data to fill up /usr ?
To create an alarm for a defined threshold level ?

Could you please be specific in your question :slight_smile:

I am looking only to reduce /usr to normal precentage such as expand the file or trnsfer to another file.

In most other UNIX dialects this might be a problem, but in AIX (you are in the AIX forum, so i suppose you use it, not any other UNIX dialect) it is not. The reason is, that practically all the files in /usr are put there by installation tools and the AIX installation tool (installp) will expand the filesystem itself if it runs out of space during an installation.

Most AIX systems are far into the nineties if i issue a "df -k /usr" and it never has posed a problem in the years i have been working with AIX.

I hope this helps.

bakunin

thank you bakunin to your feed back about "installp", but I need now to reduce the percentage for /usr could you help for this, because i didn't install S/W .

I still do not understand why you do have to increase the available space (IMHO this is a waste of diskspace), but here is how you do it:

  1. find out, how much space is left in the rootvg and decide, how much you want to assign to the /usr filesystem:
# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  0000fc010000d6000000011054db9d7c
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (139776 megabytes)
MAX LVs:            256                      FREE PPs:       910 (116480 megabytes)
LVs:                14                       USED PPs:       182 (23296 megabytes)
OPEN LVs:           13                       QUORUM:         1
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        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 

# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
hd5                 boot       1     2     2    closed/syncd  N/A
hd6                 paging     32    64    2    open/syncd    N/A
hd8                 jfs2log    1     2     2    open/syncd    N/A
hd4                 jfs2       1     2     2    open/syncd    /
hd2                 jfs2       20    40    2    open/syncd    /usr
hd9var              jfs2       8     16    2    open/syncd    /var
hd3                 jfs2       9     18    2    open/syncd    /tmp
hd1                 jfs2       7     14    2    open/syncd    /home
hd10opt             jfs2       1     2     2    open/syncd    /opt
lg_dumplv           sysdump    8     8     1    open/syncd    N/A
usr_local_lv        jfs2       2     4     2    open/syncd    /usr/local

I have marked bold the relevant parts: In this example your smallest assignment unit is 128MB (PP size) and you have 910 (free PPs) of these 128MB-chunks available. As your rootvg is mirrored (see the LP to PP ratio of 1:2) you will need 2 PPs for every new LP you assign. Right now you have 20 LPs (=> 20x128MB=2.5GB) assigned. For the sake of the example i assume you want to increase it by 1GB, which would be 8 LPs.

2.) Increase the size of the logical volume:

# extendlv hd2 8

3.) Increase the size of the filesystem:

Filesystems are measured in (512-bytes-)blocks. Calculate how many blocks you have to increase, then increase the filesystem (use ^D to leave bc):

# bc
2*1024*128*8 
2097152

# chfs -a size=+2097152 /usr

I hope this helps.

bakunin

Thank you very much with my full appreciation and respect for you.

yes, you can extend size of filesystem using chfs command as it was described by bakunin

in the same way you can decrease size of filesystems, you just need replace + on -
but, only JFS2 filesystems on AIX5.3 systems and higher could be decreased with chfs

more info is here chfs Command