Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing Disks
Chapter 6600
cable — which can manifest itself as a missing disk. In these cases, LVM
will log an error message to the console, but it will not return an error to
the application accessing the logical volume.
If you have a current copy of the data on a separate, functioning mirror,
then LVM directs the I/O to a mirror copy, much as it would for a
non-recoverable error. Applications accessing the logical volume will not
see any error. (To preserve data synchronization between its mirrors,
LVM will retry recoverable write requests to a problematic disk, even if
there’s a current copy elsewhere; however, this is managed by a daemon
internal to LVM, and has no impact on user access to the logical volume.)
If, however, the device in question holds the only copy of the data, LVM
will retry the I/O request until it succeeds — that is, until the device
responds or the system is rebooted. Any application performing I/O to
the logical volume may block, waiting for the device to recover. In this
case, your application or file system may appear to be “hung,” and may be
unresponsive.
Dealing with
Recoverable
Errors
By default, LVM will retry I/O requests with recoverable errors until
they succeed or the system is rebooted. Therefore, if an application or file
system hangs, your troubleshooting should include checking the console
log for problems with your disk drives, and taking action to restore the
failing devices to service.
If for some reason retrying the I/O request will never succeed — such as
if the disk was physically removed and taken away — your application or
file system may block indefinitely. If your application is not responding,
you may have to reboot your system.
As an alternative to rebooting, you can control how long LVM will retry a
recoverable error before treating it as non-recoverable, by setting a
timeout on the logical volume.
Logical Volume
Timeouts
The -t option to the lvchange command sets the timeout value in
seconds for a logical volume. For example, to set the timeout for
/dev/vg01/lvol1 to one minute, enter:
lvchange -t 60 /dev/vg01/lvol1
This command sets the maximum length of time that LVM will retry an
I/O request. If the device fails to respond within that time, LVM will
return an I/O error to the caller. The timeout value is normally zero,
which is interpreted as an infinite timeout; thus, by default no I/O
request will return to the caller until it completes successfully.