Make way for rootvg!
Every AIX system has a rootvg. It's a volume group—a logical group of disks—that is created at the time you install AIX. It contains the AIX operating system with its standard file systems.
Although you can put all of your software, applications, and data into rootvg, it generally makes sense to keep rootvg primarily for the operating system and create at least one other volume group—such as datavg—for file systems that are not part of the standard AIX installation.
Keep rootvg lean
Keeping data in its own volume group gives you a leaner and cleaner rootvg. This is important for when you do system
backups using the
mksysb command (see Resources for more details).
If you want to clone an AIX environment, it's far easier to rebuild from a smaller rootvg
than from one with a large amount of
data that will probably be recovered with a different utility anyway. And, if you do need to do an urgent system recovery, you don't
want to lose precious time finding large enough disks to restore to and then have to
untangle data file systems from your
There's another, more obvious advantage to keeping data in its own volume group: performance. You can assign the data to its own volume group on disks that have better I/O performance than rootvg disks. At the operating system level, you can tune the characteristics for a volume group or even for individual physical volumes. You can also tune the Storage Area Network (SAN) storage subsystem just for the data logical unit numbers (LUNs) without affecting rootvg.
Make data migration and replication easier
Another benefit of keeping data file systems out of rootvg is that you can migrate just the data volume group to a new AIX system (see Resources for details). By taking this modular approach, you can replicate or move large amounts of data to other AIX systems without having to rebuild the rootvg as well. This can be handy when you want to refresh data on a test or disaster recovery system that doesn't need to be built from scratch.
What's in rootvg?
There are some simple ways to keep rootvg disk use small enough to be manageable while giving it enough disk so that it never runs short of space. The first step is to see what is currently allocated for rootvg.
File systems in rootvg
You can see which file systems belong to rootvg by using the
lsvgfs command, shown in Listing 1.
Listing 1. List rootvg file systems
# lsvgfs rootvg / /usr /var /tmp /home /opt /admin /var/adm/ras/livedump
The file systems shown in Listing 1 above all come as part of a standard installation of AIX 7.1. If you have some data file systems in your rootvg, consider moving them to a separate volume group, especially if they use a large amount of rootvg disk.
Disk space allocated to rootvg
You can see how much disk space is allocated to rootvg with the
command followed by the volume group name. Listing 2 shows the
lsvg output for a newly installed AIX 7.1 system.
Listing 2. List volume group characteristics
# lsvg rootvg VOLUME GROUP: rootvg VG IDENTIFIER: 00f6050a00004c000000012c2cde33d6 VG STATE: active PP SIZE: 128 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 279 (35712 megabytes) MAX LVs: 256 FREE PPs: 229 (29312 megabytes) LVs: 11 USED PPs: 50 (6400 megabytes) OPEN LVs: 10 QUORUM: 2 (Enabled) TOTAL PVs: 1 VG DESCRIPTORS: 2 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 1 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 PV RESTRICTION: none
In this example, the rootvg is divided into physical partitions (PPs) of 128 megabytes, as shown by
PP SIZE value. The total disk assigned to rootvg (
TOTAL PPs) comes to 35712
megabytes (MB), or over 35 gigabytes (GB). And the
FREE PPs value tells you how much rootvg disk space can
still be used for increasing file systems or other purposes. In this case, it is 29312 MB, or more than 29 GB.
Demands on rootvg disk space
It's important to keep a healthy amount of free disk space in rootvg, because there are a number of ways it can get used up. Here are some of the most common culprits:
- Paging space
- System dump devices
- File system growth
- Software installation and updates
- AIX updates using
The next several sections describe these demands on rootvg space in detail.
Paging space, or swap space, is a type of logical volume that serves as a staging area for processes that are not using active random-access memory (RAM). It's important to ensure you have enough paging space on your system. Whenever you change your memory allocation for an AIX system, you need to review paging space requirements.
Allocating and tuning memory
Before assigning extra paging space to your system, it's worth looking at memory allocation and memory tuning.
If paging space use is high, check to see if there is enough memory allocated for the workload. High paging space may be a symptom of a system that is starved for RAM. Memory tuning can also bring significant improvements in system performance and reduce the need for additional paging space. See the article about optimizing AIX 7 memory performance in the Resources section for more details.
Increasing paging space
When you do a basic AIX install, the default paging space is a logical volume called
hd6. Considering that hd6 is rarely large enough to
accommodate memory on a typical system, you probably need to increase it. You can do this without any outages using the
chps command (see Resources) or via the AIX System Management Interface Tool (
The good news is that your paging space doesn't all have to sit in rootvg. You can create new paging spaces in a data volume group, or a volume group just for paging. If you're removing a default paging space, such as hd6, it requires a special procedure. The paging space and virtual memory documentation has more information (see Resources).
You can increase paging space or even add a new paging space device and make it active without bringing down your system. If you want to deactivate and remove an existing paging space that is used for the default system dump device, you need to allocate the default dump device to another logical volume or paging space first (see Resources).
Reducing paging space
You can understand why increasing paging space would take up extra disk space in rootvg, but why would decreasing it
do the same? Actually, it's only as a temporary measure. When you reduce an active paging space using
(see Resources), AIX creates a temporary paging space as a staging area, copies
the contents of paging space to it, and then deletes the original paging space so it can be recreated with the smaller size. You can see what this looks like in Listing 3.
Listing 3. Reducing paging space
# chps -d 1 hd6 shrinkps: Temporary paging space paging00 created. shrinkps: Dump device moved to temporary paging space. shrinkps: Paging space hd6 removed. shrinkps: Paging space hd6 recreated with new size.
You can't reduce paging space if you don't have enough space in your volume group for the temporary paging space. Paging space can make a big demand on disk space. Keep some spare disk for paging, either in rootvg or another volume group.
System dump devices
When a system is halted unexpectedly, selected areas of kernel data are copied to the primary dump device. This can be helpful for analysis, especially on those (hopefully rare) occasions when your operating system stops without any apparent reason.
There is usually a primary dump device, which may be allocated to your paging space. You can estimate the dump size to ensure you have sufficient room on your dump device and copy directory to capture the system dump.
dumpcheck command is usually included in the root cron to estimate the size needed for a system dump. If your
largest dump device is not large enough,
dumpcheck posts a warning in the error report. If you need to increase
your dump device or create a secondary dump device, see Resources to find out how.
File system growth
It's no surprise that the disk usage for rootvg file systems can grow. This might be due to log files, installation of
software, temporary work space, or simply because someone copies big files into one of the rootvg file systems. Even if
you're highly disciplined with your file systems, there are some commands that increase
file systems anyway.
For example, a file system can be increased automatically when you install new software using
or when you perform a
If you are running short on space for a file system, you can either do some quick cleaning up or make more room for growth, as long as you have some disk space available.
Software installation and updates
When new software is installed or existing software upgraded, it has an impact on disk usage. Often old versions are not removed for a long time (or ever!), so disk usage creeps up. In the event that you do need to return to an earlier version of software or you have to restore from a backup, it is best to make the process as quick as possible. Some spare disk space in rootvg may be critical to a quick and smooth rollback. You can use a number of strategies for updating AIX while providing for easy rollback (see Resources).
AIX updates using
multibos command allows you to create and hold a separate bootable instance of AIX on your rootvg. You can update the alternate
instance with a different level of AIX software updates while the primary instance is up and running. You can even log in to the alternate
instance and customize it if you need. Then, when you're ready, you can have a short outage to start using the alternate instance.
multibos means you can do your AIX patching ahead of an outage window. During the outage, a reboot is all you need, and if you want to roll back
to the earlier instance (now the standby), it's only a reboot away. That's a great backout plan—much easier than restoring from a backup.
If you're going to use
multibos, then you need some free space in rootvg to store the second instance. It's not a complete copy of rootvg,
but it does replicate most of the standard rootvg file systems. For more information about using
multibos, see Resources.
mksysb image files
You can create
mksysb backups using the
mkdvd command and save them into International Organization for Standardization (ISO) format.
This can be a flexible way to make system backups without the need for physical media. The
mkdvd command does create some temporary file systems in rootvg unless
you specify an alternate volume group or location to store the images. For more details about how to create reliable operating system backups, see Resources.
Allocating more disk space to rootvg
Even after you clean up, declutter, and do all you can to keep rootvg lean, you may still find yourself short of available disk space. To increase the disk allocation, you can do one or more of the following:
- Allocate a new physical volume to rootvg using
- Increase an existing rootvg physical volume.
- Mirror, migrate, or restore to a different, larger disk.
Adding a new disk to rootvg is easy enough. The
extendvg command adds a new disk to the rootvg,
which gives you extra physical partitions (PPs). But you may not need to increase rootvg by an entire disk.
If your rootvg is on a SAN subsystem, you may be able to increase the LUN size. You can recognize the larger disk by running the
chvg -g rootvg command. Note that this option is supported for AIX 6.1 TL 4 or later.
After rootvg is increased, verify using
You can mirror the rootvg or migrate some of its logical volumes to a larger disk. See the AIX documentation about volume groups
(Resources) for further information. The
mksysb command is also an option if you
want to back up the current rootvg and restore it to a different disk (see Resources).
Effects on backup and recovery
If you make significant changes to rootvg, whether it's additional disk allocation, creation of new file systems, or moving file systems into other volume groups, be aware of the possible impact to backup sizes and schedules. You also need to keep in mind any system recovery procedures and infrastructure in case they are affected.
A modular approach to volume group layouts lets you keep rootvg disk usage small so it is easier to back up and recover. Having data volume groups separate from rootvg also gives you the chance to tune, migrate, or replicate data without having a direct impact on rootvg.
- "Reliable Restores" (IBM Systems Magazine, February 2011) explains how
mksysbbackups make AIX system recovery easy.
- Learn about volume groups and the commands needed to migrate them to a different AIX system.
- Read "Using the AIX Logical Volume Manager to perform SAN storage migrations" (developerWorks, July 2010).
- For an introduction to swap (paging) space and memory tuning, see "Optimizing AIX 7 memory performance: Part 3, Tuning swap space settings " (developerWorks, November 2010).
- For an explanation of paging space concepts, see the paging space and virtual memory documentation.
- You can increase or reduce paging space with the
- Learn about Managing System Dump Devices so that in the event of an operating system crash you're able to capture a dump for analysis.
- See the disk and other prerequisites for AIX in the AIX Version 7.1 Release Notes.
- "AIX Technology Level update strategies" (developerWorks, June 2010) covers the different supported ways of updating AIX to a new Technology Level version.
- Create, update, and manage multiple versions of the Base Operating System (BOS)
on a rootvg using the
- Check out my blog, AIX Down Under, on IBM developerWorks. It has lots of tips and practical examples for AIX administrators, as well as tips for beginners and some more advanced topics.
- Follow me on Twitter and keep up with my blog updates.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools as well as IT industry trends.
- Follow developerWorks on Twitter.
- Watch developerWorks on-demand demos ranging from product installation and setup demos for beginners, to advanced functionality for experienced developers.
Get products and technologies
- Try out IBM software for free. Download a trial version, log into an online trial, work with a product in a sandbox environment, or access it through the cloud. Choose from over 100 IBM product trials.
- Get involved in the developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.
- Follow developerWorks on Twitter.
- Participate in developerWorks blogs and get involved in the developerWorks community.
- Get involved in the My developerWorks community.
- Participate in the AIX and UNIX® forums:
Dig deeper into AIX and Unix on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.