You can use MegaCLI to hot unplug and plug of SSD and HDD disks on LSI 9271-8i controller.
Unplanned hot unplug and plug in of SSD or HDD disksPerform the following steps to hot unplug and plug of SSD or HDD Disks.
- Open MegaCLI.
- Verify the configuration of your adapter.
./MegaCli -CfgDsply a<adapter number> - Unplug the disk.
After you hot unplug the disk, vSAN marks the disk as in Permanent Device Loss (PDL) state. The corresponding components are marked as Absent. - Plug the disk back into the same slot.
- Verify the configuration of the adapter.
./MegaCli -CfgDsply a<adapter number>
After you hot plugin, the components still remain in Absent state because the disk is not yet detected by vSAN. - Verify the status of the disk.
./MegaCli -PDInfo -PhysDrv[<enclosureID:Slot number>] -a<adapter number>
The disk is in Unconfigured state. - To recover the disk from its current state, you must change the disk status to Unconfigured-Good.
/opt/lsi/MegaCLI # ./MegaCli -PDMakeGood -PhysDrv[<enclosureID:Slot number>] -a<adapter number>
The status of the disk changed to Unconfigured-Good. - Scan the controller to list the foreign configuration.
/opt/lsi/MegaCLI # ./MegaCli -CfgForeign -Scan -a<adapter number> - Import the foreign configuration.
/opt/lsi/MegaCLI # ./MegaCli -CfgForeign -Import -a<adapter number> - Verify the disk details.
./MegaCli -CfgDsply a<adapter number>
After importing the foreign configuration, the adapter detects the lost virtual drive. The availability of virtual drive information in the adapter causes the driver to declare the driver details to the ESXi host as available for use. vSAN detects the disk and successfully claims it. As a result, the components become active again.
Planned hot unplug and plug in of SSD or HDD disksPerform the following steps to hot unplug and plug of SSD or HDD Disks.
- Open MegaCLI.
- Verify the configuration of your adapter.
./MegaCli -CfgDsply a<adapter number> - Take the disk offline.
./MegaCli -PDOffline -PhysDrv[<enclosureID:Slot number>] -a<adapter number> - Verify the configuration of the adapter.
./MegaCli -CfgDsply a<adapter number> - Plug in a new disk.
- Mark the disk as missing.
/MegaCli -PDMarkMissing -PhysDrv[<enclosureID:Slot number>] -a<adapter number> - Prepare the disk for removal from the slot.
/MegaCli -PDPrpRmv -PhysDrv[<enclosureID:Slot number>] -a<adapter number> - Plug in the disk in the same slot.
- Verify the configuration of the adapter after inserting a new disk in the same slot.
./MegaCli -CfgDsply a<adapter number>
vSAN is unable to detect the disk and marks the disk in PDL state and the corresponding components are in ABSENT state. - Create a new virtual drive using a new disk.
- Check the state of the new disk. The required state of the disk must be Unconfigured-good.
./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>
./MegaCli -GetPreservedCacheList -a<adapter number>
./MegaCli -DiscardPreservedCache -L4 -a<adapter number>
./MegaCli -CfgLDAdd -R[<enclosureID:Slot number>] [WB] [RA] [Direct] [NoCachedBadBBU] [-strpsz<userconfigured>] -a<adapter number> - Verify if the adapter can detect the new virtual drive.
./MegaCli -CfgDsply a<adapter number> - (Optional) Rename the new virtual driver, if required.
./MegaCli -LDSetProp -Name VSANSSD-<Slot number> -L3 -a<adapter number>
Effect on vSAN after creating a new virtual driveYour ESXi host can now detect the new virtual drive and creates a corresponding SCSI device. vSAN cannot detect the disk and the corresponding components remain in an Absent state.
Mark the SCSI device as SSDPerform the following steps to enable the SCSi device detected by your ESXi host.
- Add a claim rule by specifying the device name.
esxcli storage nmp satp rule add -s SATP --device device_name --option="enable_ssd" - Delete a claim rule from the set of claim rules.
esxcli storage core claiming unclaim --type device --device device_name - Replace the current rules in the VMkernel with the modified rules from the configuration file.
esxcli storage core claimrule load - Run the path claiming rules.
esxcli storage core claimrule run
vSAN can now detect the SSD disk.
Create a new disk groupPerform the following steps to create a new disk group.
- Navigate to the vSphere web client.
- If vSAN is enabled for automatic mode, then change it to manual mode.
- Delete the disk group that includes a missing SSD drive.
- Create a new disk group using the newly added SSD and the HDD disks.
- Switch the vSAN cluster back to the automatic mode.
vSAN detects the new disk drive and the components that are created on the new disk group.
Additional Information