VMware vSphere

 View Only
Expand all | Collapse all

deleted folder on ESXi 5 through ssh but I still see the folders

  • 1.  deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 05:52 PM

    Hi,

    I deleted the folders using SSH but I still see the folders on the SSH and through the ESXI 5 client.

    when I try to delete the folder through the SSH I get:

    rm: cannot remove 'Folder': Directory not empty

    the folder is empty - the same for all my folders.

    when I try to delete it through the client I get:

    I'm not sure how to clear all these empty folders.

    can someone suggest a way?

    Thanks!!

    Dotan.



  • 2.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 07:36 PM

    If it had been a vm's folder that you have deleted, while it is running, it might be due to the swap files created which stops from the directory being deleted.. Check for the vm under ps -cPT | grep -i vmx and kill the VM;s vmx process. You should be able to remove the directory.



  • 3.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 07:41 PM

    Hi,

    I did "ps -cPT | grep -i vmx" but there was nothing runnig. (btw, I did reboot the Server twice).

    any other suggestions?

    Thanks a lot!!

    Dotan.



  • 4.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:11 PM

    How are you browsing your directory?  ls -la?



  • 5.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:14 PM

    when I do "ls -la" I get:

    ls -l
    ls: ./Conv-Asrock-a10a5399.vswp: No such file or directory
    ls: ./vmware-19.log: No such file or directory
    ls: ./vmware-17.log: No such file or directory
    ls: ./vmx-Conv-Asrock-2701808537-1.vswp: No such file or directory


  • 6.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:16 PM

    are any other hosts connected to that datastore? 



  • 7.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:19 PM

    no.

    I think the problem happened when I decided to delete the folder through the ssh connection (rm -rf folder_name)

    I didn't stop the instance nor I moved it from the inventory.



  • 8.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:20 PM

    Hi,

    Have you come across: http://communities.vmware.com/message/1446651

    Might provide some pointers.

    Many tx



  • 9.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 08, 2013 08:22 PM

    You mean the RvTools?

    I hope it will help

    Thanks!



  • 10.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 01:52 PM

    Hi,

    any other suggestions to my issue?

    Thanks!!
    Dotan.



  • 11.  RE: deleted folder on ESXi 5 through ssh but I still see the folders



  • 12.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 03:53 PM

    Hi,

    I'm connected with SSH to the ESXI Host but when I try to run

    "vmware-cmd -l"    I get:
    -sh: vmware-cmd: not found

    what am I missing here?

    Thanks!!

    Dotan.



  • 13.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 04:38 PM

    As pointed out earlier, it must be some other host having its VM in the datastore. [shared might be]. The reason I am saying this is because.. Conv-Asrock is a VM whose swap file had been deleted. Like you have mentioned earlier, if this ESX server does not have this VM. then who does?

    A worst case to resolve might be to reboot the box, provided you can afford it. This will release the lock. Another way is to find out where the files had been located. It is possible one of the files in the directory is still referring to the deleted file and is unable to do so.



  • 14.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 06:48 PM

    Hi,

    the Server is not shared and I rebooted it few times.

    I still can't delete the folders :smileysad:

    Thanks!

    Dotan.



  • 15.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 06:58 PM
    rm -rf folder_name

    Which folder did you try to delete with this command? A single VM's folder or the complete datastore folder?

    Please provide the full command you ran?

    André



  • 16.  RE: deleted folder on ESXi 5 through ssh but I still see the folders

    Posted Jan 09, 2013 07:41 PM

    This is the exact command I used:

    ls -l web2_old/
    ls: web2_old/vmx-web2-1182937539-1.vswp: No such file or directory
    ls: web2_old/web2-468231c3.vswp: No such file or directory
    ls: web2_old/vmware-20.log: No such file or directory
    ls: web2_old/vmware-22.log: No such file or directory

    ls -l

    drwxr-xr-x    1 root     root                840 Jan  9 18:59 web2_old

    rm -rf web2_old/

    rm: cannot remove 'web2_old': Directory not empty

    I did all of the commands from:

    /vmfs/volumes/datastore1

    Thanks!

    Dotan.