How to display the Veritas VxFS fsck progress status information with the -o full,status option

book

Article ID: 100059136

calendar_today

Updated On:

Description

Description


This article outlines how to display the Veritas fsck progress status information with the fsck "-o full,status" option.

The Veritas fsck utility is used to check and repair a Veritas file system (VxFS).

The fsck utility examines the VxFS file system(s) for consistency. Veritas File Systems record pending file system updates in an intent log. The fsck process typically replays the intent log instead of doing a full structural file system check.
 
If a structural flaw is detected during the replay of the intent log or during metadata operations whilst the filesystem was previously mounted, then "fullfsck" flag is set on the impacted VxFS file system.

A full file system check validates all file system metadata by looking for both invalid values and metadata elements that should be mutually consistent, but are not.  If the fsck operation finds any inconsistencies, fsck resolves the inconsistencies either by removing the affected files or by adjusting metadata elements to match others, as appropriate.  

When VxFS file system corruption is suspected or detected, the degree of corruption can be often assessed *before* attempting to run “fsck -y".


Gathering a "metasave" of the filesystem, along with other information, makes it possible to safely run fsck against a "replay" of the filesystem metadata instead of running it against actual production data.

This can be used to "predict" the effect that running “fsck –y" will have on a file system without actually running it on production data.

Steps for gathering a metasave, and other information about the file system:

How to collect the file system metadata, and other information, in the event of possible VxFS file system corruption
click here
 

Note: Once "fsck -y" has been performed, permanent changes to the metadata have already occurred.  As a result, further analysis of the file system is unlikely to be productive.

Never run the full fsck with the "-y" option, unless you are sure that no user data will be affected.


After a successful fsck check and repair, requests to mount the VxFS file system should now succeed.

Currently running fullfsck prints the minimum level of progress status in terms of pass'es. Where each pass represents major logical portions of the filesystem.


Sample output

# /opt/VRTS/bin/fsck -o full /dev/vx/dsk//
log replay in progress
pass0 - checking structural files
pass1 - checking inode sanity and blocks
pass2 - checking directory linkage
pass3 - checking reference counts
pass4 - checking resource maps


Since each pass might take significant amount of time depending upon the amount of metadata to be scanned and the extent of corruption, then It is often beneficial to get more granular level information surrounding the fsck progress.


How to display additional VxFS fsck progress status information


The fsck "status" option enables progress status reporting and was introduced with Storage Foundation (SF) 6.0 onwards.

To display the additional fullfsck progress information, the "status" option must be used in connection with the "-o full" syntax as follows:

Sample output
 

# /opt/VRTS/bin/fsck -o full,status /dev/vx/dsk//
retry 0:pass0:structural fileset
checking structural files : 100%
retry 0:pass1:primary fileset
checking inode sanity and blocks for attribute ilist :  52%
retry 0:pass1:primary fileset
checking inode sanity and blocks for primary ilist :  68%
retry 0:pass1d:primary fileset
checking extended attributes :  68%
retry 0:pass1e:structural fileset
processing RCQ and RCT files : 100%
retry 0:pass2:primary fileset
checking directory linkage : 100%
retry 0:pass2b:primary fileset
validating dotdot attributes : 100%
retry 0:pass3:primary fileset
checking dotdot linkages : 100%
retry 0:pass3:primary fileset
checking link counts :  99%
retry 0:pass4:structural fileset
checking resource maps : 100%
retry 0:pass4:primary fileset
checking resource maps : 100%
OK to clear log? (ynq)y
flush fileset headers? (ynq)y
set state to CLEAN? (ynq)y


The status information is reported as a percentage of processed file system objects for the total number of file system objects for each pass.

The status is refreshed on the same line.

When the progress status reporting is enabled, the fsck command can take a slightly longer to complete, depending on the number of validations done during the file system check.

The default progress status interval is 10 seconds. "interval=N" option sets the interval to N seconds.

Example:
 

# /opt/VRTS/bin/fsck -o full,status,interval=15 /dev/vx/dsk//

The results will go to standard output by default, no logfile is generated.


In this case, the user can specifiy the "-y" or "-n" as an option.

Example:


# /opt/VRTS/bin/fsck -o full,status,interval=15 -y /dev/vx/dsk/<dgname>/ > /tmp/fullfsck_status 2>&1

This will avoid the user having to specifiy "y" or "n" when prompted for each detected corruption event.

 

Issue/Introduction

How to display the Veritas VxFS fsck progress status information with the -o full,status option