B.2 compfix

Use the COMPFIX utility to repair compression information for compressed NSS volumes or to clear the Cannot Compress attribute for files in the compressed NSS volume. This tool can help identify which compressed files are corrupted and can be fixed; however, not all corrupted compressed files are fixable.

B.2.1 Prerequisite for Computing Compression Statistics

Before using the COMPFIX utility to compute compression statistics, make sure that your volume is in ACTIVE mode in order for statistics to be computed.

B.2.2 Syntax

On Linux, run the COMPFIX utility ( /opt/novell/nss/sbin/compfix) from the terminal console prompt.

compfix [HOPTION]
compfix [GOPTION]... [VOPTION] VOLUMENAME
compfix [GOPTION]... [FOPTION] FILENAME

Mandatory arguments to long options are also mandatory for short options.

B.2.3 Parameters

Parameter

Description

VOLUMENAME

Specifies the volume name of the compressed volume you want to repair, such as VOL1.

FILENAME

Specifies the full path to the individual compressed file that has compression errors you want to repair, including its filename and extension. The filename must an absolute path.

For example:

/media/nss/VOL1/dir1/dir2/myfile.xxx

B.2.4 Help Options (HOPTION)

Option

Description

-h, --help

Displays help information and exits.

-v, --version

Displays version information and exits.

B.2.5 General Options (GOPTION)

Multiple general options can be selected.

Option

Description

-H, --no-header

If this option is specified, COMPFIX does not validate compression headers. Use this option on volumes restored from scan files that do not have user data blocks.

-p, --logpath=path

Specifies the location of the log file.

The default location is at the root of the compressed volume you are analyzing or fixing.

Default: ./compfix.log

B.2.6 Volume-Level Options (VOPTION)

Only one volume-level option can be selected.

Option

Description

-D, --delete-all

Deletes all non-fixable compressed files on the specified volume.

-F, --fix-all

Fixesall repairable compressed files on the specified volume.

-L, --list-all

Lists all problematic compressed files on the specified volume.

-S, --fix-stats

Fixes volume compression-related statistics. For accurate results, make sure the volume is in maintenance mode before issuing this command.

-C, --clear-all

Clears the Cc (Cannot_Compress_File) attribute for all files on the specified volume.

B.2.7 File-Level Options (FOPTION)

Only one file-level option can be selected.

Option

Description

-b, --background

Checks if the specified file is eligible for the next background compression process.

-d, --delete

Deletes the specified compressed file if it is non-fixable.

-f, --fix

Tries to fix the specified file’s compression-related problem.

-l, --list

Lists the specified file’s compression-related information.

-c, --clear

Clears the specified file’s Cc (Cannot_Compress_File) attribute.

B.2.8 Examples

The following table illustrates typical uses of the COMPFIX utility. The commands in the left column should be written all on the same line, of course.

Command

Description

compfix --fix-stats VOL1

Fixes compression statistics for the specified volume, VOL1.

Log the results in the default location of ./compfix.log.

compfix --list-all VOL1
  --logpath=/var/log/compfix.log

Lists all corrupted compressed files on the specified volume, VOL1.

Log the results in the specified location of /var/log/compfix.log.

compfix -f /media/nss/VOL1/dir1/dir2/myfile.xxx

Fixes an individual compressed file, myfile.xxx.

Log the results in the default location of ./compfix.log.

compfix -F VOL1
  --logpath=/var/log/compfix.log

Fixes all fixable corrupted compressed files on the specified volume, VOL1.

Log the results in the specified location of /var/log/compfix.log.

compfix -b /media/nss/VOL1/dir1/dir2/myfile.xxx 

Checks whether an individual compressed file, myfile.xxx, is eligible for the next background compression process.

Log the results in the default location of ./compfix.log.

compfix -C VOL1
  --logpath=/var/log/compfix.log

Clears the Cannot Compress ( Cc) attribute for files in the specified volume, VOL1.

Logs the results in the specified location of /var/log/compfix.log.