The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 02-05-2008
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,640
Quote:
Originally Posted by magasem View Post
but I need now to reduce the percentage for /usr
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:


Code:
# 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:


Code:
# 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):


Code:
# bc
2*1024*128*8 
2097152

# chfs -a size=+2097152 /usr

I hope this helps.

bakunin