google.com, pub-4920175566720914, DIRECT, f08c47fec0942fa0 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 permissionUse above command in the command prompt of VCSA : /opt/vmware/share/vami/vami_config_netOpt for option 3 (Hostname)Change the hostname to new nameReboot 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 the help of below KB 2112283 article.



Happy Sharin…

VM Creation Date & Time from Powercli

Most of the times we have several requirement when we talk about IT environment like designing , deployment , compliance check or for Security auditing the environment.
Somewhere during security auditing we require to provide several information to security team to get successful audit.
One of them is the compliance of Virtual machine auditing of creation date and time.
Here into this post we will explore how to get the creation date and time of virtual machine hosted into the vCenter or ESXi.
To get the details we will use VMware Powercli to extract the details.
By default there is no function added into Powercli to get such details, so here we will add a function of vm creation date.
Below is the function which needed to be copy and paste into the Powercli.
=======================================================================
function Get-VMCreationTime { $vms = get-vm $vmevts = @() $vmevt = new-object PSObject foreach ($vm in $vms) { #Progress bar: $foundString = "       Found: "+$v…

Could not connect to one or more vCenter Server systems: https://FQDN:443/sdk

Recently I got a case where vCenter 6.0 where the webclient was not showing inventory while loading. Issue occur when the customer was performing migration activity of virtual machine.
We verified that the vpxd services of vCenter, which is VCSA (Appliance), went into stopped stated just after starting means its crashing.
On VCSA Shell: service-control --status vmware-vpxd shows "stopped" service-control --start vmware-vpxd starts the service starts for a couple of seconds and stops again
VCSA 6.0 is linked with extrnal PSC 6.0. Verified the services of PSC and found all looks into good state.
Tried to power off both the VCSA and PSC and Power on in sequence where we started first PSC and later VCSA. After restarting the VCSA, status of the VPXD services was same as it was getting stopped after couple of seconds.
Checked the VPXD logs and found that the heartbeat between ESXi and VCSA was getting timed out for more than 1032 ms or more.
VCSA has generated the core dump at /var/core. …