VMware vSphere

 View Only
  • 1.  Unable to delete vmdk files

    Posted Apr 20, 2021 02:59 PM

    Hello All,

    We have a number of rogue VMDK files that dont appear to be connected to anything, we can move, rename these files but cannot delete them, they all appear to be -flat files e.g "SRV-FS_1-flat.vmdk"

    I have tried the following -

    reboot of the vcentre

    reboot of the backup server

    reboot of the named VM 

    tried removing from vcentre and the host management pages

     

    the error I get is  - 

    Delete Datastore File

    Key       haTask--vim.FileManager.deleteFile-168233441

    Description       Delete the source file or folder from the datastore

    State     Failed - Error caused by file /vmfs/volumes/59c386ab-acc6bf16-6452-b499bab20938/trashfolder/SRV-VEEAMMGR-flat.vmdk

     

    Can anyone advise how to remove these files? 

    Regards

    David

     



  • 2.  RE: Unable to delete vmdk files

    Posted Apr 20, 2021 05:48 PM

    >>> ... that dont appear to be connected to anything
    Please don't mind me asking, but how did you determine this?
    .vmdk file are virtual disk files, which contain the user data, and it's fairly uncommon that they become orphaned.

    Adré



  • 3.  RE: Unable to delete vmdk files

    Posted Apr 21, 2021 10:00 AM

    Hello,

    Many thanks for your response. I have checked each of the hosted servers and none have links to these files. these files are showing date stamps from last year.

    I would have thought if the file was renamed the server(s) that had any locks on the files would have gone offline / shown some errors please correct me if I am wrong on this point.

    I am looking again at this today, concentrating on the srv-adsync machine.

    The one thing that might be of useful info is that we have had a rebuild of the VCENTRE server, which was a windows based to the appliance based, my thoughts are did this faulty vcentre have something still open with these servers when it failed?

    the disk store these files are on is our replica store so live machines wouldn't have been hosted on it

     

    Kind Regards

    David



  • 4.  RE: Unable to delete vmdk files

    Posted Apr 21, 2021 04:01 PM

    Further information - I ran vmfsfilelockinfo as per below and here is the output

     

    vmfsfilelockinfo -p SRV-ADSYNC-flat.vmdk
    vmfsfilelockinfo Version 2.0
    Looking for lock owners on "SRV-ADSYNC-flat.vmdk"
    "SRV-ADSYNC-flat.vmdk" is not locked by any ESX host and is Free
    Total time taken : 0.025852441787719727 seconds.



  • 5.  RE: Unable to delete vmdk files

    Posted Apr 21, 2021 05:49 PM

    It's indeed possible to rename and move .vmdk files even if the VM is powered on. The point in time when you run into issues with renamed, or moved files is when you power-cycle the VM, i.e. power-off/power-on. That's why I actually though of files that are still in use, e.g. for VMs with active snapshots, where only the latest .vmdk in the snapshot chain gets modified.
    However, what's strange is the vmfsfilelockinfo result.

    What you may want to check, is whether you see any helpful entries in the log files (e.g. the vmkernel.log) for this issue.

    Other than this, try to contact VMTN user , who may be able to help in such a case.

    André



  • 6.  RE: Unable to delete vmdk files

    Posted Apr 22, 2021 03:46 PM

    Hi,

    I have tried today to rename the vmdk file and reboot the server is should be attached to. The server rebooted and is still running. The date stamps on all of these files are still solidly in last year (2020) and dont appear to be being updated.

    I have also run the same command on the other three files and got the same results

    I will look at the logs and look at the machines see if they are reporting any snapshot issues, but if i remember rightly they weren't showing any earlier in the week.



  • 7.  RE: Unable to delete vmdk files

    Posted Apr 24, 2021 09:43 PM

    move these files to different folder. and check if VM still working.
    change the permission/ownership of these files and remove.

    regards