≡ Menu

How to Manage Datastores from vSphere (VMWare ESXi 4 Storage Basics)

This article explains fundamentals of datastore management in VMWare ESXi server.

In this example, let us assume that we have a server that has 6 slots for hard disks. We’ve filled all the 6 slots with hard disks. We are also using the hardware raid. So, we have created three RAID-1 logical groups out of these 6 hard drives.

1. Create Datastores

If this is a brand new VMWare installation, you should first create datastores from your vSphere, as we explained in How to Add Datastore.

In this example, since we have 3 logical volume groups on the server (from the hardware RAID), let us create three datastores and name them the following:

  • datastore1
  • datastore2
  • datastore3

2. Display Storage Summary

If you already have an existing VMWare server, and if you like to see all the available storage on that system, login to vSphere, and following any one of the methods mentioned below.

Method 1: Click on the ip-address on the top left corner -> click on ‘Summary’ tab -> under resources tab, it will display the available datastores. You’ll see all the three datastores here.

Method 2: Click on the ip-address on the top left corner -> click on ‘Configuration’ tab -> Click on ‘Storage’ under ‘Hardware’ section -> it will display the available datastores. You’ll see all the three datastores here.

You can also browse datastore from any one of the above two methods. Right mouseclick and click browse datastore.

As you see from the above image, in this example:

  • datastore1 is 600GB capacity. Free space around 557GB
  • datastore2 is 600GB capacity. Free space around 397GB
  • datastore3 is 131GB capacity. Free space around 30GB

3. Assign datastore to a VM

If you’ve created a Virtual Machine from vSphere, you might want to add one of the existing datastores to the VM. Do this as we discussed earlier: How to Add Hard Disk to a VM.

4. What datastore is used by a VM?

Now you know how to create database, and how to view them, how to assign a datastore to a virtual machine.

If you’ve already added a hard disk to an VM (or) if you like to view what datastores are getting used by an existing VM, do the following:

Click on the virtual machine from the left side tree -> Click on ‘Summary’ tab -> under Resources section, you’ll see the datastores that are currently getting used by this particular VM.

The following example shows that this VM uses datastore3. The datastore3 itself has total of 131GB. But only 102GB from it is provisioned for this virtual machine.

5. Browse Datastores

You can also view the content of the datastores directly. Select any one of the datastores (either from the top level, or from the individual VM), right mouse-click, and select ‘Browse database’, which will display the following screen:

The following example shows all the files stored in the datastore3. From here you can do any one of the following activities:

  • Create a folder under this datastore
  • Upload a file
  • Download a file from the datastore to your local machine
  • Delete a file from the datastore
  • Move the file from one datastore to another location

The following example indicates that the datastore1 is empty:

Note: For most part, you don’t need to do anything here. VMWare automatically creates and maintains the files under the datastore.

6. Add more space to a VM

Let us the add more space to the VM that is shown under item#4 above.

This VM currently has only datastore3 with 120GB attached to it. Since the whole datastore1 is empty and available for us, let us assign 50GB from datastore1 to this VM.

Follow the method explained in how to add hard drive to a VM, but when you get to the following screen, select “Specify a datastore” (instead of “Store with the virtual machine” option). You also specify how much disk space you want to add from here. In this example, we are adding 50GB.

In this example, we are selecting datastore1. Eventhough datastore1 has around 550GB free in it, we’ll be using only 50GB from this.

After adding the new disk, if you go to the ‘Summary’ tab for that VM, you’ll now see that this is using two datastores. The total provisioned storage also increased as shown below.

Reboot the virtual machine, to see this newly added datastore. If you already had /dev/sda, this newly added space will be visible as /dev/sdb on your server. Partition this /dev/sdb, format it, and use it.

Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • Bob June 20, 2012, 8:03 am

    Thx a lot!

  • Q June 20, 2012, 8:40 am

    How many people have got that kind of memory ? How many have go that kind of processors ? 16 processors and hyperthreaded. You must be running some web hosting services. For the poor men around the planet whose only luxury is under the threat of “acts” originating from the country where you reside in, there must be simpler and far more effective solutions for managing data on whatever disks.

    Much of what sane and normal people store is movies, games, videos, etc. It would be nice if you write an article about building a media server or your very own customized no-sql databases. They would be fun and would expose us to a lot of internals of Linux and the tremendous power offered by every desktop , not only specialized or high end ones.

    The articles on RAID rely heavily on third party software and these articles turn out to be more of a HOW-TO. I and many others would appreciate if you would give a thought about common men and the services they run.

  • Joseph June 18, 2013, 3:53 pm

    Disregard the comment by “Q”
    I find this site to be very very useful and all to many plain websites out there. I am sure if he and the many others that he represents learn how to use google they can go elsewhere.

    Keep up the great work!