Solved

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

Posted on 2015-02-03
14
364 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 117

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 117

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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 117
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 117

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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

708 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

17 Experts available now in Live!

Get 1:1 Help Now