AIX-ercise in filesystem Gymnastics


So for the last few hours I have been preparing for a change window I have this weekend to get a customer ready for a migration/upgrade.  I really don’t like AIX but this one just about brought me to my knees… I know a perfect image, open wide banana boy!!!

Not sure why I am even posting this aside from the simple fact that I spent so much time on it and want to see it in all it’s splendor somewhere other than in my editor…

I’m not even going to explain this one… Looks like I thought about making this one interactive/automated but it really is a one-off… and since every AIX system I manage, someone else built (ya no consistency) there isn’t much point by way of re-usability…If you are doing some AIX disk extending, maybe this will help you, or maybe not… Maybe I will comment on my own success/failure Monday after I actually do this… although I did do a dry-run of all this on a test box I have… LOL 🙂

/a is currently 33GB (32384MB) total = 33161216
/a has 17GB FREE
/a must have 15GB = 15595240
#
Thought process…
15595240/33161216*100 = 47%
15595240/20480000*100 = 76%
#
Total current sizes:    Projected new sizes:
/a        =  33GB = 48%
/        =  64MB = 68% –>   128MB 34%
/usr    = 896MB = 91% –> 1.800GB 45%
/var    = 448MB = 94% –>   896MB 47%
/tmp    = 128MB = 60% –>   256MB 30%
————-
3.080GB Total
#
copy everything from /a to /a3
# For reference later:
lsvg rootvg |grep PPs:|cut -c 42-79
TOTAL PPs:      1084 (69376 megabytes)
FREE PPs:       0 (0 megabytes) <– Point of interest following the rmfs of /a
USED PPs:       1084 (69376 megabytes)
STALE PPs:      66
#
ps -ef |grep /a/
vgsched stop # prob the only thing running attached to /a process-wise
for i in `ps -ef |grep /a/|awk ‘{print $2}’`; do kill -9 $i; done
umount /a
#
# Destroy /a
rmfs /a
rmlv: Logical volume lv00 is removed.
#Confirm that we got all of /a back as FREE PPs
lsvg rootvg |grep PPs:|cut -c 42-79
# Don’t think I need this after all as I am creating not by PP:
lsvg rootvg|grep “PP SIZE:”
# VG STATE:       active                   PP SIZE:        64 megabyte(s) (64*<number of FREE PE>=size)
# to realize the above “Thought process”:
crfs -v jfs2 -m /a -g rootvg -a size=+41943040 # 20GB (20*1024*1024*1024/512 = 41943040)
mount /a
# Make sure /a is in /etc/filesystems
# Now extend the other filesystems:
chfs -a size=131072 /
chfs -a size=1835008 /usr
chfs -a size=917504 /var
chfs -a size=262144 /tmp
Unchanged:
65536 /home
65536 /opt
df -k
df -g
# Re-sync the rootvg Volume Group:
syncvg rootvg
#
# rootvg:
Total Disk:        35520512 (34688MB = 36GB)
Appropriated:    22544384 (22016MB = 23GB)
Un-allocated:    12976128 (12672MB = 13GB)
#
glohost # df -g  (Ya AIX 5.3 builds sometimes allow the -g…)
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.06      0.02   68%     2215     7% /
/dev/hd2           0.88      0.08   91%    26538    12% /usr
/dev/hd9var        0.44      0.03   94%      764     1% /var
/dev/hd3           0.12      0.05   60%     1325     5% /tmp
/dev/hd1           0.06      0.06    4%      433     3% /home
/proc                 –         –    –         –     –  /proc
/dev/hd10opt       0.06      0.04   30%     1635    10% /opt
/dev/lv00         31.62     16.75   48%    22260     1% /a
#
rootvg ========== 33.24GB
#

It just goes on and on from here… 😦

Advertisements

, , , , , , , , , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: