HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)
3.7.2 Extending a File System
Extending a file system inside a logical volume is a two-step task: extending the logical volume,
then extending the file system. The first step is described in “Extending a Logical Volume” (page 56).
The second step, extending the file system itself, depends on the following factors:
• What type of file system is involved? If it is HFS or VxFS? HFS requires the file system to be
unmounted to be extended.
Check the type of file system. For example:
# /usr/sbin/fstyp /dev/vg01/lvol2
vxfs
• If the file system is VxFS, do you have the base VxFS product or the OnlineJFS product? If you
have only the base VxFS product, you must unmount the file system before extending it.
To see if the OnlineJFS product is installed, enter the following command:
# swlist -l product | grep -i OnlineJFS
OnlineJFS B.11.31 Online features of the VxFS File System
• Can you unmount the file system? To unmount system directories such as/var and /usr, you
must be in single-user mode.
• Is the file system the root file system (/)? If so, there are two complications:
◦ The logical volume containing the root file system is created with the contiguous allocation
policy, so it might not be possible to extend it in place.
◦ The root file system cannot ever be unmounted, even if you change to single-user state.
If you are using VxFS as your root file system and have the OnlineJFS product, you can extend
the original root file system without unmounting, provided contiguous disk space is available.
Otherwise, to extend the current root file system, you must create and mount another root disk
which enables you to work with the unmounted original root disk, extending it if contiguous
disk space is still available. If the original disk does not have contiguous disk space available,
instead of expanding the original root disk, you can create a new root file system on another
larger disk.
CAUTION: This procedure can fail on a VxFS file system already at 100% capacity (Error 28).
You must remove some files before you attempt this operation.
Once you have the answers to these questions, follow these steps:
1. If the file system must be unmounted, unmount it.
a. Be sure no one has files open in any file system mounted to this logical volume and that
it is no user's current working directory. For example:
# fuser -cu /work/project5
If the logical volume is in use, confirm that the underlying applications no longer need it.
If necessary, stop the applications.
NOTE: If the file system is exported using NFS to other systems, verify that no one is
using those other systems, then unmount it on those systems.
b. If you cannot stop the applications using the logical volume, or it is a system directory
such as /var or/usr, change to single-user state as follows:
# /sbin/shutdown
c. Unmount the file system as follows:
# /sbin/umount /dev/vg01/lvol2
3.7 Administering File System Logical Volumes 101