SG_RESET - Online Linux Manual PageSection : 8
Updated : July 2009
Source : sg3_utils−1.28
Note : SG3_UTILS
NAMEsg_reset − sends SCSI device, target, bus or host reset; or checks reset state
SYNOPSISsg_reset [−b] [−d] [−h] [−t] [−V] DEVICE
DESCRIPTION The sg_reset utility with no options (just a DEVICE) reports on the reset state (e.g. if a reset is underway) of DEVICE. When given a −d, −t, −b or −h option it requests a device, target, bus or host reset respectively. The ability to reset a SCSI target (often called a "hard reset" at the transport level) was added in linux kernel 2.6.27 . Low level drivers that support target reset hopefully reset a logical unit only when given the device reset (i.e. −d) option. This should removed the ambiguity of whether "device" meant LU or target that we have had in the past. In the linux kernel 2.6 series this utility can be called on sd, sr (cd/dvd), st or sg device nodes; if the user has appropriate permissions. In the linux kernel 2.4 series support for this utility first appeared in lk 2.4.19 and could only be called on sg device nodes. Various vendors made this capability available in their kernels prior to lk 2.4.19.
OPTIONS−b attempt a SCSI bus reset. This would normally be tried if the device reset (i.e. option −d) was not successful. −d attempt a SCSI device reset. If the device seems stuck, this is the first reset that should be tried. This assumes the linux scsi mid level error handler is not already in the process of resetting DEVICE. −h attempt a host adapter reset. This would normally be tried if both device reset (i.e. option −d) and bus reset (i.e. option −b) were not successful. −t attempt a SCSI target reset. This assumes the linux scsi mid level error handler is not already in the process of resetting the target that contains the given DEVICE. −V prints the version string then exits.
NOTESThe error recovery code within the linux kernel when faced with a SCSI command timing out and no response from the device (LU), first tries a device reset and if that is not successful tries a target reset. If that is not successful it tries a bus reset. If that is not successful it tries a host reset. Users of this utility should check whether such a recovery is already underway before trying to reset with this utility. The "device,target,bus,host" order is also recommended (i.e. first start with the smallest hammer). The above is a generalization and exact details will vary depending on the transport and the low level driver concerned. SAM−4 defines a hard reset, a logical unit reset and a I_T nexus reset. A hard reset is defined to be a power on condition, a microcode change or a transport reset event. A LU reset and an I_T nexus reset can be requested via task management function (and support for LU reset is mandatory). In Linux the SCSI subsystem leaves it up to the low level drivers as to whether a "device reset" is only for the addressed LU or all the LUs in the device that contains the addressed LU (i.e. a target reset). The additional of the target reset (i.e. option −t) should give more control in this area. The "bus reset" is a transport reset and may be a dummy operation, depending on the transport. A "host reset" attempts to re−initialize the HBA that the request passes through en route to the DEVICE. Note that a "host reset" and a "bus reset" may cause collateral damage. This utility does not allow individual SCSI commands (or tasks as they are called in SAM−4) to be aborted. SAM−4 defines ABORT TASK and ABORT TASK SET task management functions for that. Prior to SAM−3 there was a TARGET RESET task management function. Several transports still support that function and many associated linux low level drivers map the −t option to it.
AUTHORSWritten by Douglas Gilbert.
COPYRIGHTCopyright © 1999−2009 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 0
Johanes Gumabo
Data Size : 11,145 byte
man-sg_reset.8Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 189,017
Visitor ID : :
Visitor IP : 3.147.103.33 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.