Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a Workgroup
Managing Disks
Chapter 9868
/sbin/lvextend -L 332 /dev/vg00/lvol7
increases the size of this volume to 332 MB.
Step 6. Unmount /usr:
/sbin/umount /usr
This is required for the next step, since extendfs can only work on
unmounted volumes.
Step 7. Extend the file system size to the logical volume size; for example:
/sbin/extendfs /dev/vg00/rlvol7
Step 8. Remount /usr:
/sbin/mount /usr
Step 9. Reboot the system:
/sbin/reboot -r
Reducing a Logical Volume
In this example we’ll assume you want to reduce the size of a logical
volume that has an active file system mounted to it.
Let’s say you want to reduce the directory /work/project5 to 500
megabytes, and that /work/project5 is the mount point for the logical
volume /dev/vg01/lvol5.
CAUTION Before reducing a logical volume that contains a file system, back up the
file system. Even if the file system currently occupies less space than the
new (reduced) size of the logical volume, you will almost certainly lose
data when you reduce the logical volume.
Step 1. Make sure no one has files open in any file system on the logical volume
and that it is no one’s current working directory:
fuser -cu /dev/vg01/lvol5