Make way for rootvg!
AnthonyEnglish 270000RKFN Visits (11116)
TRACING YOUR ROOTS
Every AIX system has a
volume group (a logical group of disks) called rootvg, which is created automatically at
the time you install AIX. The rootvg may be made up of one or several physical disks or virtual disks (SAN LUNs, Logical volumes on the VIO Server). Whatever "disks" make up rootvg, it's
important to keep the rootvg file system footprint small, but give the total disk assigned to rootvg enough
space to take giant steps. Let me explain.
After you've done an initial base AIX install, it's usually best to create your own new logical volumes and file systems in a separate volume group from rootvg, provided you've got the disk available. A separate data volume group (datavg) is better, unless your data and application file systems (and LVs) are relatively small.
It's important to keep your rootvg fairly lean.
That will speed up mksysb backups, recovery of the operating system,
migrations to new releases or cloning systems. Even though those upgrade and recovery activities are fairly rare, when they do happen you want to lose as little time as possible.
So the rule I (generally) follow is: rootvg for the OS, data file systems in their own volume group(s).
… large steps
Although it's sensible to keep your non-AIX data away from rootvg, it's even more important to be able to have lots of unused space within rootvg or the ability to increase disk allocation to rootvg quickly. Among other things, it's handy to have some head room in rootvg for:
Digging around the rootvg
To check how much available space you have in rootvg, use the lsvg command and run lsvg rootvg. Look at Free PPs to see how much rootvg disk is available for expansion.
Increase rootvg dynamically
If your rootvg “disk” is actually virtual, such as a SAN LUN or a logical volume on the VIO server, then it usually can be expanded on the SAN (or using extendlv on the VIOS) and then recognised on the AIX LPAR using the -g flag of the chvg command:
That "brief" introduction was a high level view of why rootvg can be hungry for disk. The rest is details, so you can
STOP READING NOW!
Unless you want a little more explanation on those steps above or are curious about something you won't find in a Redbook.
STEP BY STEP
File system growth
This should be obvious enough. If you
keep your apps and data in datavg or other volume groups, rootvg
should remain fairly stable. The /usr file system may even be sitting
at 98% and only get increased automatically when you install software
using AIX utilities such as smitty
or installp. Still, it's good to have some room for log files and temporary files. With disk space, prevention is better than cure.
Shrinking file systems
On recent releases of AIX, reducing a file system can be done using chfs without unmounting it. For example, this command will reduce /usr by 10 GB:
You need to have enough wriggle room to do this, though, so that's where the Free PPs are important.
AIX patching and installing new software
When you install patches such as AIX fix packs from the IBM Support Portal, you can either Apply or Commit the software updates. If you apply them, you can reject them, effectively rolling them back. Applying (rather than committing) software updates is a smart interim measure, but it does take a little more space. You'll obviously also need some room for when you install other software that gets written into the rootvg file systems.
System dump devices
System updates with multibos
If you haven't realised how easily you can have a dual boot on the same disk using multibos, you really are missing out on a very simple way of patching AIX while minimising downtime. My compatriot Chris Gibson has two excellent articles on AIX Updates with Multibos and Working With multibos. Easy to learn, and worth knowing, and in some ways an easier alternative to cloning the entire rootvg using alt_disk_install.
Nothing can bring an AIX system to its
knees as effectively as running out of paging space. Although paging
space (swap space) doesn't have to be in the rootvg, it's always
worth having some room for expansion of paging space. You will need
to reassess your paging space requirements if you increase your
memory allocation using Dynamic
LPAR or Changing
a partition profile's properties.
The mksysb command can do a backup of the rootvg by writing it to a file. Similarly, the mkcd and mkdvd commands back up the rootvg, but they need to create temporary file systems first. You can use flags to indicate an alternate volume group to use, but if you don't, then guess which one needs the extra space?
Learning more about LVM
If you want to learn more about LVM, have a look at a Wiki by the indefatigable Nigel Griffiths, where he deals with LVM theory and practice.
Not in the Redbooks
If you got this far, congratulations. Since you've obviously got nothing better to do with your time, let me explain why I couldn't resist including a graphic of baby feet.
I delivered a baby for the first time on Friday (you won't find a Redbook on that) after standing by over the years for the births of our five other children. Couldn't have done it without my wife. An obstetrician was there. He suggested I add "delivering babies" to the hobbies section of my resume.