zfsadm compress

Purpose

zfsadm compress compresses a zFS aggregate.

Format

zfsadm compress -aggregate name [-cancel][-trace file_name][-level][-help]  

Options

-aggregate name
Specifies the name of the aggregate to be compressed. The aggregate name is not case-sensitive. It is always converted to uppercase.
-cancel
Cancels an in-progress compress operation for the specified aggregate.
-help
Prints the online help for this command. All other valid options that are specified with this option are ignored.
-level
Prints the level of the command. This option is useful when you are diagnosing a problem. Except for -help, all other valid options that are specified with -level are ignored.
-trace file_name
Specifies the name of the file that will have the trace records written into it. The trace file can be a z/OS UNIX file, an existing MVS sequential data set, or a member of either an existing partitioned data set (PDS) or partitioned data set extended (PDSE). Use this option only at the direction of IBM Support.

Because MVS data set names must be fully qualified, z/OS UNIX has special rules for specifying MVS data set names in the shell environment. For more information, see Specifying MVS data set names in the shell environment in z/OS UNIX System Services Command Reference.

Usage notes

  1. The zfsadm compress command is a long-running administrative command that uses the zEDC compression method to compress an existing zFS aggregate.
  2. To improve performance of the compression I/O, IBM recommends that you specify the edcfixed option in the IOEFSPRM parameter user_cache_size.
  3. If the user cache is not registered with the zEDC Express service, zFS will attempt to register the user cache after the zfsadm compress command completes. zFS constraints might prevent zFS from registering the entire user cache with the zEDC Express service. The zfsadm compress command will cause the ZFS_VERIFY_COMPRESSION_HEALTH check to be run.
  4. To process the compression request, the long-running command thread pool must have an available foreground thread. See the IOEFSPRM configuration option long_cmd_threads for information about controlling the size of the long-running foreground and background thread pools.
  5. The command must be issued from a z/OS V2R3 or later system, and the zFS file system must be zFS-owned on a z/OS V2R3 or later system. The aggregate must be at least aggregate version 1.5 and mounted read/write. Do not use this command before you have migrated all your systems to z/OS V2R3 or later. If there are systems that are active prior to z/OS V2R3 in the shared file system environment, compression will not take place.
  6. zFS will determine whether the compression can achieve space savings. If not, it will not perform compression. Only regular files that are stored in blocked format can be compressed. Applications can still access the aggregate while it is being compressed.
  7. A compress operation can be interrupted by using the -cancel option, UNMOUNT immediate with the -force option, or during a shutdown. If the compress operation is interrupted, the zFS aggregate might be left with both compressed and uncompressed files. This partial state is allowed. Another zfsadm compress command can be issued to resume the compression operation for the rest of the files after the interruption.
  8. You cannot compress an aggregate that is in a partially encrypted or partially decrypted state. In other words, if encryption or decryption was interrupted for an aggregate, you cannot compress it.
  9. Use either the zfsadm fsinfo or MODIFY FSINFO command to display whether an aggregate is compressed or is being compressed. Progress of the compress operation can be seen in the owner status display.
  10. The zfsadm fileinfo command can be used to show whether a particular file is compressed or not.
  11. The backup change activity flag is set if any file data is compressed.
  12. Aggregates with active file backups cannot be compressed.

Privilege required

The issuer must be logged in as a root user (UID=0) or have READ authority to the SUPERUSER.FILESYS.PFSCTL resource in the z/OS® UNIXPRIV class.

Examples

  1. The following command compresses an existing zFS aggregate:
    zfsadm compress -aggregate PLEX.ZFS.AGGR1
    IOEZ00899I Aggregate PLEX.ZFS.AGGR1 successfully compressed.

Related information

Commands:
  • zfsadm encrypt
  • zfsadm decompress
  • zfsadm define
  • zfsadm fileinfo
  • zfsadm fsinfo
  • zfsadm shrink
Files:
  • IOEFSPRM