VMDK seems to be corrupted after shrinking LUN

This morning i decreased the siz of a LUN on our netapp storage device. At first all seemed well and then i got a notification that my WSUS server could not be contacted. So i went to the server and tried to connect through console using Vsphere client and could not.

So i tried powering off the VM and powering it back on at it seems like it cannot find the disk. I tried building a new vm and using the same disk and it also cannot find the disk.

Unfortunately i cannot do a restore because i am in the process of re-configuring the backups and haven't gotten to WSUS yet.

Is there a way to repair VMDKs? If so that would be freaking amazing and save me time rebuilding a WSUS server tonight.

I've heard vdiskmanager can do this but we do not have Vmware workstation and i do not know if i can do it another way.
Josef Al-ChacarSystems AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul SolovyovskySenior IT AdvisorCommented:
I'm not sure you can do this with VMware.  On the Netapp you can do this with an operating system that supports the shrink feature, I am not sure if VMware will support this though.

According to VMware this is not possible without destroying VMFS.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
That does not surprise me if you shrink the LUN, the virtual machine disk (vmdk) could be corrupted.

Create a new smaller LUN, and use Storage vMotion to move the vmdk.
Josef Al-ChacarSystems AdministratorAuthor Commented:
Yeah that is our plan. I feel a little slow. It was a dumb mistake.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Paul SolovyovskySenior IT AdvisorCommented:
It happens, on the Netapp and Windows/Linux machine you can do this via snapdrive and works like a charm.  VMFS is a bit of different animal
If you've got Netapp snapshots on the volume that contains the LUN, you may be able to recover from these snapshots.

You don't say if the LUN/datastore contains many VMs, which may complicate how you do this. But perhaps you could tell us if there are any Netapp snapshots that date before the moment you shrunk the LUN.
Josef Al-ChacarSystems AdministratorAuthor Commented:
I rebuilt the WSUS server which was no big deal. However, i had to create the new VM on a separate host. The original host is giving me an error when adding a VM to that datastore. It works on all the other hosts just not that one. Also on that host i can create VMs on any other datastore.

It gives me the attached error when trying to create a VM on the original host.
You should consider that datastore as corrupted and no longer use it. Create a new datastore and move any remaining VMs away from the old one.

For future reference: if you use NFS datastores instead of VMFS datstores, you will have full flexibility of shrinking/enlarging datastores without limitations. NFS is highly recommended if you use NetApp.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Josef Al-ChacarSystems AdministratorAuthor Commented:
We are moving the working server to a new LUN and destroying the old one soon. Thanks for the help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.