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

scsimgr(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

scsimgr — SCSI management and diagnostic utility

SYNOPSIS

/usr/sbin/scsimgr [-fpv] command [-d driver] [identifier] [keyword]... [argument]...

/usr/sbin/scsimgr [-h] [-d driver] [command]

DESCRIPTION

scsimgr performs management and diagnostic operations on the SCSI objects and subsystems.

SCSI objects are identified by either their hardware path, character Device Special File (DSF), or their class and instance number. These are typically visible in the output of ioscan(1M). SCSI objects are typically a single LUN (logical unit number), LUN path, target path, HBA controller, or a group of these. The SCSI object is specified as an identifier in the command line.

A SCSI subsystem is typically the SCSI services module, a SCSI class driver, or a SCSI interface (also known as I/F) driver.

scsimgr provides generic management and diagnostic capabilities for the SCSI subsystem as well as specific management and diagnostic capabilities for SCSI class drivers or SCSI interface drivers through plug-ins provided by these drivers.

Refer to the respective manpages of the scsimgr driver plug-ins for detailed description of commands and other functions specific to that driver. The manpages of driver plug-ins are in section 7, and are of the form: scsimgr_driver where driver is the name of the driver. For example scsimgr_esdisk(7) is the manpage of the scsimgr plug-in for the esdisk driver.

A SCSI subsystem may maintain a set of attributes. An attribute is a data value associated with either the SCSI subsystem, a set of SCSI objects, or a single instance of a SCSI object. It has a name, a data type, and may have one or more value instances: current (run-time value), saved (value in a persistent store), and default.

An attribute can be read-only or read-write. Read-only attributes are global or per-object instance information that can be queried individually through their name. Saved and default values are irrelevant for such attributes.

Read-write (or settable) attributes are tunables. Users or user applications can change their current or saved values. The saved value is used to set the current value of the attribute at system boot or other re-initialization points. When no saved value exists, the default value is used to set the current value.

Attributes can be generic or driver specific. Generic attributes do not depend on a class or an interface driver. They are described in this manpage. Driver specific attributes are maintained by a class or an interface driver. They are described in the respective manpages of the driver plug-ins for scsimgr.

To ease management, adapt to various resource conditions, and increase the interoperability and reliability of the SCSI stack, settable attributes can be defined at various scopes or levels:

  • Global: A value of an attribute set at this scope, affects the default behavior for the SCSI stack, a class driver or an interface driver. For instance, the default I/O timeout can be set to 60ms for all SCSI devices.

  • Per device type, vendor identifier, product identifier or specific product revision of devices bound to a driver. A value of an attribute set at this scope, affects the default behavior for the set of devices bound to the specified driver and meeting the specified criteria. For instance, the default I/O time out can be set to 60ms for disk devices from HP and bound to driver esdisk, and to 120ms for all tape devices bound to driver estape.

  • Per a specific instance of an object: A value of an attribute set at this scope overwrites the default behavior for a specific instance of an object. For instance, I/O time out can be set to 50ms for disk0.

When the change to the current value of an attribute takes effect depends on the level or scope where the change is performed. Change of an attribute at a global or intermediate levels (such as, device type and vendor id) will not affect existing objects until an event requiring re-initialization of the object occurs.

For instance, change of global default I/O time out will not affect I/O transfer for LUNs already opened. If a LUN is closed and re-opened, the new default I/O time out will be used. When change of an attribute at a per-object instance level takes effect depends on the attribute and the driver owning it. For more information, refer to the manpage of the driver plug-in for scsimgr.

In general, change to current value of a per-object instance of a generic attribute takes effect immediately. For instance, if the I/O time out is changed for disk0, the new value will be used for the next I/O transfer to disk0.

A given attribute can not necessary be set at all levels. Certain attributes can only be set at a global level. That is the case for attributes adjusting global resource usage. Other attributes can only be set at a per object instance level. Some drivers do not provide the possibility to set attributes at intermediate level; such as, device type and vendor identifier.

If setting an attribute causes the system to become unstable, it may be possible to recover by rebooting the system in single user mode. The SCSI subsystem uses attribute factory default values for objects initialized while in single user mode.

The attribute is specified as an argument in the command line.

scsimgr performs the following operations:

  • Display and clear global statistics or statistics for SCSI objects.

  • Display status and other information for SCSI objects.

  • Display information for all the LUN paths to a LUN.

  • Get, set and save attributes for SCSI objects.

  • Add, remove and list settable attribute scopes for drivers

  • Validate the change of LUN associated to a LUN path (replace WWID).

  • Validate the change of LUN associated to a legacy DSF (replace a legacy DSF).

  • Disable or enable SCSI objects.

  • Perform SCSI task management functions such as LUN reset, cold target reset, warm target reset.

  • Set or get the user friendly character string identifying a LUN (helpful when the LUN is relocated).

  • Synchronize cache for block devices.

  • Erase blocks of optical memory devices.

  • Inquire SCSI devices for its characteristics.

Options

-d driver

Specifies the name of the driver for driver specific commands.

Note: When this option is specified, the driver plug-in (if present) executes the command. The driver plug-in may not necessarily support all commands. To list the commands supported by the driver module run the following command:

scsimgr -h -d driver

-f

Forces execution of destructive/disruptive operations. With this option, the command executes without warning or prompting for confirmation.

-h

Prints general usage information or help information on a specific operation

-p

Produces a one line parse-able output of values separated by a colon (:).

-v

Displays verbose or extended output where applicable.

command

Specifies a supported scsimgr command. Supported commands include:

clear_stat

Clears statistics.

cold_bdr

Performs a cold reset on a target device.

ddr_add

Defines a new settable attribute scope for a driver

ddr_del

Deletes a settable attribute scope for a driver

ddr_list

Lists driver settable attribute scopes

disable

Disables a SCSI object.

enable

Enables a SCSI object.

erase

Pre-erases the medium of a magneto-optical device.

get_attr

Displays information on attributes.

get_devid

Gets an identifier for a device.

get_info

Displays information.

get_stat

Displays statistics.

inquiry

Requests information on parameters of the target and a component LUN.

lun_map

Displays information about LUN paths of a LUN.

lun_reset

Resets a LUN.

replace_leg_dsf

Validates change of a LUN associated with a legacy DSF.

replace_wwid

Validates the change of a LUN associated to a LUN path.

save_attr

Saves value persistently (across reboot) for attributes.

set_attr

Sets current values for attributes.

set_devid

Sets an identifier for a device.

sync_cache

Requests synchronization of the write cache of a block device.

warm_bdr

Performs a warm reset on a target device.

Refer to the Supported scsimgr Commands section below for details about these commands.

identifier

Identifies the SCSI object on which the operation applies. It can be of the following form:

-D { dsf | leg_dsf } | -H hw_path | (-C class -I instance) | -N attr_scope

where the following means:

dsf

Full path of character persistent device special file of a LUN or a SCSI HBA controller.

leg_dsf

Full path of character legacy device special file of a LUN (see intro(7)).

hw_path

Hardware path of a LUN, LUN path, target path, or SCSI HBA controller.

class

Class of a LUN, LUN path, target path, or SCSI HBA controller. (Must be used in combination with the instance.)

instance

Instance of a LUN, LUN path, target path, or SCSI HBA controller. (Must be used in combination with the class.)

attr_scope

Scope of settable attributes for a driver. It must be of the following form:

/escsi/driver[/pdt[/vid[/pid[/rev]]]]

Where :

driver

Name of the driver (for example, esdisk).

pdt

Peripheral device type in hex (for example, 0x0, 0x1) as returned from inquiry data.

vid

Vendor identifier as returned in inquiry data (for example, "HP ")

pid

Product identifier as returned in inquiry data (for example, "SDLT600 ")

rev

Product revision as returned in inquiry data (for example, "HP06")

Note: If the settable attribute scope is defined at the vendor identifier (vid), product identifier (pid), or product revision level (rev), the vid, pid, or rev can be partially specified by terminating it with the special string _*_. This wildcard covers a family of devices from the same vendor, which share the same characteristics, but may have different product identification information.

The following examples show partial level specification for devices bound to the esdisk driver:

  • /escsi/esdisk/0x0/HP_*_:

    All disk devices with a vid starting with "HP"

  • '/escsi/esdisk/0x0/HP /ST39103_*_':

    All disk devices from HP with a pid starting with "ST39103".

  • '/escsi/esdisk/0x0/HP /ST336706LC /HP_*_':

    All disk devices from HP with a vid of "ST336706LC " and a rev starting with "HP".

Note: Only a few commands support legacy device special file of a LUN as SCSI object identifiers. See the command description to determine whether a command supports this identifier.

keyword

Provides additional information on the scope of the command. The following keywords are defined. A given command may not necessary support all the keywords.

all_ctlr

Operation applicable to all SCSI HBA controllers.

all_lpt

Operation applicable to all LUN paths of the LUN or the target path identified by the parameter identifier.

all_lun

Operation applicable to all LUNs.

all_tp

Operation applicable to all target paths of the SCSI HBA controller identified by the parameter identifier.

all_ddr

Operation applicable to all attribute scopes registered

current

Operation applicable to current values of the attributes.

default

Operation applicable to default values of the attributes.

nonsettable

Operation applicable to read only attributes.

saved

Operation applicable to saved values of the attributes.

settable

Operation applicable to read-write attributes.

argument

Provides additional parameter depending on the command. For attribute related commands, argument is of the form:

-a attribute

where attribute is an attribute argument in one of the three forms below:

attr | attr=value | attr=default

with the following meaning:

attr

Name of an attribute.

value

Value to set current and/or saved value of the attribute.

default

When specified with the command save_attr, the default value of the attribute is persistently restored.

Note: Valid attribute names can be obtained by running the command:

scsimgr get_attr identifier

They depend on the identifier.

Supported scsimgr Commands

To get the list of supported scsimgr commands, run: "scsimgr -h". These commands are described below. These commands are described below.

clear_stat/get_stat

The clear_stat command clears while get_stat displays global statistics or statistics of a SCSI object or a group of SCSI objects, respectively.

The -v option with get_stat, displays all statistics. If -v is not specified, only basic statistics are displayed.

The -v option with clear_stat specifies a verbose output of the execution of the command. For instance, if executed on a group of objects (for example, all_lun), the command shows all the result for each SCSI object.

If no identifier or keyword for a group of SCSI objects is specified, get_stat or clear_stat displays or clears global generic statistics respectively.

If an identifier or a keyword for a group of SCSI objects is specified, get_stat or clear_stat displays or clears generic statistics (in other words, statistics commonly defined for all class or interface drivers), respectively. It also displays or clears class and/or interface driver specific statistics if any, if the driver provides a scsimgr plug-in module. So there is no need to specify "-d driver " to display or clear driver specific statistics for SCSI objects. However, to display or clear a class or interface driver global statistics, you must specify the option "-d driver " without any SCSI object identifier or keyword for a group of SCSI objects.

Usage:

scsimgr [-v] clear_stat [ identifier | all_lun | all_ctlr ]

scsimgr [-v] clear_stat identifier {all_lpt|all_tp}

scsimgr [-v] clear_stat -D leg_dsf

scsimgr [-v] get_stat [ identifier | all_lun | all_ctlr ]

scsimgr [-v] get_stat identifier {all_lpt |all_tp}

scsimgr [-v] get_stat -D leg_dsf

Note: identifier identifies a LUN, LUN path, target path, or SCSI HBA controller.

cold_bdr/lun_reset/warm_bdr

Respectively performs the following SCSI task management functions (if supported by the interface driver):

  • TARGET COLD RESET management task sent to the device.

    Actions necessary to perform a cold target reset depend on the SCSI transport. In case of Fibre Channel transports, the target is reset and a TPLO (Third Party Log Out) is performed.

  • LUN RESET management task sent to the device.

  • TARGET WARM RESET management task sent to the device.

Usage:

scsimgr [-f] cold_bdr identifier

scsimgr [-f] lun_reset identifier

scsimgr [-f] warm_bdr identifier

Note: identifier identifies only a LUN.

ddr_add/ddr_del

Respectively adds and deletes a settable attribute scope for a driver.

Once a scope is added, it is possible to set specific attribute values at this scope. These values will affect the default behavior for devices covered by the scope.

It is not necessary to add a scope to be able to display the values of attributes for devices covered by the scope. The values are inherited from highest scope where the attributes are explicitly set.

WARNING: These commands should be used with caution. It is recommended to consult your HP support representative before adding or deleting a settable attribute scope.

Usage:

scsimgr [-f] ddr_add -N attr_scope

scsimgr [-f] ddr_del -N attr_scope

ddr_list

Lists driver settable attribute scopes registered on the system.

Usage:

scsimgr ddr_list

Note: The attribute scope specifies the set of devices affected by attribute values set at this level.

To display the list of attributes that can be set at a given scope and their values, run the command:

scsimgr get_attr -N attr_scope

For instance, if you add the scope corresponding to all disk devices from HP: '/escsi/esdisk/0x0/HP ', to list attributes which can be set at this level and their values, run the following command:

scsimgr get_attr -N '/escsi/esdisk/HP ' settable

For description of attributes, refer to the manpage of the scsimgr plug-in for the corresponding driver.

disable/enable

Disables/enables a SCSI object. Upon disable, the object cannot be used to transfer I/Os. If the disabled object is a LUN, all pending I/Os are aborted for that LUN. Currently supported SCSI objects are LUNs and LUN paths.

The SCSI object can be disabled either administratively by invoking the disable command, or by the SCSI stack upon detection of certain types of critical errors. When this condition has occurred, HP-UX logs a message in syslog which informs the user that a SCSI object has been disabled. In the case of the SCSI stack disabling the SCSI object, the system administrator, after resolving the problem on the device, can invoke the enable command to resume data transfers on the SCSI object.

Usage:

scsimgr enable identifier

scsimgr [-f] disable identifier

Note:

disable and enable operations are currently only supported on block devices and their LUN paths.

identifier identifies either a LUN or a LUN path.

erase

Pre-erase the whole medium for magneto-optical devices that support write without erase.

Usage:

scsimgr [-f] erase identifier

Note: identifier identifies only a LUN.

get_attr

Displays information of global attributes or attributes of a SCSI object or a group of SCSI objects. All the values of the attribute (current, saved and default) are displayed. The displayed values can be restricted by using the appropriate keyword (in other words -- current, saved, and default).

All settable or read-write attributes are system-wide; in other words, they do not depend on the kernel instance used to boot the system. The output is guaranteed to remain unchanged across scsimgr releases for an attribute name-value pair.

The -v option displays a brief description for each attribute.

The -p option displays the values of the attributes requested on a single line and separated with the colon delimiter (:). By default the current value is displayed. Saved and default values can be requested using the corresponding keyword. The -p option requires a list of attributes using the "-a attribute " option.

If no identifier or keyword for a group of SCSI objects is specified, get_attr displays global generic attributes (in other words, global attributes common to all class and interface drivers).

If an identifier or a keyword for a group of SCSI objects is specified, get_attr displays generic attributes (in other words, attributes commonly defined for all class or interface drivers). It also displays class and/or interface driver specific attributes if any, if the driver provides a scsimgr plug-in module. So there is no need to specify "-d driver " to display driver specific attributes. However, to display global attributes maintained by a class or interface driver, you must specify the option "-d driver " without any SCSI object identifier or keyword for a group of SCSI objects.

The list of generic attributes currently supported by scsimgr is described in the Table: scsimgr Attributes section later in this manpage. To view the list of specific attributes maintained by a class or interface driver, if any, refer to the manpage of the driver's plug-in for scsimgr. See scsimgr_<driver_name>(7), where <driver_name> is the name of the driver. For example, see scsimgr_esdisk(7).

Usage:

scsimgr [-v] get_attr [ identifier | all_lun | all_ctlr | all_ddr] [current] [default] [saved] [ nonsettable | settable | { -a attr... -a attr } ]

scsimgr -v get_attr [ identifier {all_lpt | all_tp | all_ddr}] [current] [default] [saved] [ nonsettable | settable | { -a attr... -a attr } ]

scsimgr -p get_attr [ identifier | all_lpt | all_ctlr | all_ddr ] [ current | default |saved] -a attr... -a attr

scsimgr -p get_attr [ identifier { all_lpt | all_tp | all_ddr }] [ current | default | saved ] -a attr... -a attr

Note: identifier identifies either a LUN, LUN path, target path, SCSI HBA controller, or a settable attribute scope for a driver.

The user can specify the following command to get the current and default value of a settable attribute:

scsimgr get_attr -D /dev/rdisk/disk0 current default settable

But with the -p option, only one attribute value can be specified; either current (by default), saved, or default, and a list of attributes is required.

get_devid/set_devid

Respectively gets and sets an identifier for a device.

An identifier is a user friendly readable string (maximum size of 128 characters) that is stored on the device itself which remains viewable even if the device is moved physically. These commands can only be performed on devices that support the SCSI commands: REPORT DEVICE IDENTIFIER and SET DEVICE IDENTIFIER. Devices implementing these commands are mandated to accept identifier of up to 64 bytes. They can optionally accept identifiers of up to 512 bytes. So even if scsimgr allows to specify identifiers of up to 128 bytes, it is safer to limit to 64 bytes.

Usage:

scsimgr get_devid identifier

scsimgr [-f] set_devid identifier device_id

Note: identifier identifies only a LUN. device_id is a user friendly device identifier.

get_info

Displays global status and other information, or per-SCSI object instance status or other information of a SCSI object or a group of SCSI objects.

Use -v option to display all information. If -v is not specified only a basic set of information is displayed.

If no identifier or keyword for a group of SCSI objects is specified, get_info displays global information maintained by SCSI services module.

If an identifier or a keyword for a group of SCSI objects is specified, get_info displays generic information (in other words, information defined for all class or interface drivers). It also displays class and/or interface driver specific information if any, if the driver provides a scsimgr plug-in module.

So there is no need to specify -d driver to display driver specific information.

However, to display a class or interface driver specific global information, you must specify the option -d driver without any SCSI object identifier or keyword for a group of SCSI objects.

Usage:

scsimgr [-v] get_info [ identifier | all_lun | all_ctlr ]

scsimgr [-v] get_info { identifier all_lpt | all_tp }

Note: identifier identifies a LUN, LUN path, target path, or SCSI HBA controller.

get_stat

See clear_stat above.

inquiry

Requests and displays information regarding parameters of the target and a component LUN including: standard inquiry data, vital product data and SCSI commands supported by the device server.

Usage:

scsimgr inquiry identifier [ page-key | page ]

Note: page is page number in hexadecimal

page-key is the page as ASCII string, and can be one of the following:

* supported:

supported pages (0x00)

* wwid:

identifier page (0x83)

* serial:

serial number page (0x80)

* implemented:

implemented operating definitions (0x81)

* ascii:

ASCII operating definitions (0x82)

Note: identifier identifies a LUN or a LUN path.

lun_map

Displays information (Class and Instance, Hardware Path, type of SCSI transport protocol, State) about all the LUN path/s of a LUN. It also displays the World Wide Identifier (WWID), if it exists, of the LUN and the number of LUN paths to this LUN.

If no identifier is specified, information about LUN paths of all the LUNs will be displayed.

If used with the -p option, information for each LUN path is displayed in a single line in a parse-able manner. The fields are separated with the colon delimiter (:).

Note that the -p option can be used only when a LUN identifier is specified.

Usage:

scsimgr [-v] lun_map

scsimgr [-p] lun_map identifier

Note: identifier identifies only a LUN.

lun_reset

See cold_bdr above.

replace_leg_dsf

Validates change of a LUN associated with a legacy Device Special File (DSF).

Typically when a LUN is replaced, the new LUN has a different WWID (WorldWide IDentifier). A new persistent DSF is created for this LUN, but legacy DSFs continue to be associated with the replaced LUN until the system is rebooted. replace_leg_dsf removes the current binding of legacy DSFs with LUN and invokes ioscan to establish a new binding.

A change on the storage network (SAN) or target may affect several legacy device special files (DSFs). Identifying all the affected legacy DSFs may be cumbersome. Therefore, scsimgr allows you to invoke replace_leg_dsf on a target path or a LUN.

When replace_leg_dsf is invoked on a target path or a LUN, scsimgr validates the change of the binding to LUNs for all legacy DSFs corresponding to the LUN paths of the target path or the LUN.

Note that this operation can be performed on a legacy DSF only after it has been closed.

The replace_leg_dsf command combined with the replace_wwid command replaces the fcmsutil replace_dsk command which is now obsolete. See the fcmsutil(1M) manpage.

To replace the fcmsutil replace_dsk command, use the scsimgr replace_wwid command if LUN paths are affected by the replacement and use the scsimgr replace_leg_dsf command to validate the association of legacy device files with the new LUN. If all affected legacy DSFs are closed, it is not necessary to invoke replace_leg_dsf after invoking replace_wwid on corresponding LUN paths.

Usage:

scsimgr [-f] replace_leg_dsf identifier

Note: identifier identifies a legacy Device Special File for the LUN, a LUN, or a target path.

replace_wwid

Validates the change of a LUN associated to a LUN path. It clears the binding of the LUN path with an existing LUN and rescans the parent controller or target path so that the LUN path can be associated with the new LUN.

Note: The scan of the parent object may result in change of state of unrelated LUN paths.

To prevent accidental data corruption, the SCSI stack implements an authentication mechanism based on the LUN WorldWide Identifier (WWID). When a LUN with a different WWID is discovered through a previously discovered LUN path, further access to the device through that LUN path is prevented. The LUN path is put in "Authentication Failure" state. Then, HP-UX logs a message in syslog which informs the user that the replace_wwid operation needs to be performed.

If the user has intentionally replaced the LUN, the scsimgr replace_wwid command must be run to authorize the re-use of that LUN path for a different LUN.

In some situations, a replacement of a target controller may cause LUN paths of corresponding target paths to be put in authentication failure state. To validate the replacement and re-authorize all the affected paths, scsimgr replace_wwid can be used with the target path identifier.

If the LUN itself has been replaced and all its previous LUN paths are now connected to the replaced LUN, scsimgr replace_wwid can be used with the LUN identifier to allow replacement of all LUN paths associated with that LUN.

If the keyword dsf is specified, the DSF of the replaced LUN is re-assigned to the new LUN. This allows applications such as volume groups or file systems to continue to use the same DSF to access the replacing LUN.

This authentication mechanism replaced the one implemented by Fibre Channel Tachyon TL, Tachyon TL2 and FCD drivers on releases prior to HP-UX 11i Version 3. The scsimgr replace_wwid command combined with the scsimgr replace_leg_dsf command replaces the fcmsutil replace_dsk command. See the explanation of the scsimgr replace_leg_dsf command and the fcmsutil(1M) manpage.

Usage:

scsimgr [-f] replace_wwid identifier [dsf]

Note: identifier identifies a LUN, LUN path, or a target path. In case of LUN replacement (that is, the identifier is a LUN), the keyword dsf directs replace_wwid to also assign the device file name of the replaced LUN to the new LUN. If the identifier is a LUN path, or target path, dsf is just ignored.

save_attr

Saves values, persistently, of global attributes or attributes of a single SCSI object. If the keyword default is specified, or the argument is of the form: "-a attr=default", then the default value is restored persistently across system reboots.

If the keyword default is not mentioned and the argument is of the form: "-a attr=value ", then the current value is replaced with the specified value, and it is saved in a persistent store.

Attribute values saved in a persistent store are maintained across reboots.

Only values of attributes that are settable or read-write values can be saved. To view the settable values, use get_attr command with the keyword settable. In case of the value being saved is a string including a space, it should be put within double quotes ("...").

If no identifier or keyword for a group of SCSI objects is specified, attributes specified should be global generic attributes.

If an identifier for a SCSI object is specified, attributes specified can be generic, class driver specific or interface driver specific attributes maintained for the SCSI object. So there is no need to specify option "-d driver " to save driver specific attribute for SCSI objects.

However, to save a class or interface driver's global specific attributes you must specify the "-d driver " option. If you specify the option "-d driver ", you can only specify this driver specific attributes, otherwise, the command will fail for all non driver specific attributes.

Usage:

scsimgr save_attr [identifier] default [ -a attr... -a attr ]

scsimgr save_attr [-d driver] [identifier] -a attr= {value|default}... -a attr= {value|default}

Note:

  • identifier identifies either a LUN, LUN path, target path, a SCSI HBA controller or a settable attribute scope for a driver.

  • To differentiate the string default from the keyword default, you must assign the string as:

    attr='default'

  • WARNING: Changing attribute values at a registered scope for a driver (e.g. device type, vendor identifier, product identifier, etc.) should be done with extreme care. We recommend you consult your HP support representative before doing so.

set_attr

Set current values of global attributes or attributes of a single SCSI object. Values set in this manner remain so only until the system is rebooted (non persistent). To save this value across reboots (persistent), use the save_attr command.

Only values of attributes that are settable or read-write values can be set. To view the settable values, use get_attr with the keyword settable. In case of the value being set is a string including a space, it should be specified within double quotes ("...").

If no identifier or keyword for a group of SCSI objects is specified, attributes specified should be global generic attributes.

If an identifier for a SCSI object is specified, attributes specified can be generic, class driver specific or interface driver specific attributes maintained for the SCSI object. So there is no need to specify option "-d driver " to set driver specific attribute for SCSI objects.

However, to set a class or interface driver's global specific attributes, you must specify the "-d driver " option. If you specify the option "-d driver ", you can only specify this driver specific attributes, otherwise, the command will fail for all non driver specific attributes.

Usage:

scsimgr set_attr [ identifier ] -a attr=value... -a attr=value

Note:

  • identifier identifies either a LUN, LUN path, target path, SCSI HBA controller, or a settable attribute scope for a driver.

  • WARNING: Changing attribute values at a registered scope for a driver (e.g. device type, vendor identifier, product identifier, etc.) should be done with extreme care. We recommend you consult your HP representative before doing so.

set_devid

See get_devid above.

sync_cache

Requests synchronization of the write cache of a block device. Data in the cache are written in the medium.

Usage:

scsimgr sync_cache identifier

Note: identifier identifies only a LUN.

warm_bdr

See cold_bdr above.

Table: scsimgr Attributes

This table lists the scsimgr generic attributes.

Note: In this attribute description table, the following conventions are used:

  • RO is Read Only.

  • RW is Read Write.

  • Range of values for applicable attributes is listed.

ObjectAttribute NameRO/RWTypeDescription
GlobalversionROstringVersion of SCSI services
max_lunidRWuint32Max value of lunid to probe for devices which do not support REPORT LUNS command. Range: 1 - 32
transient_secsROuint32Seconds to wait after a LUN has gone OFFLINE before failing I/Os
lun_cntROuint32Number of LUNs discovered on the host
ctlr_cntROuint32Number of SCSI HBA controllers registered with the SCSI stack
escsi_dbg_lvlRWuint32debug level used to filter diagnostic messages logged. Range: 0 (lvl_panic) System unusable 1 (lvl_alert) Immediate action required 2 (lvl_critical) Critical condition 3 (lvl_err) Error condition 4 (lvl_warn) Warning condition 5 (lvl_note) Normal, but need special handling 6 (lvl_info) Informative
max_q_depthROuint32Default maximum queue depth.
leg_mpath_enableRWbooleanDefault setting of tunable to enable or disable multi-pathing on legacy DSF of a LUN. Values: false(0) or true(1)
escsi_maxphysRWuint32Maximum I/O size allowed by the SCSI subsystem in 4KB units. Range: 64 - 1048575
LUNstateROstringstate of the LUN
dev_typeROstringType of the device
device_fileROstringdefault DSF
classROstringclass of the LUN
instanceROuintLUN instance number
hw_pathROstringHardware path of the LUN
wwidRObinary ascii string LUN World Wide Identifier (WWID)
uniq_nameRObinary string HP-UX specific LUN unique identifier. It corresponds to the WWID displayed in binary string format, for non parallel SCSI devices, and a combination of WWID, serial number, vendor identifier and product identifier for parallel SCSI devices. It allows to uniquely identify devices in the presence of old parallel SCSI devices with non unique WWID
serial_numberROstringSerial Number of the device
vidROstringVendor identifier
pidROstringProduct identifier
firmware_revROstringFirmware revision of the device
protocol_revROstringSPC protocol revision
total_path_cntROuint32Total number of LUN paths
aliasROstringAlias that can be assigned to the LUN. Note: By default, no value is pre-assigned (empty string). Range: ASCII string < 1024 chars.
transient_secsRWuint32Seconds to wait after a LUN has gone OFFLINE before failing I/Os. Range: 0 - 600
leg_mpath_enableRWbooleanEnable (true) or disable (false) multi-pathing on legacy DSF of this LUN. Values: false(0) true(1).
max_q_depthRWuint32Maximum queue depth. Range: 1 - 0xFFFFFFFE
lpt_lockdownROstringLUN path which is locked down for the LUN. All I/Os are issued on this LUN path only (for tape, changer, pass-thru LUNs only). Note: This attribute is only valid when the device is opened.
LUN pathstateROstringState of the LUN path
protocolROstringSCSI transport protocol
lunidROuint64LUN identifier within the target
classROstringClass of the LUN path
instanceROuint32Instance number of the LUN path
hw_pathROstringHardware path of the LUN path
Target pathstateROstringState of the target path
port_idROuint64target port identifier
protocolROstringSCSI transport protocol
port_nameRObinary/ ascii string Target port name
node_nameRObinary/ ascii string Target node name
lpt_cntROuint32Number of LUN paths of the target path
classROstringClass of the target path
instanceROuint32Instance number of the target path
hw_pathROstringHardware path of the target path
HBAstateROstringState of the controller
device_fileROstringDSF of the controller
classROstringClass of the controller
instanceROuint32Instance of the controller
hw_pathROstringHardware path of the controller
lpt_cntROuint32Total number of LUN paths for this controller
tp_cntROuint32Total number of target paths for this controller
port_idROuint64Controller port identifier
protocolROstringSCSI transport protocol
port_nameRObinary/ ascii string Controller port name (WWN)
driver_nameROstringName of the interface driver of the controller
driver_revROstringRevision of the interface driver managing the controller
firmware_revROstringFirmware revision of the controller
cur_speedROstringCurrent configured link speed
max_speedROstringMaximum link speed
capabilityROstringControllers capabilities. It may be combination of none or several of the following: boot: able to be used for boot. dump: able to be used for dump.

Notes:

  • Setting the value of attribute max_q_depth for a LUN, will set the queue depth for all LUN paths of the LUN to the value specified.

  • The queue depth of LUN paths of a LUN can also be changed as follows:

    scsictl -m queue_depth

    However scsictl -m queue_depth only affects the current value while scsimgr can set the value persistently across system reboots.

  • If scsictl is invoked on a persistent DSF, it only affects the current value of all LUN paths. If it is invoked on a legacy DSF, it only affects the current value of the queue depth on the LUN path corresponding to the legacy DSF.

  • If the current value is changed with the ssictl command while the LUN is not opened, this value will be lost when the LUN is opened. The value saved or set at a higher scope with the scsimgr command will be restored.

  • If the value of the escsi_maxphys global attribute is changed, the new value is used for the computation of the actual maximum I/O size of a given LUN only when one or more of these situations occurs:

    • The LUN is opened the first time.

    • A new lunpath is registered for the LUN.

    • An existing lunpath for the LUN is deleted.

    The actual maximum I/O size for a LUN is determined by whichever is the smallest of these two values:

    • the escsi_maxphys attribute or

    • the maximum I/O sizes reported by interface drivers on lunpaths of the LUN.

RETURN VALUE

scsimgr exits with one of the following values:

0

Operation successful.

>0

Error condition occurred.

When an error condition occurs, scsimgr will display an error message specifying the nature and/or the cause of the error conditions.

However, for operations supporting scriptable output (when the -p option is used), no errors will be printed if the error condition only affects one or more of the output fields. scsimgr will leave the affected field(s) empty and exit with a non-zero value.

In the following example, the max_io attribute is not a valid LUN attribute. In the displayed output, scsimgr leaves the second field corresponding to max_io empty and exits with EFAULT(14).

  • # scsimgr -p get_attr -D /dev/rdisk/disk20 -a wwid -a max_io -a max_q_depth 0x20000020371972eb::16

EXAMPLES

To display scsimgr general usage:

scsimgr -h

To display scsimgr usage for get_attr command:

scsimgr -h get_attr

To figure out the SCSI object on which to invoke the command (note that /dev/rdisk/disk961 is the character device special file (DSF) in this example):

  • ioscan -kfnN

    Class I H/W Path Driver S/W State H/W Type Desc ======================================================================= disk 961 64000/0xfa00/0xf9 esdisk CLAIMED DEVICE HP HSV101 /dev/disk/disk961 /dev/rdisk/disk961

To get basic global statistics:

scsimgr get_stat

To get all global statistics:

scsimgr -v get_stat

To display global statistics for driver esdisk:

scsimgr -v get_stat -d esdisk

To get basic statistics for disk0:

scsimgr get_stat -D /dev/rdisk/disk0

To get basic statistics for all LUN paths of disk0:

scsimgr get_stat -D /dev/rdisk/disk0 all_lpt

To get all statistics for the SCSI controller with class fc and instance number 1:

scsimgr -v get_stat -C fc -I 1

To get all the statistics for target path with the hardware path of 0/4/1/0.0x60060b000014f45a0001000000000011:

scsimgr -v get_stat -H 0/4/1/0.0x60060b000014f45a0001000000000011

To get driver esdisk specific statistics for disk0:

scsimgr get_stat -D /dev/rdisk/disk0 -d esdisk

To clear global statistics:

scsimgr clear_stat

To clear statistic for the SCSI controller with class fc and instance number 1:

scsimgr clear_stat -C fc -I 1

To clear statistic for all target paths of the SCSI controller with class fc and instance number 1:

scsimgr clear_stat -C fc -I 1 all_tp

To get basic global status and information:

scsimgr get_info

To get global status information for driver esdisk:

scsimgr -v get_info -d esdisk

To get all status information of all the LUNs:

scsimgr -v get_info all_lun

To get basic status information for disk0:

scsimgr get_info -D /dev/rdisk/disk0

To get basic status information for all LUN paths of disk0:

scsimgr get_info -D /dev/rdisk/disk0 all_lpt

To get all status information for the SCSI controller with class escsi_ctlr and instance number 1:

scsimgr -v get_info -C escsi_ctlr -I 1

To get all status information for target path with the hardware path of 0/4/1/0.0x60060b000014f45a0001000000000011:

scsimgr -v get_info -H 0/4/1/0.0x60060b000014f45a0001000000000011

To display LUN path information for all LUNs:

scsimgr lun_map

To display LUN path information for disk0:

scsimgr lun_map -D /dev/rdisk/disk0

To display LUN path information for disk0 in a form that can be parsed:

scsimgr -p lun_map -D /dev/rdisk/disk0

To display extended information on generic global attributes:

scsimgr -v get_attr

To display driver esdisk global attributes:

scsimgr -v get_attr -d esdisk

To display information on attribute for disk0:

scsimgr get_attr -D /dev/rdisk/disk0

To display current values only of attributes for LUN whose class is disk and instance 0:

scsimgr get_attr -D /dev/rdisk/disk0 current

To display default values only of settable attributes for a SCSI HBA controller with DSF /dev/fcd3:

scsimgr get_attr -D /dev/fcd3 default settable

To display saved values only of settable attributes for all LUNs:

scsimgr get_attr all_lun saved settable

To display default attribute values for devices bound to driver esdisk

scsimgr get_attr -N /escsi/esdisk

To display default attributes values for all disk devices from HP bound to driver esdisk

scsimgr get_attr -N '/escsi/esdisk/0x0/HP '

To display current values only of specific attributes for all target paths of a SCSI HBA controller:

scsimgr get_attr -D /dev/fcd0 all_tp current -a port_name -a node_name

To display information on disk driver specific attributes for disk0:

scsimgr get_attr -d esdisk -D /dev/rdisk/disk0

To set current values of attributes leg_mpath_enable and max_q_depth for disk0:

scsimgr set_attr -D /dev/rdisk/disk0 -a leg_mapth_enable=false \ -a max_q_depth=10

To save value of attribute leg_mpath_enable for disk0:

scsimgr save_attr -D /dev/rdisk/disk0 -a leg_mapth_enable=false

To save default value of attribute leg_mpath_enable for disk0:

scsimgr save_attr -D /dev/rdisk/disk0 -a leg_mapth_enable=default

To save default value of all settable attributes for disk0:

scsimgr save_attr -C disk -I 0 default

To save default values for specific global attributes:

scsimgr save_attr default -a max_q_depth -a escsi_dbg_lvl

To add a settable attribute scope corresponding to all disk devices from HP with product identifier "ST39103FC" bound to driver esdisk Default values for attributes can be changed for these devices.

scsimgr ddr_add -N '/escsi/esdisk/0x0/HP /ST39103FC'

To delete a settable attribute scope for disk devices from HP with product identifier "ST39103FC" bound to driver esdisk It will no longer be possible to modify default attributes values for these devices only.

scsimgr ddr_del -N '/escsi/esdisk/0x0/HP /ST39103FC'

To list settable attribute scopes registered for all drivers.

scsimgr ddr_list

To validate replacement of disk0 and re-assign its DSF to the replacing LUN:

scsimgr replace_wwid -D /dev/rdisk/disk0 dsf

To unbind all LUN paths that were associated with disk0:

scsimgr replace_wwid -D /dev/rdisk/disk0

To validate change of LUN associated with LUN path with class lunpath and instance number 2:

scsimgr replace_wwid -C lunpath -I 2

To validate change of LUN to which legacy DSF /dev/rdsk/c0t5d0 is bound to:

scsimgr replace_leg_dsf -D /dev/rdsk/c0t5d0

To force reset of LUN disk0:

scsimgr -f lun_reset -D dev/rdisk/disk0

To cause a warm target reset of device corresponding to disk0:

scsimgr warm_bdr -D dev/rdisk/disk0

To cause a cold target reset of device corresponding to disk0:

scsimgr warm_bdr -D dev/rdisk/disk0

To disable LUN path with the hardware path 0/4/1/0.0x60060b000014f45a.0x4001000000000000:

scsimgr disable -H 0/4/1/0.0x60060b000014f45a.0x4001000000000000

To enable disk0:

scsimgr enable -D /dev/rdisk/disk0

To set user friendly device identifier for LUN of class disk and instance 7:

scsimgr set_devid -C disk -I 7 "Disk with Credit Card information"

To get user friendly device identifier for LUN of class disk and instance 7:

scsimgr get_devid -C disk -I 7

To sync write data cache on LUN with DSF /dev/rdisk/disk47:

scsimgr sync_cache -D /dev/rdisk/disk47

To forcefully pre-erase the medium of the magneto-optical device with hardware path 64000/0xfa00/0x6:

scsimgr erase -H 64000/0xfa00/0x6

To display standard inquiry data for LUN with DSF /dev/rdisk/disk47:

scsimgr inquiry -D /dev/rdisk/disk47

To display vital product data of page 83 of LUN disk23:

scsimgr inquiry -C disk -I 23 0x83 scsimgr inquiry -C disk -I 23 wwid

AUTHOR

scsimgr was developed by Hewlett Packard Company.

SEE ALSO

diskinfo(1M), fcmsutil(1M), scsictl(1M), autochanger(7), intro(7), scsi(7), scsi_ctl(7), scsi_disk(7), scsi_tape(7), scsimgr_eschgr(7), scsimgr_esdisk(7), scsimgr_estape(7).

Note: The manpage of a driver plug-in for scsimgr is scsimgr_<driver_name>(7), where <driver_name> is the name of the driver. For example, see scsimgr_esdisk(7).

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