HP-UX HB v13.00 Ch-13 - LVM
HP-UX Handbook – Rev 13.00 Page 58 (of 110)
Chapter 13 LVM
October 29, 2013
Attached vs. Unattached
A physical volume is considered to be attached, if the pvdisplay command is able to
report a valid status (unavailable/available) for it. Otherwise it’s called unattached.
It is not allowed to replace an attached disk without having the mirrors reduced before.
The reason is that there are potentially serious problems with replacing an attached
device. Although the pvdisplay indicates the device is unavailable, LVM could still be
trying to recover it. There is a possibility that a device that pvdisplay shows to be
unavailable one moment could immediately appear to be available again just as the new
device is being initialized in-place with vgcfgrestore. The consequences can be data
corruption or obscure problems that can be difficult to track down, due to the LVM
metadata on the device being improperly written.
A seemingly plausable but also unsupported solution to this problem is to initialize
(vgcfgrestore) the replacement disk in a different location (e.g. an unused slot in the
storage system). Then replace the unavailable disk with the new one. This will work
safely as long as LVM recognizes that the device is unavailable before the disk is
replaced.
New LVM OLR (Online Replacement) feature
There is a new functionality that allows the online replacement of attached disks by
adding the new –a option to the pvchange command:
# pvchange –a n /dev/dsk/c#t#d# Detach this path of the PV
# pvchange –a N /dev/dsk/c#t#d# Detach ALL paths of a PV
# pvchange –a y /dev/dsk/c#t#d# Attach this path of the PV
This eases the replacement procedure for attached PVs since there is no need to
reduce the mirror anymore.
You need the following patches (or later) to enable the feature:
UX 11.11 PHKL_31216 & PHCO_30698
UX 11.23 PHKL_32095 & PHCO_32622 (depends on Sep 04 base patch
PHKL_31500)
Refer to the pvchange(1M) manpage regarding the new -a option.