fsexpand enables file systems to be expanded by PAM pages or cylinder groups.
The file systems must be unmounted (see umount).
Syntax
fsexpand[ -i][ -p pam_pages| -c cylinder_groups][-N] device |
Outputs file system information. Output takes place to stdout. In particular information is output on how ideal an expansion is, e.g. to prevent unused PAM pages in the expanded file system. In conjunction with the -p or -c option, information is output before the expansion (source file system) and after the expansion (target system).
Expansion of a file system by PAM pages. The file system is expanded by the specified number of PAM pages.
Expansion of a file system by cylinder groups. The file system is expanded by the specified number of cylinder groups. The size of a cylinder group in the source file system can be ascertained before expansion using fsexpand -i. Up to a file size of a little more than 2 GB, the size is 2048 PAM pages. From 2 GB on, the size increases. With a file size of 4 GB, for example, it is then 4096 PAM pages.
If applicable, skip the compactification (see hints below).
Device name /dev/rdsk/... (character-oriented device only, i.e. not /dev/dsk) or BS2000 file name. device must be writeable when an expansion is to take place. If the file system is located on the HOME pubset, the BS2000 file name (with or without catid) must match the notation in the /etc/partitions file. |
Hints
The fsexpand command is not supported for bs2fs file systems. A file system is expanded in two steps:
Compactification is performed only if the expanded file system is greater than 2 GB and at least double the size of the original file system. Compactification increases the runtime of fsexpand considerably. However, it has the advantage that performance gains can be achieved when using the file system, since the memory and CPU time requirements are lower due to the combination of the administrative units. |
Example
# df -h /home/foo Filesystem Size Used Avail Use% Mounted on /dev/dsk/18 365M 210M 119M 64% /home/foo # umount /home/foo # fsexpand -i /dev/rdsk/18 device /dev/rdsk/18 in Containerfile: $SYSROOT.FS.HOME.FOO size of BS2000 Containerfile (PP): 200010 size used for POSIX filesystem (PP): 200004 unused in Containerfile (PP): 6 Cylindergroups in filesystem: 98 Cylinders in cylindergroup: 16 Cylinders in last cylindergroup: 11 size of a cylindergroup (PP): 2048 size of last cylindergroup (PP): 1348 inodes per cylindergroup: 2048 inodes total: 200704 datablocks(4K) in filesystem: 93333 free blocks(4K) directories free inodes 39586 242 198694 optimal values for expansion of container: 694 PP + N * 2048 PP # fsexpand -p 100000 '$SYSROOT.FS.HOME.FOO' device /dev/rdsk/18 in Containerfile: $SYSROOT.FS.HOME.FOO size of BS2000 Containerfile (PP): 300006 size used for POSIX filesystem (PP): 300006 unused in Containerfile (PP): 0 Cylindergroups in filesystem: 147 Cylinders in cylindergroup: 16 Cylinders in last cylindergroup: 8 size of a cylindergroup (PP): 2048 size of last cylindergroup (PP): 998 inodes per cylindergroup: 2048 inodes total: 301056 datablocks(4K) in filesystem: 140002 free blocks(4K) directories free inodes 86255 242 299046 optimal values for expansion of container: 1050 PP + N * 2048 PP # mount /home/foo # df -h /home/foo Filesystem Size Used Avail Use% Mounted on /dev/dsk/18 547M 210M 283M 43% /home/foo |