unix sysadmin archives
Donation will make us pay more time on the project:
          

Wednesday 15 June 2011

How to Increase AIX filesystem size

Incase your file system reaches the limit and there is no other choice but to increase the space, here is quick reference in doing so.
Let’s say this is my disk usage.
  
   /dev/reciofs01      2097152     19720  100%       11     1% /app/recio/fs01


First we have to identify from which volume group it belongs. So, listing all my fs, I got this list.

# lsvg
rootvg
datavg
apprecvg


I have three volume groups. One of them is the group from which /app/recio/fs01 belongs.

Let’s search for the file system entry in lsvg:

# lsvg -l rootvg | grep -i /app/recio/fs01
# lsvg -l datavg | grep -i /app/recio/fs01
# lsvg -l apprecvg | grep -i /app/recio/fs01
apprecvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
reciofs01           jfs2       9       9       2    open/syncd    /app/recio/fs01

It belongs to the apprecvg volume group.

Now let’s check PPs free space in lsvg.
Note: 1 PPS is equivalent to 32MB of disk space.

# lsvg -p apprecvg
apprecvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdiskpower1      active             100         0           00..00..00..00..00
hdiskpower2       active            100         0           00..00..00..00..00
hdiskpower3      active             600         321         90..00..80..70..81
hdiskpower4      active             600         255         50..50..50..50..55

From here we can see that it still have a lot of free PPS (321 from hdiskpower3 and 255 from hdiskpower4).


Now here is how we increase file system size:

# chfs -a size=+200MB /app/recio/fs01
Filesystem size changed


Let’s verify how much it gained from the addition.

# df -g /app/recio/fs01
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/reciofs01    2.25       0.27   89%       11     1% /app/recio/fs01

Increased by 11%.

1 comment:

  1. Hi :) Nice. lslv [lvname] will also tell you which VG it is in. Helpful in case you have 10 or 20 more VGs and do not want to lsvg each one.

    e.g.
    # df -k /home
    Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
    /dev/hd1 2097152 218780 90% 25894 30% /home
    # lslv hd1
    LOGICAL VOLUME: hd1 VOLUME GROUP: rootvg
    ..
    ..
    #

    (my example posted here: http://geekswing.com/geek/how-to-expand-a-filesystem-in-aix-df-lsvg-chfs/ )

    ReplyDelete