Platinum Sponsors
Archives

Save & Optimise Virtual Disk Storage for FREE.

Save & Optimise Virtual Disk Storage for FREE.

This article demonstrates a FREE way of saving/optimising Virtual Disk storage space using software which is freely available. Include is :1. How to report which disks are over-allocated using our very own free vdisk waste finder application from here > Vdisk Waste Finder (6918 downloads)
2. How to resize over-allocated vdisks using a free open source application called “gparted
3. How to align the vdisk including system disks to a 64k start sector. This increases performance and reduces disk latency using a free open source application called “gparted”So to get started first of all download all the software by clicking on the application names above./Disclaimer:  Virtualizeplanet will not be liable if anything was to go wrong whilst performing the following operations. Do at your own risk and we will not be responsible for data loss or down time./
How to report which disks are over-allocated.

Update on this post, watch how to do this found > here <

Firstly use Vdisk Waste Finder by pointing the application to your ESX server or vCenter server, providing credentials, specifying the percentage of free space you want to look for and then clicking go.
You will then be presented with a list of VMs and their disk details. On the far right you will see a column titled “Wasted Disk”. Any disk that is noted as “Needs Resize” falls under the allowed free space and you could consider this drive a candidate for a resize..

VWF Click Picture to make larger

How to resize over-allocated vdisks.

Secondly Add a vdisk to the candidate VM of the new optimal size using the VI client.
Now booting from the Gparted live-cd iso image it’s easy to resize the partition of a disk.  Right click on the drive you want to resize then click Resize/Move from the menu:

gpartedClick Picture to make larger

Then resize the original drive to the same size as the newly add drive:

gpartedClick Picture to make larger
Next you’ll have to click on “Apply All Operations”
Next right click the drive and select copy.
Now select the new drive, right-click and select paste. Before you can paste you will be prompted to initiate a partition table make sure you do this but no need to create a partition or format it.
Next you’ll have to click on “Apply All Operations”
This will now copy the data from the old drive to the new disk.
Now the newly created drive right-click and select manage-flags.
Make sure the boot flag is selected or the VM won’t boot.

GpartedClick Picture to make larger

In the VI client back in the settings of VM remove the old drive.

Job done.

How to align the vdisk including system disks to a 64k start sector.

The idea here is to make sure your partition starts on a sector number derivable by 64, so for example 64 or 128 or 256. This will increase your VM disk performance and reduce latency.
This issue is fully described in the following vmware document:
http://www.vmware.com/pdf/esx3_partition_align.pdf

New update and “how to” video found >HERE<

Follow these steps:
Again boot the system with the Gparted live CD.
Right-click the parition select move/resize
Shrink the partition by 10 MBs
Move the partition to right by a few MB’s to free up space at the begining of the disk.
Next you’ll have to click on “Apply All Operations”
When finished  exit Gparted, not the entire live CD, just the Gparted application (so don’t reboot)
Start the terminal window
At command prompt type ‘parted /dev/sda’ (substitute your actual device here) to start the command line parted editor
Create a new partition at the start of the disk to fill in the space up to the section where you want to align your parition.  For example, if you want your system partition to start at sector 128, create a very small partition that takes up space from sectors 63-127.  For example using the command:
>mkpart primary 63s 127s

parted will create a new primary partition from sector 63 to sector 127.  That means the very next sector available is 128.
Exit parted and restart the Gparted GUI by clicking the Gparted icon.
Use the move/resize option to resize the partition to fill the entire remaining space.  Make sure you have the MUST uncheck the “Round to Cylinders” option selected.
Next you’ll have to click on “Apply All Operations”

Job Done.

Your partition should now start on an optimized sector

Gparted Click Picture to make larger

But how do you find misaligned disks in the first place? Click >HERE < to find out

Last Updated ( Mar 07, 2010 at 03:47 PM )

Leave a Reply

Gold Sponsors
Silver Sponsor