I was about to delete a ton (more on that later) of VMware ESX 3.5 snapshots in our maintenance window.

After some quick Googling, I found Delete all Snapshots which made me hold off on it until I had some more information about our snapshots. This number will just increase daily until they’re committed.

So in order to plead a case with our SAN admin, I’ve got to have some information. How much space is being taken up on our LUN with regards to snapshots?

bash to the rescue!

[sourcecode language=‘jscript’] [root@host LUN] ls -laR | grep delta | awk ‘{ SUM += $5} END { print SUM/1024/1024 }’[/sourcecode]

(Watch out for apostrophes etc if pasting this.)

Win.