Section: FSCLI (1)
Updated: September 2018
- sndisk_scan [-t thread_count] [-f] [-d] [-u] [-n] [-i] [-e] [-P] [-N] [-M[-D]] [-S] managed_directory_path
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.
- -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.)
- 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.
- 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.
- 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.)
- Find non-stored files.
- Find files and directories with inherited attributes.
- 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.
- Print matching entries found. (For example if using the -n option to find non-stored files, print the non-stored files found.)
- Print non-matching entries found. (For example if using the -n option to find non-stored files, print the stored files found.)
- Add the management attributes and events to the files and directories found.
- When adding the management attributes and events to directories found, also set the new directory key.
- For non-stored files found, add those files as store candidates.
- Path name of the managed directory to scan.
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.
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