SNDISK_SCAN

Section: FSCLI (1)
Updated: September 2018


NAME

sndisk_scan – Scan a managed directory

SYNOPSIS

sndisk_scan [-t thread_count] [-f] [-d] [-u] [-n] [-i] [-e] [-P] [-N] [-M[-D]] [-S] managed_directory_path

WARNINGS

This utility should be used VERY carefully and ONLY under the guidance of Quantum technical assistance.

DESCRIPTION

This utility can be used to scan any directory that is currently being managed by the Tertiary Manager software. It will work on relation points as well as any managed directory below a relation point. It will report on files and directories found under the provided directory based on the scan options provided. It can also take some actions on scanned files and directories based on the scan options provided. This functionality is not needed under normal operating conditions. It can be useful for tracking down, and possibly fixing, some issues that may exist under a managed directory. As mentioned only use with the guidance of Quantum technical assistance.

The user must be root or the utility must be owned by root with the ‘s’ bit set.

SCAN OPTIONS

-t thread_count
Use the indicated number of threads for the scanning process. The default is 4 threads and the max allowed is 32. (This should only be changed for one of two reasons: first, the host where this is to run has limited cpu resources and we don’t want the scan to take too many; second, there is a need for the scan to run as quickly as possible and cpu resources are not an issue.)
-f
Only consider files during the scan. (If used with the -d option, both files and directories are considered.) This option would be useful if only looking for non-stored files or some similar scan.
-d
Only consider directories during the scan. (If used with the -f option, both files and directories are considered.) This option would be useful if only looking for keyless directories or some similar scan.
-u
Find unmanaged files and directories. Unmanaged content here being defined as files and directories with a zero class value and/or an empty event mask. (If ‘all’ non-managed content is desired combine this with the -e option.)
-n
Find non-stored files.
-i
Find files and directories with inherited attributes.
-e
Find files and directories which encountered errors while attempting to get the existing attributes. (The most common error that is likely to be encountered is ‘no attributes present’.) If searching exclusively for files and directories with no attributes present or some other form of error, use this option. If searching for all non-managed content combine this with the -u option.

ACTION OPTIONS

-P
Print matching entries found. (For example if using the -n option to find non-stored files, print the non-stored files found.)
-N
Print non-matching entries found. (For example if using the -n option to find non-stored files, print the stored files found.)
-M
Add the management attributes and events to the files and directories found.
-D
When adding the management attributes and events to directories found, also set the new directory key.
-S
For non-stored files found, add those files as store candidates.
managed_directory_path
Path name of the managed directory to scan.

REPORTING

Note that the -P or -N options will alway generate a report, regardless of whether any of the other action options (-M, -D, -S) are specified. In the report, files that match scan criteria will be prepended by “file:”. Directories that match will be prepended by “dir:”. When reporting non-matching entries, the prepended string values will be “file-“ and “dir-“. Here is a sample of the reporting output:

% sndisk_scan -unPN /stornext/snfs1/test1.1

SCANNING: /stornext/snfs1/test1.1   (4 threads)

file: /stornext/snfs1/test1.1/sub2/file.06
file: /stornext/snfs1/test1.1/sub2/file.11
file: /stornext/snfs1/test1.1/sub2/file.05
file: /stornext/snfs1/test1.1/sub2/file.12
 dir- /stornext/snfs1/test1.1/sub3
 dir- /stornext/snfs1/test1.1/sub2
file: /stornext/snfs1/test1.1/sub1/file.04
file: /stornext/snfs1/test1.1/sub1/file.03
file: /stornext/snfs1/test1.1/sub1/file.10
file: /stornext/snfs1/test1.1/sub1/file.09
 dir- /stornext/snfs1/test1.1/sub1
 dir- /stornext/snfs1/test1.1
scanning ... 12 inodes (0 dirs/8 files tracked) in 1 seconds at 12 inodes/sec.
Scan complete. 12 inodes (0 dirs/8 files tracked) in 1 seconds at 12 inodes/sec.


Note in the report summary, the number of files and directories “tracked” are those files and directories that match the scan options provided. The number of inodes is the total number of items visited.

EXAMPLES

Here are some examples of command usage.

Report all unmanaged directories under test1.1:

% sndisk_scan -duP /stornext/snfs1/test1.1

Report all non-stored files under test1.1:

% sndisk_scan -fnP /stornext/snfs1/test1.1

Report all files and directories under test1.1 missing management attributes:

% sndisk_scan -eP /stornext/snfs1/test1.1

Verify that all content under directory test1.1 is managed (roughly equivalent to fsaddrelation):

% sndisk_scan -unieMDS /stornext/snfs1/test1.1

SEE ALSO

fsaddrelation(1)