vmware


vmware esxi 5.5 iscsi gpt repair


bit of background:
I have an esxi 5.5 cluster with vcenter HA.
I have multiple iscsi LUNs which are hosted on Ubuntu running iscsi target and software RAID (mdadm).
A few days ago I noticed a bunch of vm's were inaccessible.
I removed them from inventory thinking I'd add them back by browsing the datastore.
The datastore was showing inactive. The other datastores (same server) were fine.
rescan/refresh didnt work. I removed from inventory all the vm's hosted on the datastore with the problem but wasnt able to remove it still.
"HostDatastoreSystem.RemoveDatastore" for object on vCenter Server .
on the esxi hosts I ran /etc/init.d/storageRM stop then rescanned and restarted storageRM. This got rid of the datastore from vcenter console.
Tried to remove and add it back from the iscsi adapter, this was fine.
But when I try to add it as a datastore under configuration/storage I get another error - unable to read the partition information for device.
Its VMFS5, mirrored RAID1. 4tb.
I've logged onto the esxi shell directly on one of the hosts and used partedUtil to investigate and try to repair it.
getting the following if I try to getUsableSectors or getptbl
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/t10.94544500000000002318F588822755821C9CFF1605288097) diskSize (7813774720) AlternateLBA (23441323007) LastUsableLBA (23441322974)
Warning: The available space to /dev/disks/t10.94544500000000002318F588822755821C9CFF1605288097 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (15627548288 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (7813774720) AlternateLBA (23441323007) LastUsableLBA (23441322974) NewLastUsableLBA (7813774686)
Error: Can't have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/t10.94544500000000002318F588822755821C9CFF1605288097
trying to fix it:
partedUtil fixGpt /vmfs/devices/disks/t10.94544500000000002318F588822755821C9CFF1605288097
FixGpt tries to fix any problems detected in GPT table.
Please ensure that you don't run this on any RDM (Raw Device Mapping) disk.
Are you sure you want to continue (Y/N): y
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/t10.94544500000000002318F588822755821C9CFF1605288097) diskSize (7813774720) AlternateLBA (23441323007) LastUsableLBA (23441322974)
Fix/Ignore/Cancel? fix
Error: Can't have a partition outside the disk!
Unable to read partition table on device /vmfs/devices/disks/t10.94544500000000002318F588822755821C9CFF1605288097
One of the other datastores is identical with identical disks so I tried to setptbl using the size from that.
partedUtil setptbl /vmfs/devices/disks/t10.94544500000000002318F588822755821C9CFF1605288097 gpt "1 2048 7813774686 AA31E02A400F11DB9590000C2911D1B8 0"
gpt
0 0 0 0
1 2048 7813774686 AA31E02A400F11DB9590000C2911D1B8 0
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/t10.94544500000000002318F588822755821C9CFF1605288097) diskSize (7813774720) AlternateLBA (23441323007) LastUsableLBA (23441322974)
Warning: The available space to /dev/disks/t10.94544500000000002318F588822755821C9CFF1605288097 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (15627548288 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (7813774720) AlternateLBA (23441323007) LastUsableLBA (23441322974) NewLastUsableLBA (7813774686)
Error: Can't have a partition outside the disk!
On the iscsitarget host the LUNs show healthy. mdstat also shows healthy RAID and disks.
Is there anything else I can try to repair this and recover the vm's?
Thanks for helping.

Related Links

How to send keyboard and mouse command from host to VMware using autoit?
cloning multiple VMs in parallel with multithreaded PowerCLI
VMWARE Seperated Snapshot Disk disk files will now not work
Guest os on VMware workstation v7 cannot ping host OS when bridged on wireless adapter
Migrate VMware instances to cloudstack
Can you install vmware server 2 on the Windows 8 preview?
Cannot connect to virtual machine console
performance of vmware-machine on different computers
A non-changeable VMWare image
Where is “Developer” folder?
Shrink vmware disk
VMWare virtual machine will not boot [closed]
How to connect from a VMware guest machine to the server installed on a Windows 7 host machine?
Is VMWare installed in the current OS? [closed]
Copy ESXi vm image to vSphere
VMware player error on install vmware tools.

Categories

HOME
listview
blogger
gerrit
office365api
relayjs
q
gis
yahoo-oauth
react-redux
analysis
maven-3
networkx
qore
autotools
applepay
gitpitch
adobe-analytics
google-apps-marketplace
flux
google-cloud-speech
textfield
sox
status
info.plist
nhapi
fifo
elasticsearch-net
primitive
lightswitch-2013
microsoft-chart-controls
exuberant-ctags
xmlreader
mozilla
android-nestedscrollview
cloud-code
git-merge
serve
galen
firebase-admin
no-www
mime
flashair
revapi
datastax-startup
aurelia-validation
colorama
linode
bind9
eventkit
vmware-tools
savon
mathematica-frontend
mongocsharpdriver
contact-list
blackberry-10
apachebench
netmq
hsv
prerequisites
ora-00900
t4mvc
quicklisp
drawbitmap
cakephp-3.1
graph-api-explorer
pick
socketexception
rdl
eol
comexception
ember-charts
srs
multiprocessor
ms-project-server-2010
jsctypes
tidy
http-unit
ocunit
hgsubversion
blackberry-playbook
coercion
django-tagging
locate
visitor-statistic
nhibernate.search
rescale
iweb
data-driven
simpletest
phonon
defensive-programming
dbisam
signal-handling

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App