Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > I

iofind(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

iofind — find and convert ASCII files containing the legacy representation of device (special file name or hardware path)

SYNOPSIS

/usr/sbin/iofind -h

/usr/sbin/iofind -H [-n] [-f file] [-d directory] [-i filelist] [-R [-p] [-F]]

/usr/sbin/iofind -n [-H] [-f file] [-d directory] [-i filelist] [-R [-p] [-F]]

DESCRIPTION

The iofind command helps users with the migration to the agile naming model (see intro(7)). First, iofind identifies ASCII files on the system that contain patterns representing legacy mass storage device special file names or hardware paths. Then iofind replaces the matching patterns with their mapping in the agile naming model inside the ASCII files.

NOTE: iofind may take several minutes to execute depending on the number of files to be searched (see the -d,-n,-H options). If there are many files, the search will take a long time. An alternative is to redirect the output to a file and run in background mode (for example, iofind -H > outputfile &). The increasing size of this output file indicates that iofind is making progress.

While executing, the iofind command creates the following files in the /var/adm/iofind/logs/mmddyy_hhmm/, /var/adm/iofind/cfg/, /var/adm/iofind/logs/mmddyy_hhmm/backup/, and /var/adm/iofind/logs/mmddyy_hhmm/preview/ directories.

Files under the /var/adm/iofind/logs/mmddyy_hhmm/ directory:

  • pathDSFlist.txt contains the list of valid legacy device special file patterns to search for.

  • pathHWlist.txt contains the list of valid legacy hardware path patterns to search for.

  • DSFmapping.txt contains a colon separated list of all legacy device special files mapped to their corresponding persistent device special files. The first field is the persistent device special file name and the second field is the legacy name.

  • HWmapping.txt contains a colon separated list of all legacy hardware paths mapped to their corresponding lun and lunpath hardware paths in the agile naming model. The first and second fields are the lun and lunpath hardware paths, respectively, in the agile naming model. The third field is the legacy path.

  • dsf_match_files.txt contains a list of files which match at least one of the device special file search patterns in pathDSFlist.txt.

  • hwpath_match_files.txt contains a list of files which match at least one of the hardware path search patterns in pathHWlist.txt.

  • search_file_list.txt contains the list of files to be searched.

  • summary.txt contains the command output summary, which is also displayed on the console during execution.

    File under the /var/adm/iofind/cfg/ directory:

    • iofind_exclude.cfg contains a list of directories to be excluded from the search. The purpose of this file is to speed up the search by not searching directories indicated in this file. Running the iofind command will create this file if it does not already exist. If a user provides the -i option, this file is not used to exclude directories. A user can edit this file to add or delete any directories from the search. Delete all the entries in the iofind_exclude.cfg file if you do not want iofind to skip any directories. By default, the following directories are represented in this file:

      /var/adm/msgbuf/ /var/adm/iofind/ /var/adm/syslog/ /var/adm/crash/ /var/adm/userdb/ /var/opt/ignite/ /usr/share/lib/ /usr/share/man/ /var/spool/ /etc/opt/resmon/ /opt/ignite/boot/ /opt/hpsmh/ /opt/openssl/ /opt/ssh/ /opt/wbem/ /opt/atok/ /opt/X11/ /opt/java/ /opt/gnome /opt/java /opt/mozilla /opt/wrkio /opt/msscaf/ /opt/aCC/ /opt/sfmdb/ /usr/lib/ /usr/bin/ /usr/dt/ /usr/include/ /var/evm/ /var/stm/ /stand/ /tmp/

    Files under the /var/adm/iofind/logs/mmddyy_hhmm/backup/ directory:

    • These are backup copies of the original files, if any, before they get modified by the -R option. They are stored including their parent directory. For instance, the file /usr/mydata will be saved under /var/adm/iofind/logs/mmddyy_hhmm/backup/usr/mydata.

    Files under the /var/adm/iofind/logs/mmddyy_hhmm/preview/ directory:

    • When -p option is used along with -R, the original files are not actually modified, but a preview of the modified files, including their parent directory, is made available under this preview directory.

    If a user does not use the -i option to specify a file or files to search, the iofind command will search through directories, except those indicated in the iofind_exclude.cfg file, and it will skip files with the following file extensions:

    .ttf .gif .jpg .jar .html .img .xml .mof .so.1 .so .sdl .png .css .tar .gz .zip .1m .pl

    The -f option can be used to specify a list of patterns to be searched in ASCII files on the system. The patterns to be searched must be entered in the input file, file, one per line. This input file must contain legacy device special files, legacy hardware paths, or a mix of both. Device special file names must be fully qualified. For example, the full path /dev/dsk/c0t0d0, must be used instead of c0t0d0.

    If iofind is invoked with the -n option, and no input file is specified using the -f option, iofind builds a list of legacy device special file patterns from the data returned by the ioscan command.

    If iofind is invoked with the -H option, and no input file is specified using the -f option, iofind builds a list of legacy hardware path patterns by calling the ioscan command.

    The -H and -n options can be used together to search both types of patterns.

    If iofind is invoked with the -R option, it replaces the matching patterns with their mapping in all ASCII files identified, unless the -p (preview) option is specified. Before modifying the files, iofind saves a copy of the original ASCII files in the /var/adm/iofind/logs/mmddyy_hhmm/backup/ directory. iofind also asks for confirmation before each change, unless the -F (force) option is used.

Options

iofind recognizes the following options:

-d directory

Specify the directory which contains the files to be searched. If the -d option is not specified, then the current directory is used. All directories under the specified directory are searched recursively.

-F

Turn off interactive mode (also known as the force option). This option must be used with the -R option. The user is not prompted to confirm the replacement of a pattern before the pattern is replaced.

-f file

Specify a list of patterns in the input file to search for. The format of the input file is one device special file or hardware path, per line. When an input file is provided using the -f option, the user must also specify the -n or -H option.

-H

Search ASCII files on the system for legacy hardware path patterns. See "NOTE" in DESCRIPTION about displaying output to a file. If the -f option is not specified, iofind first calls ioscan -fnk to generate a list of hardware path patterns to be searched for. Otherwise, if the -f option is specified, iofind searches the ASCII files for the hardware path patterns defined in the file. Patterns are saved in the pathHWlist.txt file.

Either the -H or -n option must be specified. Also, both options can be specified together.

-h

Print the command usage. When iofind is invoked with no command line options, or with the -h option, it prints a usage message.

-i filelist

Provide a list of files under the specified directory, for which to search for legacy device special files and hardware paths. The user may list as many files as needed on the command line when using the -i option. Each file must be separated by a comma.

-n

Search ASCII files on the system for legacy device special file patterns. See "NOTE" in DESCRIPTION about displaying output to a file. If the -f option is not specified, iofind first calls ioscan -fnk to generate a list of device special file patterns to be searched for. Otherwise, if the -f option is specified, iofind searches the ASCII files for the devices special file patterns defined in the file. Patterns are saved in the pathDSFlist.txt file.

Either the -H or -n option must be specified. Also, both options can be specified together.

-p

Preview, but do not replace, the selected patterns. This option is only supported in combination with the -R option. When both the -p and -R options are specified, iofind does not do the actual replacement of matching patterns (see the -R option), but the replacement information will be created under this directory: /var/adm/iofind/logs/mmddyy_hhmm/preview/

-R

Replace matching patterns with their mapping in the agile naming model. If the -R option is used with the -p option, a preview of changes will be provided in the /var/adm/iofind/logs/mmddyy_hhmm/preview/ directory. If the -R option is used without the -F option, iofind asks the user for a confirmation before executing each replacement in the file. If used with the -F option, the replacement is executed without asking the user for confirmation.

You must be superuser to execute the -R option. You do not have to be superuser to execute the other options.

All files modified by this command are first backed up in the /var/adm/iofind/logs/mmddyy_hhmm/backup/ directory.

RETURN VALUE

Exit values are:

0

Successful completion.

>0

An error condition occurred.

EXAMPLES

Generate a list of searchable hardware paths on the system.

iofind -H

Generate a list of searchable hardware paths on the system. Redirect the output to a file and run as a background task.

iofind -H > outputfile &

Find all patterns matching the legacy hardware paths, 0/1/1/0.0.0 and 1/2/0/0.3.0, in the hwlist.txt file. This file contains the strings, 0/1/1/0.0.0 and 1/2/0/0.3.0, one string per line.

iofind -H -f hwlist.txt

Search all files under the current directory for matching hardware path patterns found in hwlist.txt and preview the replacement of any matching patterns without doing the actual replacement in the files.

iofind -H -f hwlist.txt -R -p

Search all files under the current directory for matching device special file patterns found in dsflist.txt and replace all matching patterns with their mapping in the agile naming model. The format of the input file is one full path device special file, such as /dev/dsk/c1t3d0, per line. Do not prompt the user for confirmation before each replacement.

iofind -n -f dsflist.txt -R -F

Scan through all files under /etc and its subdirectories to find all patterns matching the legacy hardware paths, 0/1/1/0.0.0 and 1/2/0/0.3.0, in the hwlist.txt file. This file contains the strings, 0/1/1/0.0.0 and 1/2/0/0.3.0, one string per line.

iofind -H -f hwlist.txt -d /etc

WARNINGS

The replace functionality (-R option) needs appropriate permissions to make changes to the files to be modified.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.