To hot plug and unplug of HDDs, you must perform the following steps.
- Open MegaCLI.
- Check the initial configuration of your adapter.
./MegaCli -CfgDsply a<adapter number> - Take the HDD disk offline.
./MegaCli -PDOffline -PhysDrv[<enclosureID:Slot number>] -a<adapter number> - Check the adapter configuration.
./MegaCli -CfgDsply -a<adapter number>
Once the disk goes offline, the disk status changes to Permanent Device Loss (PDL) state and the components are marked as Absent. The virtual drive is no longer available. - Plug in a new disk. The virtual drive is still not detected.
- Check the state of the new disk.
./MegaCli -PDInfo -PhysDrv[<enclosureID:Slot number>] -a<adapter number> - Create a new virtual drive.
./MegaCli -CfgLDAdd -R[<enclosureID:Slot number>] [WB] [RA] [Direct] [NoCachedBadBBU] [-strpsz<userconfigured>] -a<adapter number> - Verify that the adapter detects the new virtual drive.
./MegaCli -CfgDsply -a<adapter number>
The diskgroup can detect the new disk. However, vSAN still cannot detect the disk and the components remain in Absent state. - Log in to vCenter Server using the vSphere Web Client
- Add the newly created virtual drive to the disk group and remove the old virtual drive from the disk group.
Effect on vSAN after adding the new drive to a disk group
vSAN detects the drive and adds it to the diskgroup, including the components that are created on the new disk group.
Effect on vSAN after planned disk removal or when the disk is offlinevSAN marks the disks as in Permanent Device Loss state and the corresponding components are in Absent state.
Effect on vSAN after plugging the new drive in the same slotThe ESXi detects the new disk. vSAN does not detect the disk and the components remain in Absent state.
Effect on vSAN after creation of a new virtual drive
vSAN detects the virtual drive. The corresponding VM components still remain in absent state. You should add the new virtual drive to the diskgroup and remove the virtual drive from the diskgroup, which is offline and in Permanent Device Lost state. However, if vSAN is enabled for automatic mode, you might notice two diskgroups, one with a healthy SSD and a missing HDD and the other with a missing SSD and a healthy HDD. To delete the missing HDD disk, perform the following procedure.
- Switch the vSAN cluster to manual mode.
- Remove the diskgroup that includes a missing SSD disk and a healthy HDD disk. as available. This makes the HDD available for use. You can verify the command on your ESXi host.
vdq -q
- Add the HDD disk to the diskgroup that has a healthy SSD but a missing HDD.
Note that the task might show as failure. - Refresh the vSphere web client to verify if the disk is added to the diskgroup.
- Delete the missing HDD from the diskgroup.
- Put the vSAN cluster back to the automatic mode.
Additional Information
For translated versions of this article, see: