This section describes how on using Volume Manager to configuring your system to replace a disk drive while the power is on and the operating system is running.
These procedures should be performed only by a qualified system administrator. Performing hot-plug operations on an active disk drive can result in data loss and/or data corruption.
Terminate all user- and application-level processes on all volumes, plexes, and/or subdisks that are located on the drive to be removed before performing this procedure.
Identify the faulty disk drive.
Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the /usr/adm/messages file(s). See the documentation that came with your application for more information.
Back up your system.
Refer to the documentation that came with your system for backup details.
Identify the disk media name for the disk you intend to replace.
# vxdisk list | grep cwtxdysz
For example, if the disk to be removed is c2t1d0, enter:
# vxdisk list | grep c0t1d0 c2t1d0s2 sliced disk01 rootdg online
The disk media name is the third field in the output above: disk01.
You can use the vxdiskadm utility to prepare the disk for replacement.
Type vxdiskadm in a shell.
This operation is interactive and requires user confirmation of the operation.
Select the "Remove a disk for replacement" option.
When prompted for a disk name to replace, type the disk media name from Step 4.
vxdiskadm marks the disk for replacement and saves the subdisk information to be rebuilt on the replacement disk.
Redundant data is automatically recovered after the replacement disk has been reattached to Volume Manager. Nonredundant data is identified as unusable and must be re-created from backups.
Refer to the vxdiskadm(1M) man page for further details.
Quit the vxdiskadm utility.
Use the luxadm remove_device command to remove the disk.
The luxadm remove_device command is interactive. You will be guided through the procedure for removing a device or chain of devices.
# luxadm remove_device macs1,f1 WARNING!!! Please ensure that no filesystems are mounted on these device(s). All data on these devices should have been backed up. The list of devices which will be removed is: 1: Box Name "macs3" rear slot 1 Please enter 'q' to Quit OR <Return> to Continue: stopping: Drive in "macs1" front slot 1....Done offlining: Drive in "macs1" front slot 1....Done Hit <Return> after removing the device(s).
Remove the disk drive and then hit any key.
The yellow LED on the designated disk drive(s) should be flashing.
The following is displayed:
Drive in Box Name "macs1" front slot 1 Removing Logical Nodes: Removing c2t18d0s0 Removing c2t18d0s1 Removing c2t18d0s2 Removing c2t18d0s3 Removing c2t18d0s4 Removing c2t18d0s5 Removing c2t18d0s6 Removing c2t18d0s7 #
Use the luxadm insert_device command to add the new device.
This command is interactive. You will be guided through the procedure for inserting a new device or chain of devices.
# luxadm insert_device macs1,f1 The list of devices which will be inserted is: 1: Box Name "macs1" front slot 1 Please enter 'q' to Quit or <Return> to Continue: Hit <Return> after inserting the device(s).
Insert the disk drive and then hit Return.
The following is displayed:
Drive in Box Name "macs1" front slot 1 Logical Nodes under /dev/dsk and /dev/rdsk : c2t1d0s0 c2t1d0s1 c2t1d0s2 c2t1d0s3 c2t1d0s4 c2t1d0s5 c2t1d0s6 c2t1d0s7 #
The new disk drive is now available for use as a block or character device. Refer to the sd(7) man page for further details.
To re-create the replaced disk on the new drive:
Configure the Volume Manager to recognize the disk drive.
# vxdctl enable
Use the vxdiskadm utility to replace the failed disk.
Select the "Replace a failed or removed disk" option.
vxdiskadm supplies a list of available disks to be used as replacements.
Select the replacement drive.
vxdiskadm automatically configures the replacement drive to match the failed drive.
Redundant data is recovered automatically. Space for nonredundant data is created and identified. Nonredundant data must be recovered from backing store.
See the vxdiskadm man page for further details.