Expanding Integrity Virtual Machine Disk Volumes (HP-UX)

When an Integrity Virtual Machine (or IVM) is set up, the disks that the IVM will have internally can be backed with any number of things: a DVD device, an ISO file, a regular file, a physical disk, or a logical volume. Using a logical volume can be the most flexible option.

However, when expanding a disk volume for the Integrity Virtual Machine, the obvious solution is the wrong one. The logical volume on the VM host can be expanded – this, however, will all be in vain: there is no way to adjust the size of the disk inside the VM. Once pvcreate is done and the device is present, the volume cannot be expanded.

So even though the logical volume backing the VM disk has been expanded, there is no way to make the VM utilize the “new” space (which it can’t see).

It may be possible to do a pvremove on the disk, then remove the disk from the VM (using hpvmmodify) and add it back in as a new disk. It might also be wise to zero out the disk (being careful!) so no LVM structures remain in the VM disk. In this case, that would mean using a command like this:

dd if=/dev/zero of=/dev/vgvdisk/lvol1 bs=1024 count=50

This will lay down zeros onto the disk. Be very careful about which disk you are doing this to! Once this command is done, there will be no usable data on that disk – so if you choose the wrong one you could mess your system up completely.

The recommended way of increasing storage in an IVM is to create a new disk for the virtual machine, then add it to the VM (using hpvmmodify with a -a option). Once this new disk is presented to the guest HP-UX environment, add the new disk to the old volume group using vgextend, extend the logical volume with lvextend and extend the filesystem with fsadm.

No down time and no problems!

Powered by ScribeFire.

3 thoughts on “Expanding Integrity Virtual Machine Disk Volumes (HP-UX)”

  1. That’s great, but what if you’re not using LVM in your VM guests? To do so at the host *AND* guest level would be a significant resource hit, no?

  2. I can’t quantify this, but my guess is that the filesystem overhead is not that much compared to other overhead. You can, howver, use all kinds of backing stores, including physical disk and others.

    In the HP-UX guest you could use whatever filesystem you like, but HP-UX comes with built-in support for Veritas’ VxFS – and offers snapshot capabilities as part of the OnlineJFS product, and mirroring with the MirrorDisk-UX product.

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 )

Connecting to %s

%d bloggers like this: