B.4 COMPFIX

B.4.1 Purpose

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.4.2 COMPFIX for Linux

Prerequisite for Computing Compression Statistics

Before using the COMPFIX utility to compute compression statistics, make sure to put the volume in maintenance mode in order for statistics to be computed accurately.

  1. On the server, open a terminal console, then log in as the root user by entering the su command and providing the root user’s password when prompted.

  2. At the terminal console prompt, start the NSS Console (NSSCON) utility by entering

    nsscon
    
  3. In the NSS console, enter

    nss /PoolMaintenance=poolname
    

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.

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 be in the Long name space.

For example:

VOL1:/dirpath/filename.xxx 

Help Options (HOPTION)

Option

Description

-h, --help

Displays help information and exits.

-v, --version

Displays version information and exits.

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

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.

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.

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:. Make sure the volume is in maintenance mode to get accurate results.

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

compfix --list-all VOL1:
  --logpath=LOGS:/compfix.log

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

Log the results in the specified location of LOGS:/compfix.log.

compfix -f VOL1:\dir1\dir2\myfile.xxx

Fixes an individual compressed file, myfile.xxx.

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

compfix -F VOL1:
  --logpath=LOGS:/compfix.log

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

Log the results in the specified location of LOGS:/compfix.log.

compfix -b 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 VOL1:/compfix.log.

compfix -C VOL1:
  --logpath=LOGS:/compfix.log

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

Logs the results in the specified location of LOGS:/compfix.log.

B.4.3 COMPFIX for NetWare

Prerequisite for Computing Compression Statistics

Before using the COMPFIX utility to compute compression statistics, make sure to put the volume in maintenance mode in order for statistics to be computed accurately.

  1. At the server console, enter

    nss /PoolMaintenance=poolname
    

Syntax

Load compfix.nlm on your NetWare server, then enter the command at the server console. Compfix.nlm runs on processor 0 only.

compfix -[attribute] [-noheader] path [log_volume]

Parameters

Parameter

Description

path 

Specifies the volume name of the compressed volume you want to repair, or specify the full path to the individual file that has compression errors you want to repair. The filename must be in the Long name space.

For example:

VOL1:
VOL1:\dirpath\filename.xxx 
log_volume 

If the log_volume is specified, the COMPFIX log data is written to the log_volume:\compfix.txt file. For example, if LOGS: is the log_volume, then the file is written to LOGS:\compfix.txt.

If the log_volume is not specified, the COMPFIX log data is written to the root of the compressed volume such as volumename:\compfix.txt file. For example, VOL1:\compfix.txt.

Option

Option

Description

-noheader 

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

If -noheader is not specified, COMPFIX validates compression headers.

Attributes

Multiple attributes can optionally be used for a single command.

Attribute

Description

-fs 

Fixes compression statistics. Make sure the volume is in maintenance mode before you begin in order for statistics to be properly computed.

-lc

Lists all corrupted compressed files on the volume.

-df

Diagnoses an individual compressed file.

-ff

Fixes an individual compressed file.

-fc

Fixes all fixable corrupted compressed files on the volume.

-bg

Diagnoses the background compression effect for an individual file to determine if the specified file is eligible for the next background compression process.

-cc

Clears the Cannot Compress (Cc) attribute for files in the specified volume or for a specified file.

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 -fs VOL1:

Fixes compression statistics for the specified volume, VOL1:. The volume should be in maintenance mode to get accurate results.

Log the results in the default location of VOL1:\compfix.txt.

compfix -lc VOL1: LOGS:

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

Log the results in the specified location of LOGS:\compfix.txt.

compfix -ff VOL1:\dir1\dir2\myfile.xxx

Fixes an individual compressed file, myfile.xxx.

Log the results in the default location of VOL1:\compfix.txt.

compfix -fc VOL1: LOGS:

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

Log the results in the specified location of LOGS:\compfix.txt.

compfix -bg VOL1:\dir1\dir2\myfile.xxx

Diagnoses the background compression effect for an individual file, myfile.xxx.

Logs the results in the default location of VOL1:\compfix.txt.

compfix -cc VOL1: LOGS:

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

Logs the results in the specified location of LOGS:\compfix.txt.