Recovering a Deleted VMFS Partition
In this document we will see how to recover the contents of a deleted VMFS partition, In this document we will simulate that an 'administrator’ has deleted a VMFS volume from the disk manager in Windows because it had the LUN presented to the vCenter server where they perform backups using VCB, I had it presented in writing mode and not only with reading, so it can be a good example 🙂
This would be the initial scenario, We had a LUN presented with an HP Lefthand storage array that has been deleted and therefore the content we had on it was erased, Although we haven't made any more changes to the partition, we can recover the content. In addition, we don't have any backup to be able to recover 😉
The first thing will be to know the storage devices we have by running 'esxcfg-scsidevs -l', We will note the information of the 'Console Device'’ which will be the one we use to check the status of the partition, In this example, we will subsequently run: 'fdisk -lu /vmfs/devices/disks/naa.6000eb359cd89a2e000000000000001c'’ y 'fdisk -lu /vmfs/devices/disks/t10.ATA_____ST380011A_______________________________5JVWGFAP____________'’ to check a healthy VMFS partition against one that is either no longer VMFS or would be damaged. Once the disk that indeed lacks the volume is located, we format it with 'fdisk /vmfs/devices/disks/naa.6000eb359cd89a2e000000000000001c'.
Within FDISK we will enter 'n'’ for a new primary partition ('p'), indicating it is the first partition (‘1’), using the entire volume ('default & 'default'), we will indicate a type ('t') of format ('fb') to the partition that will be VMFS. Additionally, we will indicate extra functionality ('x'), we will specify the starting offset in the partition ('b') as '128'’ and we write ('w').
This would be the final scenario, a VMFS volume with the same content it had before being deleted and the VMs running!












































