The Linux SCSI layer sets a timer on each command. When this timer expires, the SCSI layer will quiesce the host bus adapter (HBA) and wait for all outstanding commands to either time out or complete. Afterwards, the SCSI layer will activate the driver's error handler.
When the error handler is triggered, it attempts the following operations in order (until one successfully executes):
- Abort the command.
- Reset the device.
- Reset the bus.
- Reset the host.
If all of these operations fail, the device will be set to the
offline
state. When this occurs, all IO to that device will be failed, until the problem is corrected and the user sets the device to running
.The process is different, however, if a device uses the fibre channel protocol and the
rport
is blocked. In such cases, the drivers wait for several seconds for the rport
to become online again before activating the error handler. This prevents devices from becoming offline due to temporary transport problems.To display the state of a device, use:
cat /sys/block/device-name
/device/state
To set a device to
running
state, use:echo running > /sys/block/device-name
/device/state
To control the command timer, you can write to
/sys/block/device-name
/device/timeout
. To do so, run:echo value
/sys/block/device-name
/device/timeout
Here,
value
is the timeout value (in seconds) you want to implement.Alternatively, you can also modify the timeout
udev
rule. To do so, open /etc/udev/rules.d/50-udev.rules
. You should find the following lines:ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ RUN+="/bin/sh -c 'echo 60 > /sys$$DEVPATH/timeout'"
echo 60
refers to the timeout length, in seconds; in this case, timeout is set at 60 seconds. Replace this value with your desired timeout length.Note that the default timeout for normal file system commands is 60 seconds when
udev
is being used. If udev
is not in use, the default timeout is 30 seconds.'Linux' 카테고리의 다른 글
yum 소프트웨어 리포지토리 활성화 (0) | 2015.08.11 |
---|---|
yum을 사용하여 소프트웨어 업데이트 관리 (0) | 2015.08.10 |
Language Configuration (0) | 2015.07.20 |
Creating persistent mounts with file system labels (0) | 2015.07.07 |
Quiz: Configure local storage (0) | 2015.07.03 |
scsi_id examples on RHEL6 (0) | 2015.07.02 |
Configuring Device Mapper Multipath (DMMP) tool for hosts running the Linux operating system (0) | 2015.07.02 |
Settings for Linux hosts on V3700 storage (0) | 2015.07.02 |
Red Hat Enterprise Linux 6 DM Multipath (0) | 2015.07.02 |
Virtual Machines (0) | 2015.06.29 |