Reclaim free space on thin VMFS 5 data store safely with no downtime ?

Is there any command or way how to reclaim the free disk space from a VMFS5 data store ?

Ideally with no downtime to the VM running on the datastore or can be safely done during the business hours.

Note: my underlying Storage is PureStorage SSD All Flash Array.
LVL 9
Senior IT System EngineerIT ProfessionalAsked:
Who is Participating?
 
Paul SolovyovskyConnect With a Mentor Senior IT AdvisorCommented:
As Andrew stated use the storage unmap commands.  Here's  a good step by step.

http://www.sysadmintutorials.com/tutorials/vmware-vsphere-5-x/vmware-vsphere-5-5-lun-reclaim-unmap/
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
Yes, use Storage vMotion to move the VMs from one datastore to another, then destroy the original VMFS LUN, and re-create the datastore.

Unless your storage supports the new reclaim tools...

Using vmkfstools to reclaim VMFS deleted blocks on thin-provisioned LUNs (2014849)
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
Senior IT System EngineerIT ProfessionalAuthor Commented:
ok, what's the new reclaim tool software name and how to use it ?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
@ITSystemEngineer I linked to it, in my first post!

vmkfstools -y percentage_of_deleted_blocks_to_reclaim
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
Thanks guys,

So how to calculate the percentage of the free space ?

VMFS Datastore
in the screenshot above, I have 285 GB Free from the 2 TB VMFS datastore total space.

Shall I do 285/2000 * 100% = 14.25%
so therefore the command will be:

vmkfstools -y 14.25

Open in new window


or do i have to type if different number with some overhead ?
0
 
Jim_NimConnect With a Mentor Senior EngineerCommented:
Assuming you're running ESX 5.0 or 5.1 (as the process is different for 5.5), vmkfstools will do the job. Use during production can have an impact to performance, but I wouldn't be too concerned with that since you're dealing with all-flash storage.

Here's an example of what running the command will look like:
~ # cd /vmfs/volumes/RethinTest/
/vmfs/volumes/54d24ee2-fdb41fc5-ac0d-005056985817 # vmkfstools -y 10
Attempting to reclaim 10% of free capacity 8.9 GB (910.4 MB) on VMFS-5 file system 'RethinTest' with max file size 2 TB.
Creating file .vmfsBalloontZ4u2R of size 910.4 MB to reclaim free blocks.
Done.

Open in new window


Decimal numbers don't seem to be accepted after the -y flag, so you'll want to round down to a whole percent.
vmkfstools -y 14

Open in new window

0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I think I would be a little cautious, and use 10%.
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
I'm using ESXi 5.1 Update 1
0
 
Jim_NimConnect With a Mentor Senior EngineerCommented:
Just took a 2nd look at your math..

The percentage entered represents what portion of current VMFS free space you want to attempt to "reclaim" on the storage array... Not the percentage of total volume capacity, as your math indicates.

That means that in your environment with 285GB free of 2TB, running "vmkfstools -y 14" will only reclaim about 40GB.

Try running the command with more like 80 or 90 if you want more visible results.
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
hi Jim,

Do you mean like vmkfstools -y 10

what about if the value is too large and it causes all of the VM in the datastore stopping or crashed ? would that scenario be possible to happens if I set the value to high ?

@Andrew: I'll try to run the command vmkfstools -y 10 several times and hopefully I can see the free space usable increased slowly but sure.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
What you need to work out, is it creates a balloon temp file, and this must not fill up the datastore.

especially when other activities are happening like snapshots, or disk creation, or other VM disk activities....

if nothing is happening, then you are safe to try a  vmkfstools -y 70 (or 80) smaller the better.
0
 
Jim_NimSenior EngineerCommented:
A reason to consider an upgrade to ESX 5.5: reclaiming deleted blocks on a thin volume doesn't use a single large "balloon" file, but rather several (one after the other) of a specified block size. This essentially eliminates the concern of filling up a datastore during the process, and is much safer to perform during production.
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
Cool, nice to hear that feature is vailable. but i hate the Web console :-|

but at the moment I guess I'll stay withESXi 5.1 Update 2 and then 3 in the next few months ahead.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.