Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6 653
For example, suppose the file system /home resides in the logical
volume /dev/vg4/users_lv. Its current size is 50 MB, as verified by
running bdf. You want the new file system (as well as logical volume
size) to be 72 MB. Enter:
lvextend -L 72 /dev/vg4/users_lv
Read SAM’s online help or lvextend (1M) for further details.
4. Resize the JFS file system.
fsadm -b
newsize /mount_point
newsize
is specified in blocks. Determine the correct number of
blocks based on the appropriate file system block size.
In this example, the block size of the file system
/home
is 1KB. The
-b specification is 72 times 1024 = 73728. Thus, the command line
would be:
fsadm -b 73728
/home
5. Verify that the file system’s superblock reflects the expansion. You
can do this by executing bdf, df, or fsadm -E.
•If
newsize
is larger than the current size of the file system, the
file system will expand to
newsize
sectors.
•If
newsize
is smaller than the current size of the file system, JFS
will attempt to contract the file system to
newsize
sectors.
Reducing the size of a file system might fail if file system
resources occupy the sectors being removed. If this occurs,
defragment the file system again; this action might free the
resources and allow a subsequent reduction in file system size.
To Resize a Basic JFS File System
The following procedure will resize a JFS file system without the benefit
of the optional HP OnLineJFS product.
1. Determine how much to increase the size of the file system.
2. Allocate space for the file system.
Extend the logical volume using SAM or lvextend (1M). Be sure to
specify the new size of the logical volume, not the amount of
increment.