JFS data compression implementation

Data compression is an attribute of a file system which is specified when the file system is created with the crfs or mkfs command. You can use SMIT to specify data compression.

Attention: The root file system (/) must not be compressed. Compressing the /usr file system is not recommended because installp must be able to accurately calculate its size for updates and new installs.

Compression only applies to regular files and long symbolic links in such file systems. Fragment support continues to apply to directories and metadata that are not compressed. Each logical block of a file is compressed by itself before being written to the disk. Compression in this manner facilitates random seeks and updates, while losing only a small amount of freed disk space in comparison to compressing data in larger units.

After compression, a logical block usually requires less than 4096 bytes of disk space. The compressed logical block is written to the disk and allocated only the number of contiguous fragments required for its storage. If a logical block does not compress, then it is written to disk in its uncompressed form and allocated 4096 bytes of contiguous fragments.

The lsfs -q command displays the current value for compression. You can also use the SMIT to identify data compression.