Monday, July 18, 2016

Replacing failed root disk in VXVM

First, we must remove the disk for replacement:

# vxdg -g rootdg -k rmdisk rootdisk

This will save all associated objects in the diskgroup and place the disk into a "removed:was" state.

At this point you will want to do the physical replacement of the disk.
1.  Swap out old drive for new drive
2.  Get the new drive visible to format and label

NOTE:  Your replacement drive must be of equal size or larger than the one you are replacing.

Once labeled ensure VxVM can see the new disk:
# vxdisk scandisks

The drive should appear as:  "online invalid"

Once in this state, setup the disk for VxVM usage:
# /etc/vx/bin/vxdisksetup -i Disk_0 format=sliced   (whatever the disk name is in disk list)

Once set up and seen in the disk list as "online"

We can put the new disk back into the configuration:
# vxdg -g rootdg -k adddisk rootdisk=Disk_0

Then recover all the objects:  (force a sync)
# vxrecover -g rootdg rootdisk&

You can monitor the above sync with:
# vxtask -l list


At this stage, the best thing is to have a reboot done and then we will carry out to add the rootdisk
to the rootdg.

No comments:

Post a Comment