Tuesday, January 25, 2011

How to increase the file system size on an AIX 7.1 server

I was running out of filesystem space on my AIX 7.1 box

The df output showed that things were pretty tight:
isvp17> df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4         512.00    330.59   36%     9762    12% /
/dev/hd2       16896.00  14787.64   13%    43253     2% /usr
/dev/hd9var      512.00    232.75   55%     5726    10% /var
/dev/hd3        3584.00   3581.39    1%       40     1% /tmp
/dev/hd1         256.00    120.70   53%      183     1% /home
/dev/hd11admin    256.00    255.62    1%        5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt     512.00    336.83   35%     7007     9% /opt
/dev/livedump    256.00    255.64    1%        4     1% /var/adm/ras/livedump
isvp17>

The volume group rootvg in my case had one physical volume(hdisk0). All the physical volumes in
volume group are divided into physical partitions(PPs) of the same size.
To check if there is any free space on the physical volume which has rootvg i did
isvp17> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            559         454         111..97..22..112..112

454 = number of free physical partitions(PP).
isvp17> chfs -a size=5G /
Filesystem size changed to 10485760
isvp17> df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4        5120.00   4937.89    4%     9762     1% /
/dev/hd2       16896.00  14787.64   13%    43253     2% /usr
/dev/hd9var      512.00    232.68   55%     5726    10% /var
/dev/hd3        3584.00   3581.39    1%       40     1% /tmp
/dev/hd1         256.00    120.68   53%      183     1% /home
/dev/hd11admin    256.00    255.62    1%        5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt     512.00    336.83   35%     7007     9% /opt
/dev/livedump    256.00    255.64    1%        4     1% /var/adm/ras/livedump
isvp17>
isvp17> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            559         436         111..97..04..112..112
isvp17> 
 
Next I increased the size of /home filesysem to 15GB
isvp17> chfs -a size=15G /home
Filesystem size changed to 31457280
isvp17> lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            559         377         111..42..00..112..112
isvp17>
 
It's good to know that I still have 377 physical partitions free in case I need
to increase it further in the future. 

5 comments:

Dave Miller said...

Thanks. I'm new to AIX administration. I did a "lean on the enter key" install of 7.1 and promptly ran out of space for everything that I needed to do. I knew the drive had more space than what was allocated so the question came down to how to change the allocation.

Cheers,
Dave

Mayur said...

Dave, thank you for leaving a comment. It's always nice to know that the blog entry has helped.

cheers,
mayur

sandeep said...

Thanks for the valuable command

Unknown said...

Ditto what Dave said!!!

I too am in a similar situation and have an audience watching me. I needed to increase a file system space pretty quickly. Thank you so much for your help. I'm glad my google search revealed your blog first. Again thank you!

Randall Lucas

Mayur said...

Thank you for your feedback Sandeep and Randall, really appreciate it.