Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a Workgroup
Managing Disks
Chapter 9 869
NOTE If the file system is exported to other systems, check on those other
systems that no one is using it (fuser works on NFS-mounted file
systems as of 10.x), and then unmount it on those systems before
unmounting it on the server.
Step 2. Back up the data in the logical volume.
For example, to back up /work/project5 to the system default tape
device:
tar cv /work/project5
Step 3. Remove the data in the file system the logical volume is mounted to:
rm -r /work/project5
Since /work/project5 is a mount point, rm -r will not remove the
directory itself.
Step 4. Decide on the new size of the logical volume.
If the logical volume is mounted to a file system, the new size should be
greater than the space the data in the file system currently occupies. The
bdf command will show you the size of all mounted volumes in kilobytes.
The first column shows the space allocated to the volume; the second
shows how much is actually being used. The new size of the logical
volume should be at least a little larger than the size shown in bdf’s
second column.
Step 5. Unmount the file system the logical volume is mounted to:
umount /work/project5
Step 6. Reduce the size of the logical volume:
lvreduce -L 500 /dev/vg01/lvol5
This reduces the logical volume /dev/vg01/lvol5 to 500 megabytes.
Step 7. Mount the logical volume:
mount /dev/vg01/lvol5 /work/project5