b.
If
fuser
reports process IDs using the logical volume, use the
ps
command to map the
list of process IDs to processes, and then determine whether you can halt those processes.
For example, look up processes 27815 and 27184 as follows:
# ps -fp27815 -p27184
UID PID PPID C STIME TTY TIME COMMAND
root 27815 27184 0 09:04:05 pts/0 0:00 vi test.c
root 27184 27182 0 08:26:24 pts/0 0:00 -sh
c.
If so, use
fuser
with the
–k
option to kill all processes accessing the logical volume.
The example processes are noncritical, so kill them as follows:
# fuser -ku dev/vg01/lvol1
/dev/vg01/lvol1: 27815c(root) 27184c(root)
d.
If the logical volume is being used as a file system, unmount it as follows:
# umount /dev/vg01/lvol1
NOTE:
If you cannot stop the applications using the logical volume, or you cannot unmount
the file system, you must shut down the system.
After disabling user access to the unmirrored logical volumes, disable LVM access to the disk:
# pvchange -a N /dev/disk/disk14
3.
Replace the disk.
For the hardware details on how to replace the disk, see the hardware administrator’s guide
for the system or disk array.
If the disk is hot-swappable, replace it.
If the disk is not hot-swappable, shut down the system, turn off the power, and replace the
disk. Reboot the system.
4.
Notify the mass storage subsystem that the disk has been replaced.
If the system was not rebooted to replace the failed disk, then run
scsimgr
before using the
new disk as a replacement for the old disk. For example:
# scsimgr replace_wwid –D /dev/rdisk/disk14
This command allows the storage subsystem to replace the old disk’s LUN World-Wide-Identifier
(WWID) with the new disk’s LUN WWID. The storage subsystem creates a new LUN instance
and new device special files for the replacement disk.
5.
Determine the new LUN instance number for the replacement disk.
For example:
# ioscan –m lun
Class I Lun H/W Path Driver S/W State H/W Type Health Description
========================================================================
disk 14 64000/0xfa00/0x0 esdisk NO_HW DEVICE offline HP MSA Vol
/dev/disk/disk14 /dev/rdisk/disk14
...
disk 28 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol
0/1/1/1.0x3.0x0
/dev/disk/disk28 /dev/rdisk/disk28
In this example, LUN instance 28 was created for the new disk, with LUN hardware path
64000/0xfa00/0x1c, device special files
/dev/disk/disk28
and
/dev/rdisk/disk28
,
at the same lunpath hardware path as the old disk, 0/1/1/1.0x3.0x0. The old LUN instance
14 for the old disk now has no lunpath associated with it.
132
Troubleshooting LVM