1 2 Previous Next 25 Replies Latest reply on Dec 21, 2010 3:15 AM by a.p.

    Deleted snapshots - disk space not recovered

    saariko Novice

      I have had a machine where all of the snapshots were deleted.

      The Machine has 1 10GB hard disk, but as you can see, it has vmdk files that I think need not be there.

       

      How do I recover that space?

        • 1. Re: Deleted snapshots - disk space not recovered
          idle-jam Champion

          just ensure that the snapshot are full deleted, and if it's still there i would suggest doing a clone or storage vmotion which would combine everything into a single VMDK. this is one of the easiest way.

          • 2. Re: Deleted snapshots - disk space not recovered
            saariko Novice

            Thanks for the quick response.

             

            I don't have Vmotion, and not sure why I need to clone.

             

            However, the reason I deleted these snapshots is due the fact that I only have 15GB left on the VM machine.

             

            snap115.jpg

             

            so I don't think I can clone.

             

            Also, there are no snapshots available. *see

            snap116.jpg

             

            Can I just delete any of these VMDK files?

            • 3. Re: Deleted snapshots - disk space not recovered
              pauljawood Enthusiast

              Hi,

               

              Can you please list the number of snaps that you have under the folder for the VM. If you clone or vMotion the machine it should consolidate the space back to one file.

              • 4. Re: Deleted snapshots - disk space not recovered
                saariko Novice

                @pauljawood thanks, but not sure what you are asking for.

                 

                I have listed both the datastore files under the machine, and also the list of snapshots (empty one).

                 

                I shutdown the machine, and booted it up, but it didn't free up the space.

                 

                I only have 1 VM machine, no sphere or other enterprise admin machine.

                • 5. Re: Deleted snapshots - disk space not recovered
                  a.p. Guru
                  Community WarriorsUser ModeratorsvExpert

                  Sometimes the snapshot manager does not show all snapshots. There may be several reasons for this. However, assuming your base disk is thick provisioned and you have only 1 snapshot file in the datastore, create another snapshot and then use the "Delete All" button to consolidate the snapshots. This will remove/consolidate all snapshots to the base vmdk. In ESX 3.5 it may happen that you get a timeout in the GUI if the consolidation takes a long time. Don't worry about this, just let ESX finish its work.

                   

                  André

                  • 6. Re: Deleted snapshots - disk space not recovered
                    saariko Novice

                    Hi ap

                     

                    I tried that solution, I had a 3rd vmdk, I than deleted all snapshots (was only one there)

                     

                    but still, the previous 10gigs are still there, uncounted for.

                     

                    I will appreciate any help by any member.

                     

                    thanks

                    • 7. Re: Deleted snapshots - disk space not recovered
                      a.p. Guru
                      vExpertUser ModeratorsCommunity Warriors

                      That's strange. After you created a new snapshot, you should have seen 5 vmdk files, 2 for the first disk and 3 for the second disk.

                      Please attach the latest vmware.log as well as the vmsd file to your next post?

                       

                      André

                      • 9. Re: Deleted snapshots - disk space not recovered
                        ankitnarchal Enthusiast

                        Hi Saariko,

                         

                        Sometimes what happens if, even if yo try to delete the snapshot, you will still find all the snapshot vmdks in the VM folder. this happens due to the reason that the snapshot metadata gets corrupt or the chai mismatch happens.

                        you can try recreating the snapshot and then check the snaapshot manager but there is no gurantee that it will list p all the snapshots or would align the snapshot chain. Inorder to get the data back and consolidate all the snapshots to the base disk, the recommended tested and tried option would be to clone the VM either from the VC or you can run the clone commands from ES console itself.

                        Now, cloning from the VC wll not require VM to power off but if you will try to clone it via command line then you need to have VMpowered off as it needs a lock on the VMDK that you need to clone.

                        I would recommend to try cloning it using VC UI first and if it fails then you can try cloning it from command line.

                         

                        Commands:

                         

                        vmkfstools -v  3 -i <path to the snapshot vmdk file which you want to clone and it should be the path to the vmdk and not the snapshot delta> <path to the new location where you want to create the clone>

                         

                        Eg: you have a VM with one disk name test.The snapshot file will have 0000##.vmdk/0000##-delta.vmdk as extension. If this VM is residing on datastore1 and you want to clone it to datastore2

                        Files: test.vmx, test.vmdk, test-00000#.vmdk, test-0000#-delta.vmdk

                         

                        The the command would be:

                         

                        vmkfstools -v 3 -i /vmfs/volumes/datastore1/test/test-00000#.vmdk /vmfs/volumes/datastore2/<new folder name or can be the same folder name>/test_clone.vmdk

                         

                        this will clone the disk test with one snapshot and will consolidate the data of the snapshot to the base disk then yo can either attach the cloned disk from the same location or you can copy this disk to the original VM location and delete the old one and attach it to the VM.

                        • 10. Re: Deleted snapshots - disk space not recovered
                          a.p. Guru
                          User ModeratorsvExpertCommunity Warriors

                          Sorry, I had my head on another issue when writing the last post. You should have seen 3 vmdk files (not 5) since you only have one virtual disk.

                          For the log file, please attach the vmware31.log file since this is the one which I think should show the creation and the commit of the snapshot you created.

                           

                          André

                          • 11. Re: Deleted snapshots - disk space not recovered
                            saariko Novice

                            Hi ap,

                             

                            Here is the vmare31 log.

                             

                             

                             

                             

                            @ankitnarchal thanks, but I don't have VC, and I don't access my VM to the console. I do all from the GUI.

                            • 12. Re: Deleted snapshots - disk space not recovered
                              ankitnarchal Enthusiast

                              Okie, so you can clone the disk via console and then define the destination same as source, just change the name of the converted file.

                              • 13. Re: Deleted snapshots - disk space not recovered
                                a.p. Guru
                                Community WarriorsvExpertUser Moderators

                                Now it becomes really strange.

                                From your logfiles, it appears that "BASE - XP Pro SP2-000001.vmdk" is no snapshot, but the base disk. It points to the "BASE - XP Pro SP2-000001-flat.vmdk" file!? The "BASE - XP Pro SP2.vmdk" as well as the "BASE - XP Pro SP2-flat.vmdk"are not mentioned at all in the logs.

                                It looks like that at some point someone has "worked" on this VM manually. Without access to the console (local or ssh) I don't see a chance to clean this up.

                                What I would need to see are the descriptor/header vmdk files of all the virtual disks. Each virtual disk consists of two files the header file (vmname.vmdk) as well as the data file (either vmname-flat.vmdk or vmname-00000x-delta.vmdk), however in the datastore browser they are displayed as one file.

                                 

                                André

                                • 14. Re: Deleted snapshots - disk space not recovered
                                  saariko Novice

                                  Thanks.

                                   

                                  Can you tell me how to give you that information please?

                                   

                                  Can I delete any of these files to make space than?

                                   

                                  Saar

                                  1 2 Previous Next