Give rootvg the space it needs

Why your operating system needs space and how to provide it

The root volume group (rootvg) is the lifeblood of your IBM® AIX® system. It contains the AIX operating system, but you can use it for a lot more than that. A rootvg may include paging space, system dump devices, data file systems, a copy of mksysb backups, a second instance of AIX (when you use multibos), and more. With all of those possible demands on the rootvg disk, it is a good idea to keep data file systems in their own volume group and give rootvg the space it needs.

Share:

Anthony English (anthonyenglish@levitar.com.au), Senior AIX Specialist, Freelance contractor

Anthony EnglishAnthony English is a freelance contractor in Sydney, Australia. He has worked on AIX systems since 1991 and writes the IBM developerWorks blog, AIX Down Under. He is also recognized as an IBM Champion for Power Systems. You can reach Anthony at anthonyenglish@levitar.com.au. Follow Anthony English on Twitter.



06 September 2011

Also available in Chinese

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 mksysb backup.

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 lsvg 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 the 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 multibos
  • mksysb image files

The next several sections describe these demands on rootvg space in detail.


Paging space

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 (SMIT).

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 chps -d (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.

The 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 installp or when you perform a mksysb backup.

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

The AIX 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.

Using 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 extendvg.
  • 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 lsvg rootvg.

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.


Conclusion

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.

Resources

Learn

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.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=755417
ArticleTitle=Give rootvg the space it needs
publish-date=09062011