Solved

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

Posted on 2015-02-03
14
372 Views
Last Modified: 2015-02-05
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.
0
Comment
  • 5
  • 4
  • 3
  • +2
14 Comments
 
LVL 118

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 251 total points
ID: 40586986
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
 
LVL 4

Expert Comment

by:veera
ID: 40587000
0
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 40587027
ok, what's the new reclaim tool software name and how to use it ?
0
 
LVL 118

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 251 total points
ID: 40587046
@ITSystemEngineer I linked to it, in my first post!

vmkfstools -y percentage_of_deleted_blocks_to_reclaim
0
 
LVL 42

Accepted Solution

by:
paulsolov earned 83 total points
ID: 40587471
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
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 40587662
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
 
LVL 2

Assisted Solution

by:Jim_Nim
Jim_Nim earned 166 total points
ID: 40589258
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 118
ID: 40589336
I think I would be a little cautious, and use 10%.
0
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 40589877
I'm using ESXi 5.1 Update 1
0
 
LVL 2

Assisted Solution

by:Jim_Nim
Jim_Nim earned 166 total points
ID: 40589924
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
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 40589988
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
 
LVL 118

Assisted Solution

by:Andrew Hancock (VMware vExpert / EE MVE)
Andrew Hancock (VMware vExpert / EE MVE) earned 251 total points
ID: 40590012
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
 
LVL 2

Expert Comment

by:Jim_Nim
ID: 40591241
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
 
LVL 7

Author Comment

by:Senior IT System Engineer
ID: 40592823
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

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now