RAID阵列中丢失分区的修复
Hey there, let's break down how to recover your ESXi instance from this RAID 1 issue after replacing the Dell PERC H710 Mini's backplane. First off, since you mentioned no physical damage and no disk initialization, there's a good chance your data is still intact—we just need to get the controller and system to recognize it again.
Here's a step-by-step approach to diagnose and fix this:
1. Verify RAID Controller & Disk Status First
Start with the basics by checking what the PERC controller sees:
- Reboot your server and hit
Ctrl+Rwhen prompted to enter the PERC H710 Mini's BIOS configuration utility. - Check the Virtual Disk status: Is it marked as "Optimal" or "Degraded"? If it's degraded, make sure both SSDs are listed under Physical Disks with a "Good" status. Sometimes replacing the backplane can cause the controller to re-detect disks, so you might need to re-add them to the virtual disk if they're showing as "Unconfigured Good".
- Also, check the controller logs here for any errors related to the backplane swap or disk detection—this can clue you into why the virtual disk vanished temporarily.
2. Scan for VMFS Volumes in ESXi
If you can boot into ESXi (even if the datastore is missing), use the ESXi Shell to dig deeper:
- List all storage devices with:
esxcli storage core device list - For each recognized disk (look for ones matching your SSD size), check its partition table with:
partedUtil getptbl /vmfs/devices/disks/<device-id>- If you see a VMFS partition listed (usually type
0xfb), try mounting it manually with:esxcli storage core filesystem mount -l <volume-name>(replace<volume-name>with your datastore's label if you remember it)
- If you see a VMFS partition listed (usually type
- If the partition table is empty, don't panic—this doesn't mean the data is gone, just that the partition entry was lost.
3. Rescan Storage & Refresh ESXi's View
Sometimes ESXi just needs a nudge to recognize the existing datastore:
- In the vSphere Client (or ESXi Host Client), go to Storage > Datastores and click Rescan Storage.
- From the shell, you can also rescan the adapter with:
esxcli storage core adapter rescan --adapter vmhbaX(replacevmhbaXwith your PERC controller's adapter ID, which you can get fromesxcli storage core adapter list)
4. Use Data Recovery Tools (If Above Steps Fail)
If the partition table is truly missing, you'll need to use a data recovery tool to scan the disks for the VMFS volume. Since ESXi doesn't have built-in tools for this, here's how to proceed:
- Boot your server from a Linux live CD (like Ubuntu Server) that supports RAID and VMFS.
- Critical: Do NOT write anything to the SSDs. First, create a full disk image of one of the SSDs to an external storage device (this protects your original data if something goes wrong):
dd if=/dev/sda of=/mnt/external-drive/ssd-backup.img bs=4M status=progress - Use a tool like TestDisk to scan the disk image (or the original disk, if you're confident) for lost partitions. TestDisk can detect and restore VMFS partition tables, which should let you access your ESXi VMs again.
5. Double-Check Controller Settings
If all else fails, verify the PERC controller's settings:
- Make sure the controller is set to RAID Mode (not HBA mode, unless you intentionally changed it before).
- Check if any "foreign configuration" is detected—sometimes the controller will flag a previous RAID setup as foreign after hardware changes, and you'll need to import it in the PERC utility.
Remember: The key here is to avoid writing to the disks until you've confirmed the data is recoverable. RAID 1 mirrors your data across both disks, so even if one disk's partition table is wonky, the other should have an identical copy.
备注:内容来源于stack exchange,提问作者James Conway

