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 > R

rmsf(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

rmsf — remove a special (device) file

SYNOPSIS

/sbin/rmsf [-a|-k] [-D directory] [-q|-v] special_file ...

/sbin/rmsf [-C class | -d driver] [-D directory] -H hw_path [-k] [-q|-v]

/sbin/rmsf -L

/sbin/rmsf -u -H hw_path

/sbin/rmsf -x

DESCRIPTION

The rmsf command removes one or more special files from the /dev directory and potentially removes information about the associated device or devices with H/W type DEVICE, TGT_PATH or a LUN_PATH, (see ioscan(1M)) from the system.

If no options are specified, rmsf removes only the special_file specified on the command line. The -k option causes rmsf to remove the definition of the device from the system without removing any special files. The -a option causes rmsf to remove the device definition and all special files that map to it from the /dev directory (or the directory specified with the -D option). When special_file is a persistent device special file type, the device corresponding to special_file should not be in an open state in order for the command to complete successfully.

Without the -D option, if special_file is specified with a relative path, the path is treated relative to the default device directory /dev. If special_file is specified with an absolute path and the -D option is also used, the special_file with absolute path will have precedence over the -D option.

Note that if special_file belongs to a node for which H/W type is not DEVICE, the device definition will not be removed from the system and the special_file will be removed if it is a leaf node.

If a -H hw_path is specified, special files are removed as follows:

  • If hw_path belongs to a node with H/W type DEVICE, all special files mapping to devices at that hardware path and the system definition of those devices are removed. If the hw_path belongs to LUN hardware path of a node of type DEVICE, the device should not be in an open state for the command to complete successfully.

  • If hw_path belongs to a node with H/W type LUN_PATH, all legacy special files mapping to devices at that hardware path, as well as the system definition of those devices, are removed.

  • If hw_path belongs to a node for which H/W type is TGT_PATH, no special files are removed; only corresponding node is removed.

  • If hw_path belongs to a node for which H/W type is not DEVICE, then, a special file is removed as follows:

    • If it is a leaf node, only special files for that node will be removed.

    • If the node has children, then a warning message will be issued and system definition of all the children devices and their special files are removed.

The -C and -d options remove only those special files that are associated with the given device driver or that belong to the given device class, respectively. This is useful when there is more than one type of special file mapped to a single hardware path. These options are not supported with the class or device drivers which do not have a hardware module on the system; for example, the pseudo class.

If the -k option is specified, the definition of all devices at that hardware path are removed from the system, again without removing any special files.

The -v (verbose) option displays the name of each special file as it is deleted. The -q (quiet) option suppresses the deletion message.

With the -L option, rmsf disables the legacy naming model, removing all legacy I/O nodes and their device special files from the system.

If the -u and -H options are specified, rmsf performs an unbind on the driver associated with the given hw_path. The hw_path must be a LUN hardware path (see intro(7)).

The -x option removes stale device special files and the stale IO nodes from the system. Stale device special files can be displayed using the lssf command with -s option (see lssf(1M)).

Note that most drivers do not support the ability to be removed from the system.

If the device being removed from the system uses a dynamically assigned major number, that number will be freed up for future allocation.

Options

rmsf recognizes the following options:

-a

Remove the definition of the device from the system along with all special files that refer to the device. This option cannot be used with -k.

-C class

Match devices that belong to a given device class, class. Device classes can be listed with the lsdev command (see lsdev(1M)). They are defined in files in the directory /usr/conf/master.d. This option cannot be used with -d.

-d driver

Match devices that are controlled by the specified device driver, driver. Device drivers can be listed with the lsdev command (see lsdev(1M)). They are defined in files in the directory /usr/conf/master.d. This option cannot be used with -C.

-D directory

Override the default device installation directory /dev and remove the special files from directory instead. directory must exist; otherwise, rmsf displays an error message and exits. See WARNINGS.

-H hw_path

Match devices at a given hardware path, hw-path. Hardware paths can be listed with the ioscan command (see ioscan(1M)).

A hardware path specifies the addresses of the hardware components leading to a device. It consists of a string of numbers separated by periods (.), such as 52 (a card), 52.3 (a target address), and 52.3.0 (a device).

If a hardware component is a bus converter, the following period, if any, is replaced by a slash (/) as in 2, 2/3, and 2/3.0. In the agile view (see intro(7)), the devices will have new hardware path formats, which can be displayed with the ioscan -N command (see ioscan(1M)).

See WARNINGS section for more about using this option for critical resources.

-k

Remove the definition of the device from the system, but not any special files. This option cannot be used with -a.

-L

Disable legacy naming model. This command removes all legacy I/O nodes and their device special files. Therefore, before running this command, all applications should have been migrated to use the agile naming model.

The iofind command (see iofind(1M)) can be used to find all the ASCII files on the system containing legacy device file names or hardware paths.

The rmsf -L command will not complete successfully if any legacy I/O nodes are in the open state. If this is the case, the command will fail and it will return information about the processes that opened the legacy I/O nodes, such as process name, PID, and device special file.

Note: If the legacy naming model needs to be re-enabled, run insf -L (see insf(1M)). To check the current status of the legacy naming model, run insf -L -v.

WARNING: Before running this command, check the latest release notes of HP-UX 11i Version 3 on http://docs.hp.com for information on limitations that exist when legacy mode is disabled and how this may impact your system. This command will not validate the presence or utilization of products with these limitations. Also note that this option cannot be used in single user mode.

-q

Quiet option. Normally rmsf displays a message as each driver is removed. This option suppresses the driver message, but not error messages.

-u

Unbind the driver associated with the given hardware path. The hardware path must be a LUN hardware path. This option must be used with the -H option.

-v

Verbose option. Prints the name of the special file as it is removed by rmsf. May be used as a progress indicator.

-x

Remove all the stale IO nodes and the stale device special files from the system. These entries correspond to those nodes which have an entry in the system I/O configuration files but the corresponding device is not found (see ioconfig(4)).

This option removes the stale device special files in the following directories only:

/dev/dsk /dev/rdsk /dev/ct /dev/rmt

/dev/floppy /dev/rfloppy /dev/rscsi /dev/esctl

/dev/disk /dev/rdisk /dev/rtape

RETURN VALUE

rmsf exits with one of the following values:

0

Successful completion, including warning diagnostics.

1

Failure. An error occurred.

2

Driver does not support this feature.

DIAGNOSTICS

Most of the diagnostic messages from rmsf are self-explanatory. Listed below are some messages deserving further clarification. Errors cause rmsf to halt immediately. Warnings allow the program to continue.

Errors

No such device in the system

No device in the system matched the options specified. Use ioscan to list the devices in the system (see ioscan(1M)).

special_file is not a special file

The file is not associated with an IO device.

Warnings

WARNING: The specified hardware path is BUS_NEXUS/INTERFACE type.

This will remove all the devices connected to it.

The H/W type of the node specified by hw_path is BUS_NEXUS/INTERFACE. All the devices under this path will be removed.

Cannot remove driver at hw_path

The definition of the device located at hw_path and controlled by driver cannot be removed from the kernel. That is driver does not support the unbind function.

No device associated with special_file

The special file does not map to a device in the system; the file is removed unless the -k option was specified.

EXAMPLES

Remove the special file mux0 from the current directory:

rmsf ./mux0

Remove the system definition of the device associated with /dev/lp0 along with all special files that refer to the device:

rmsf -a /dev/lp0

Remove the system definitions for all devices associated with hardware path 52.6.0:

rmsf -k -H 52.6.0

Remove all the stale IO nodes and stale device special files from the system:

rmsf -x

Unbind a driver associated with a node corresponding to the hardware path 64000/0xfa00/0x6:

rmsf -u -H 64000/0xfa00/0x6

WARNINGS

Most commands and subsystems assume their device files are in /dev, therefore the use of the -D option is discouraged.

Most device drivers do not support the unbind operation necessary to remove the device from the system.

Use of the rmsf command should be done carefully when it is initiated on a node with H/W type LUN_PATH, which maps to boot device or a node with H/W type INTERFACE, to which boot device is connected as this could lead to a system hang if no mirroring Volume Group exists to the critical device.

AUTHOR

rmsf was developed by HP.

FILES

/dev/config

/etc/ioconfig

/etc/ext_ioconfig

/usr/conf/master.d/*

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