HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)

6. Assign the old instance number to the replacement disk.
For example:
# io_redirect_dsf -d /dev/disk/disk14 -n /dev/disk/disk28
This assigns the old LUN instance number (14) to the replacement disk. In addition, the device
special files for the new disk are renamed to be consistent with the old LUN instance number.
The following ioscan m lun output shows the result:
# ioscan m lun /dev/disk/disk14
Class I Lun H/W Path Driver S/W State H/W Type Health Description
========================================================================
disk 14 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol
0/1/1/1.0x3.0x0
/dev/disk/disk14 /dev/rdisk/disk14
The LUN representation of the old disk with LUN hardware path 64000/0xfa00/0x0 was
removed. The LUN representation of the new disk with LUN hardware path
64000/0xfa00/0x1c was reassigned from LUN instance 28 to LUN instance 14 and its
device special files were renamed as /dev/disk/disk14 and /dev/rdisk/disk14.
7. Restore LVM configuration information to the new disk.
For example:
# vgcfgrestore -n /dev/vgnn /dev/rdisk/disk14
8. Restore LVM access to the disk.
If you did not reboot the system in Step 2, “Halt LVM access to the disk,” reattach the disk as
follows:
# pvchange a y /dev/disk/disk14
If you did reboot the system, reattach the disk by reactivating the volume group as follows:
# vgchange -a y /dev/vgnn
NOTE: The vgchange command with the -a y option can be run on a volume group that
is deactivated or already activated. It attaches all paths for all disks in the volume group and
resumes automatically recovering any disks in the volume group that had been offline or any
disks in the volume group that were replaced.
Therefore, run vgchange only after all work has been completed on all disks and paths in
the volume group, and it is necessary to attach them all.
9. Recover any lost data.
LVM recovers all the mirrored logical volumes on the disk, and starts that recovery when the
volume group is activated.
For all the unmirrored logical volumes that you identified in Step 2, “Halt LVM access to the
disk,” restore the data from backup and reenable user access as follows:
For raw volumes, restore the full raw volume using the utility that was used to create your
backup. Then restart the application.
For file systems, you must re-create the file systems first. For example:
# newfs -F fstype /dev/vgnn/rlvolnn
Use the logical volume's character device file for the newfs command. For file systems
that had nondefault configurations, see newfs(1M) for the correct options.
After creating the file system, mount it under the mount point that it previously occupied.
Then restore the data for that file system from your full backups.
TIP: To make the file system restoration step easier, record how they were originally
created. You can change other file system parameters, such as those used to tune file
system performance. The file system must be at least as large as before the disk failure.
4.7 Disk Troubleshooting and Recovery Procedures 141