VMware Cloud Community
LluisClem
Contributor
Contributor

Can't delete snapshots - even unmounted disks

First of all thanks to you all for the help found in this site.

We are using Vsphere 4.1, 12 node cluster.

It's been 2 months since I started this problem, I've been following most threads of this issue and I found good answers, but I still have a problem.

We are using Veritas Netbackup 7.0.1, we were trying to backup some machines "vmware-way", so it takes a snapshot, backups it and deletes snapshots.

Some machines after time of use failed, backups couldn't be removed.

Vsphere said "Unable to access file <unspecified filename> since it is locked"

The backups can be seen on the snapshot manager as "Consolidated helper XX. XX"

I found this problem in 4 machines 2 nearly solved 2 still stucked.

What I first tried is, make a new snapshot, and then delete all : Snapshots didn't appear then in snapshot manager, nor even by commandline, but they were in the disk and when I do a backup they appear once again.

If I do delete in Snapshot manager

"vmware-cmd  VMachine.vmx" hassnapshot

hassnapshot() = 0"

Some machines lost the CID in delta files, so I linked delta files onde again i love this command to check :

egrep -i "cid|parentcid|vmdk" VMachine.vmdk VMachine-0000{0,1,2}{0,1,2,3,4,5,6,7,8,9}.vmdk --color

I read this can happen in 4.0 when you have a snapshot and vmotion-storage machin.

Then I tried linking disks and creating a new one:

vmkfstools -i VMachine-000031.vmdk  /vmfs/volumes/4bfbb494-33e7760f-d8d385e07428/VMachine_1/VMachine_2.vmdk

VMachine Worked!

But I had to stop VMachine, and delta files couldn't be deleted. Even after removing the disk from VMachine

[root@ borrar]# rm VMachine.vmdk

rm: remove regular file `VMachine.vmdk'? y

rm: cannot remove `VMachine.vmdk': Device or resource busy


[root@ borrar]# vmkfstools -D VMachine.vmdk

[root@ borrar]# tail /var/log/vmkernel

Jan 20 13:17:53 esxcem06 vmkernel: gen 903, mode 0, owner 00000000-00000000-0000-000000000000 mtime 23

owner 00000000-00000000-0000-000000000000 - Unknown machine locking my disk files

I tried lunreset for removing disk locks :

vmkfstools -L lunreset vmhbaX:X:X:X

It didn't work well.

Then we updated to 4.1 and all hosts in the cluster were restarted, I was able to delete those files at last !

So...

Has any of you found other way to delete unwanted snapshots?

I've read cloning Vmachine would work but I'm affraid not needed delta files get stucked once again and so I need to reboot 12 nodes to delete them, witch scares me !

I hope you find this thread usefull and some one can help.

Thanks in advance.

Used links

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100640...

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100872...

http://virtrix.blogspot.com/2007/06/vmware-dreadful-sticky-snapshot.html

http://kb.vmware.com/kb/1017721

http://vmutils.blogspot.com/

0 Kudos
0 Replies