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
# 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
These information were very easy to understand. They were very useful for my business. Keep up the good work.
ReplyDeleteCloud Migration Services
AWS Cloud Migration Services
Azure Cloud Migration Services
VMware Cloud Migration Services
Cloud Migration tool
Database Migration Services
Cloud Migration Services