Skip to main content

LUN VMFS partition table corrupted




Last week I got an issue where customer was having issue where one of the shared LUN got disappeared from all the ESXi host.

Well, while troubleshooting I found some error found in vmkernal.log

2017-11-30T06:47:09.272Z cpu78:12160496)WARNING: Partition: 1224: Partition 1 is active, failure to update partition table for naa. 600666666666666666666
2017-11-30T06:47:09.422Z cpu78:12160496)WARNING: Partition: 1224: Partition 1 is active, failure to update partition table for naa. 600666666666666666666

Try to verify if the LUN is attached to ESXi by using below command and found its connected.
esxcli storage core path list OR esxcfg-mpath -l

Later, Verified if the LUN status is showing online, degraded or offline by using command esxcli storage core device list -d NAA_ID

At present, I was able to see the LUN status online. However the LUN is still not visible in device section.

From the vmkernal.log error which was mentioned above “WARNING: Partition: 1051: Partition 1 is active, failure to update partition table for naa.0000000000000000” which indicate that the partition table is corrupted and require to recreate the partition table.

From the below we can observe that the datastore is missing the partition table information,
PartedUtil getptbl/vmfs/devices/disks/naa.000000000000000

Here you will get the output like this.
gpt
31121 255 63 499974144
1 2048 499974110 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

If your output appears similar to the following, it indicates the partition is missing:

gpt
31121 255 63 499974144


Now to find the beginning and end of VMFS partition run below script on ESXi host.

# offset="128 2048"; for dev in `esxcfg-scsidevs -l | grep "Console Device:" | awk {'print $3'}`; do disk=$dev; echo $disk; partedUtil getptbl $disk; { for i in `echo $offset`; do echo "Checking offset found at $i:"; hexdump -n4 -s $((0x100000+(512*$i))) $disk; hexdump -n4 -s $((0x1300000+(512*$i))) $disk; hexdump -C -n 128 -s $((0x130001d + (512*$i))) $disk; done; } | grep -B 1 -A 5 d00d; echo "---------------------"; done

Now if you see the readable value in the output field then we can create recreate the partition table. However, if we see the output into unreadable format and getting error that means it is quite possible that there are rare chance to re-create the partition table.

Option 1 (Where the output is showing readable output)
By running the above script you will get the first block of VMFS which is ideally 128 (in case of 5.5) and 2048 in case of (5.1 and above)

To get the end block for the partition, run this command:

# partedUtil getUsableSectors /vmfs/devices/disks/naa.000000000000 gpt “1
Output comes as:
34 499974110

If running the above command if you are not able to get the specified output and receiving the error stating “Partition table invalid, unable to satisfy all constraints on the partition.. or something similar to that.

Try below command which create the temporary partition and after that you can read the disk information

# partedUtil setptbl /vmfs/devices/disks/naa.0000000000000 gpt "1 2048 4123456 AA31E02A400F11DB9590000C2911D1B8 0"

Now run the command to set the correct value of first and last block
# partedUtil setptbl /vmfs/devices/disks/naa.6006016045502500c20a2b3ccecfe011 gpt "1 2048 499974110 AA31E02A400F11DB9590000C2911D1B8 0"


Now, last run this command to attempt to mount the VMFS datastore:

# vmkfstools –V


If nothings works as above, then please log a case with VMware support to get assistance.

Please comment me if you have any further queries.


Happy Sharing … J

























Comments

Post a Comment

Popular posts from this blog

Changing the FQDN of the vCenter appliance (VCSA)

This article states how to change the system name or the FQDN of the vCenter appliance 6.x You may not find any way to change the FQDN from the vCenter GUI either from VAMI page of from webclient as the option to change the hostname always be greyed out. Now the option left is from the command line of VCSA appliance. Below steps will make it possible to change the FQDN of the VCSA from the command line. Access the VCSA from console or from Putty session. Login with root permission Use above command in the command prompt of VCSA : /opt/vmware/share/vami/vami_config_net Opt for option 3 (Hostname) Change the hostname to new name Reboot the VCSA appliance.   After reboot you will be successfully manage to change the FQDN of the VCSA . Note: Above step is unsupported by VMware and may impact your SSL certificate and face problem while logging to vSphere Web Client. If you are using self-signed certificate, you can regenerate the certificate with...

High-Speed Networking for VMs: VMXNET3 Now Supports Up to 65 Gbps

The VMXNET3 adapter is VMware's high-performance virtual network adapter, designed for optimized performance in vSphere environments. It is the default and recommended adapter for most modern workloads on ESXi , delivering high throughput, low latency, and support for advanced networking features. With the release of vSphere ESXi 8.0 Update 2 , VMXNET3 introduces new capabilities that significantly enhance virtual network performance. What’s New in ESXi 8.0 Update 2 for VMXNET3? Traditionally, VMXNET3 reports a default link speed of 10 Gbps to the guest operating system. However, the actual achievable throughput often exceeds this value—thanks to technologies such as multi-queue support , Receive Side Scaling (RSS) , and Large Packet Offload . Starting with ESXi 8.0 Update 2 , this limitation can now be overridden , and VMXNET3 can be configured to support custom link speeds of up to 65 Gbps . This enhancement enables improved flexibility and throughput for high-performance w...

What's New in VMware Cloud Foundation (VCF) 9.0

   What's New in VMware Cloud Foundation (VCF) 9.0 VMware Cloud Foundation 9.0 is a major release that redefines private cloud platforms with a focus on unified management, operational efficiency, advanced security, and robust support for modern and AI workloads. Below is a comprehensive summary of the most significant new features and innovations. Unified Operations and User Experience ·          Single Unified Interface: VCF 9.0 introduces a consolidated interface for cloud administrators, providing a holistic view of private cloud operations. This streamlines daily management and reduces complexity, making on-premises environments feel more like public cloud in terms of usability . ·          Quick Start App: A new application that dramatically reduces setup time and complexity for deploying and configuring private cloud environments . ·        ...