Friday, January 02, 2015

Zeroing out Free Space on Nimble Storage to Reallocate to other VM's


It is an inevitable fact that over time data grows.  Even when quotas for mailboxes and file shares are set, data still grows.  From operating system updates, to event and transaction logs, to database applications, data rarely ever shrinks.  Luckily, storage is now cheaper than ever, both locally and in the cloud.  However, aside from expanding storage by adding new drives or increasing a cloud plan, zeroing out all free space for reallocation utilizes existing storage.  Zeroing out free space allows the SAN to compress and reallocate unused storage to existing or newly created virtual machines.

Here are some examples of when zeroing out free space is useful:
  1. Any time data is moved from one location to another. When data is moved temporarily from one server to another on its way to its final location, say while building a new server, it ends up using twice the storage.  After the data is deleted off the temporary location, the data is still written on the disk so compression of the space is minimal.  Zeroing out this space allows it to be compressed so it can be reclaimed for use elsewhere.
  2. When logs are reduced.  Event logs in Windows, database transaction logs, and other application logs often have configurable settings.  These settings often allow a maximum size of storage or number of days to record to be set for the logs.  If the maximum is configured or is reduced, the space no longer used by logs can be reclaimed.
  3. Data actually shrinks.  Although uncommon, there are rare times when applications require less space.  For instance, if software used by two different departments, like development and admissions, gets broken down into two pieces of software each software will require less space.  Once the data no longer needed is migrated off the old software, zeroing out the free space will allow it to be reused elsewhere.



The steps below show how to zero out free space for Windows servers running on VMware with a Nimble backend storage solution.
  1. Zero out free space on the Windows Server using SDelete.
    1. If SDelete is not on the server, download it from Microsoft.
    2. Open a command prompt.
    3. Navigate to the location of the SDelete software.
    4. Run SDelete on the drive to free space on "sdelete -z c:"


  2. Zero out free space in VMware using vmkfstools.
    1. Create an SSH session to the VM host.  Be sure to connect to the host with the VMFS datastore where the Windows VM is located.
    2. Navigate to the /vmfs/volumes folder.
    3. Run "vmkfstools -y datastore name" for each VMFS datastore volume

    Example:
    /vmfs/volumes #vmkfstools -y Eyonic-Nimble-2

    Results:
    Try to unmap 3421002 blocks in units of 200 blocks from volume Eyonic-Nimble-2

    Async unmapped 3533732 blocks from volume Eyonic-Nimble-2

  3. Monitor free space on the Nimble storage solution.
    1. Log into the web based management interface on the Nimble device, the dashboard will show the current space usage.
    2. To view historical space usage go to the Monitor menu, and click on Space.

The graphic from the Nimble shows the reclaimed storage.  A large portion of free space has been recaptured because all of the zeroed out free space is now compressed.  Nimble storage devices compress space automatically so there is nothing more to do once the free space has been zeroed out on the Windows Server and in VMware.

Zeroing out free space can be done at any time and in many instances can help free up unused storage space.  This newly reclaimed storage space can be reallocated for other thin provisioned virtual machines.  Eventually most storage devices will need additional space, however, zeroing out the free space periodically will increase the longevity of the existing storage.

No comments:

Post a Comment