ESXi

 View Only
Expand all | Collapse all

Need help in recovering data from delta vmdk

Shakaal

ShakaalFeb 02, 2012 02:37 PM

  • 1.  Need help in recovering data from delta vmdk

    Posted Feb 02, 2012 01:54 PM

    Hi,

    I am having a big issue.

    There was a Ubuntu 8.04 Server guest installed on VMWare ESXi 4.1

    It was a VM of 200GB size.

    Since, it was running on 99% full i tried to increase the size using

    vmkfstools -X 210G /vmfs/datastore1/LinuxServer/LinuxServer.vmdk


    But then it started giving the error,

    "Failed to open (The parent virtual disk has been modified since the child was created)."

    We had hell of a data on the VM, and the admin had not backed up any of them.

    And to top these, the guy who created the VM has installed Ubuntu on LVM.(:smileyconfused:)

    Then i noticed that in the Settings of the VM, the HDD was pointed to a delta vmdk like LinuxServer-000001-delta.vmdk(81GB)

    but the main file seemed to be LinuxServer-flat.vmdk(210GB).

    To try boot the machine again i messed up all the CIDs, now i dont know which is what.

    On a last try, i tried creating another VM pointed to the flat vmdk.

    Which seems to boot properly, but lots of file went missing.

    Is there a way to recover the data using the delta vmdk??

    Please help anyone.



  • 2.  RE: Need help in recovering data from delta vmdk

    Posted Feb 02, 2012 02:10 PM

    Hi,

    there is a way out, can you please upload all the vmdk files (* not the flat files) for this VM. I will go through them and will update you. hopefully will be able to recover them

    (it is not recommended to increase the size of a VM running on snapshot)

    waiting for the files

    Regards



  • 3.  RE: Need help in recovering data from delta vmdk

    Posted Feb 02, 2012 02:37 PM

    waiting for files

    Regards



  • 4.  RE: Need help in recovering data from delta vmdk

    Posted Feb 02, 2012 03:21 PM

    the basedisk was expanded ?

    then editing the CID values will not help.
    You need to expand the snapshot as well.
    Or undo the expand ...

    Anyway - stop using the VM with the basedisk alone immediatly.

    We need:
    all vmware.logs
    all small vmdks - those that do not have flat or delta in the name
    the vmx-file



  • 5.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 07:09 AM

    Hi,

    I have attached the vmdks, vmx files and the logs.



  • 6.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 09:17 AM

    Hi
    the archive is incomplete - please attach snapshot 000001.vmdk as well



  • 7.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 03:01 PM

    waiting for snapshot VMDK to be loaded

    Regards



  • 8.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 03:19 PM

    @ Shakaal
    can you handle this case ?
    - this is not done by editing a few CID values - but I guess you know that ...
    After you fixed the size of either the basedisk or the snapshot immeditaly consolidate the snapshot.

    Then I dont need to monitor this post any longer   ;-)



  • 9.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 06:17 PM

    @Shakaal,

    Sorry, had been searching all possible backups for the requested snapshot vmdk

    Thats why the delay.

    But it missing with us. :smileysad:

    W/o that is it impossible to take any data??

    Thanks for your patience though

    Vishnu



  • 10.  RE: Need help in recovering data from delta vmdk

    Posted Feb 03, 2012 10:25 PM

    do you still have the delta.vmdk ?



  • 11.  RE: Need help in recovering data from delta vmdk

    Posted Feb 04, 2012 12:42 PM

    Hi Vishnu,

    Sorry for delay, i hope that "LinuxFileServer-000001-delta.vmdk" file still exists if it does then we are good to go.

    What i have done is that i have reduced the size of the original disk back to 200GB, I m uploading 2 files one for the Base disk that is "LinuxFileServer-flat.vmdk"

    and second one for the Snapshot i.e "LinuxFileServer-000001-delta.vmdk". They are pointed correctly.

    Now this what you have to follow:

    1. Remove the VM from Inventory

    2. Take the Backup of the existing files only vmdks, no delta or flat.

    3. Replace the files with the one which i have uploaded

    4. Add the VM to inventory and you are good to go.:smileyhappy:

    Regards



  • 12.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 10:02 AM

    @Shakaal,

    Thanks.

    Will try that out today. :smileyhappy:

    @continuum,

    Yes, i do have that.

    Regards

    Vishnu



  • 13.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 01:52 PM

    @Shakaal,

    That worked. :smileycool:

    Thanks a lot :smileygrin:

    Can i know what magic u did??

    :smileyhappy:



  • 14.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:01 PM

    no magic involved at all
    he expanded the snapshot to the size of the basedisk

    this means you now should immediatly consolidate the snapshot

    something to read ....
    http://sanbarrow.com/vmdk-handbook.html
    if you walk through my notes next time you can help ourself



  • 15.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:03 PM

    @continuum

    By Consolidating, you meant taking the backup right?



  • 16.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:07 PM

    no - get rid of the snapshot
    snapshots that have been expanded should only be used in readonly mode

    so either clone blabla-000001.vmdk into a new vmdk with vmkfstools

    vmkfstools -i blabla-000001.vmdk newname.vmdk

    or use the snapshotmanager if that still displays anything



  • 17.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:14 PM

    in case if you don't see the snapshot in snapshot manager you can follow below KB article for deleting the Snapshots from Command prompt :

    http://kb.vmware.com/kb/1002310

    Regards



  • 18.  RE: Need help in recovering data from delta vmdk

    Posted Apr 03, 2013 06:06 AM

    Hi.

    @Shakaal

    What do u mean by "2. Take the Backup of the existing files only vmdks, no delta or flat. "

    All the best



  • 19.  RE: Need help in recovering data from delta vmdk

    Posted Apr 03, 2013 11:28 AM

    .Hi Alexmitrea,

    We took backup of only of vmdk's as we were uploading new vmdk files to replace the existing ones, some times client might ask for the old files, so just asked them to take the backup.

    Thanks & Regards

    Vakul Bhatt



  • 20.  RE: Need help in recovering data from delta vmdk

    Posted Apr 03, 2013 05:32 PM

    Hi.

    Do those vmks contain imporatant config data or can it be ignored?

    Im asking becose the same situation happened to me, and i did not backup the old vmks.

    Really good post, helped me a lot.

    Tx



  • 21.  RE: Need help in recovering data from delta vmdk

    Posted Apr 04, 2013 10:26 AM

    hi Alexmitrea,

    whenever you created a disk in VMware, therre will be 2 files in the back which will be created,:

    1. <vmName>.vmdk : this is a pointer file

    2. <vmName>-Flat.vmdk : this file holds the actual Data.

    so they both have there own importance, but flat file is the one which is more important as it holds your Data. We can create .vmdk file even if it is lost, but if flat file is lost it can only be restored from backup.

    Thanks & Regards

    Vakul Bhatt



  • 22.  RE: Need help in recovering data from delta vmdk
    Best Answer

    Posted Feb 07, 2012 02:09 PM

    Hi Vishnu,

    I have already mentioned in the post in which i gave you files: "What i have done is that i have reduced the size of the original disk back to 200GB"

    The base disk size was increased to 210GB, however it was 200GB originally. However the Snapshot Disk was still configured for 200GB, so I reduced the size of the Original Base disk i.e. the flat.vmdk using the pointer file .vmdk. :smileywink:

    Regards



  • 23.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:13 PM

    why did you use that way ?
    just curious - I think the other one  is the safer approach



  • 24.  RE: Need help in recovering data from delta vmdk

    Posted Feb 07, 2012 02:20 PM

    Have learnt lots on vmware after the issue arised.

    Will refer the article and kb, before i do those steps in future

    Thanks Shakaal and continuum for your timely help

    :smileygrin: