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.