Solved

Resize existing DataStore in VMWare

Posted on 2014-04-21
30
629 Views
Last Modified: 2014-04-23
DataStore2Hi,
 
 I have DataStore2 with 1.82TB (as seen on the screenshot above) and like to reduce the size to 1.4TB so that I can create DataStore3 with 500GB.
 Can I resize existing datastore on the fly or should I delete it and create new DataStore2 with 1.4TB?
0
Comment
Question by:sglee
  • 17
  • 13
30 Comments
 
LVL 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 320 total points
ID: 40013618
You can increase the size of a datastore on the fly.

BUT you cannot decrease the size of the datastore.

(without advanced partition utilities!).

It will be quicker for you to delete the Datastore2, and re-create at the correct size, at 1.4TB and 500GB.

You will not see any performance gain, as the Datastores, will be on the same set of spindles. (same local dell disk!)
0
 

Author Comment

by:sglee
ID: 40013629
DataStore2 used as E Drive in SBS2011 VMSBS2011 Virtual Machine Settings - Hard Drive 1SBS2011 Virtual Machine Settings - Hard Drive 2The DataStore2 is currently used by a Virtual Machine that is running SBS2011 as E Drive as seen in the screenshot above.
C drive is on DataStore1.
If I click [remove] in order to remove DataStore2 from SBS2011 VM Editing Settings window, will it simply remove E drive, leaving C drive intact right?
0
 
LVL 117
ID: 40013645
Correct, if you select Delete and Remove from Disk, it will remove the virtual disk (E:) which is located on Datastore2.

It will not affect the virtual disk (C:) location on Datastore1.

Make sure you do not need anything on the E: because virtual disks (vmdks) cannot be easily recovered when deleted.

Just as an aside, both those virtual disks have snapshots, Snapshots are bad, performance is poor.

So just a reminder, and you should not really have Production machines running on Snapshots for longer than 2 days!

Please Read my EE Article

HOW TO: VMware Snapshots :- Be Patient

This will not affect what you want to do!
0
 

Author Comment

by:sglee
ID: 40013651
I have backed up everything from the virtual disk E Drive already.
I just wanted to make sure that my SBS2011 will start without the E drive. After all it is the most important VM in the system.
0
 
LVL 117
ID: 40013658
Provided, that E: has not been configured as the OS Disk, Pagefile, or any other OS related functions.
0
 

Author Comment

by:sglee
ID: 40013661
Correct. Everything runs from C Drive including Paging file.
Just in case, I will do a complete SBS2011 Server Backup tonight on an external HD before removing E drive. I will post the result tomorrow.
0
 
LVL 117
ID: 40013668
It's always best to Backup Production Servers before any changes made, if you follow good Service Management Practices!
0
 

Author Comment

by:sglee
ID: 40014299
Error when removing DataStore2When I clicked [Remove] button, I get an error shown above.
0
 
LVL 117
ID: 40014322
You will need to remove the snapshots, and try again.

why does the VM have snapshots?

is the VM being backed up by an Applicance, e.g. Veeam or VDP etc
0
 

Author Comment

by:sglee
ID: 40014394
I am not familiar with snapshots at all.
I remember installing VM Backup software "AKIVO" trial verson, but not sure if I ever successfully set that up.

I have  WIN71 and WIN72 VMs (please see the screenshot in my original posting) also on DataStore2 and I was able to remove DataStore2 from both VMs successfully.
0
 

Author Comment

by:sglee
ID: 40014418
I just checked the VM "Backup" (on the screenshot in my original posting) and confirmed that I have installed a trial version of NAKIVO backup software and set up a backup job to back up all VMs from the host and apparently never been successful for the reason that I don't recall.

How does existing backup job affect the removal of Datastore from a VM and how can I take care of this problem?
0
 
LVL 117
ID: 40014421
The issue you are having is the removal of a virtual disk (vmdk) because it has a snapshot.

Snapshots are created by Backup Programs. e.g. NAKIVO

Unless you have manually created a snapshot.

I think you are getting datastores and virtual disks confused.

Virtual disks (vmdks) are stored on datastores.

You are not removing a datastore from the VM, you are removing a virtual disk (vmdk), which is stored on the datastore.

What is the full error message you are getting when you try to remove the disk.

Also remove the snapshots, select Snapshot Manager DELETE ALL!
0
 

Author Comment

by:sglee
ID: 40014476
The full error message is "Cannot remove virtual disk from the virtual machine because it or one of its parent disks is part of a snapshot of the virtual machine."
0
 
LVL 117
ID: 40014523
Yes, I thought as much.

You need to resolve the snapshot issue on the virtual machine disk.
0
 

Author Comment

by:sglee
ID: 40014531
SnapShot Manager for WIN71 and WIN72SnapShot Manager for SBS2011As you can see, Win71 and Win72 VMs did not have any snapshots created whereas SBS2011 VM does not snapshot apparently created by NAKIVO backup software.
If I click [Delete All], it will not affect the operation of SBS2011 VM?
0
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!

 
LVL 117
ID: 40014534
Deleting Snapshots should not affect VMs, but sometimes performance of the VM can be affected, whilst the snapshot is being deleted. (an hence, if the VM is busy - best down out of hours, or when quiet!).

Also ensure, you have enough datastore space for the deletion, also check the size of the snapshot, snapshot deletion could take, seconds, minutes, hours or days to complete based on size of snapshot, speed of storage datastore.

it's likely to stick (hang) at 95% , Be Patient, and Wait, do not cancel, restart VM, walk away and get a coffee, messing or cancelling with Snapshots will result in a corrupted VM disk.

Be Patient on deletion......

it will finish and merge eventually, once you've started the process, you cannot abort it.
0
 

Author Comment

by:sglee
ID: 40014543
OK. It is getting too close to the start of work hours (8AM), so let me do this tonight after everyone is gone home.

Let me ask you this. Why is it necessary to remove the snapshot first before I can remove hard disk2 (from the screenshot for SBS2011 Virtual Machine Settings - Hard Drive 2)?
0
 
LVL 117
ID: 40014548
Because virtual disks, with snapshots are not transportable.

and it will not let you remove the disk, because it has a snapshot attached.
0
 

Author Comment

by:sglee
ID: 40014552
Thanks for the information. I will keep you posted this evening.
0
 
LVL 117
ID: 40014560
No problems, Be Patient, when deleting the snapshot!
0
 

Author Comment

by:sglee
ID: 40014581
ok
0
 

Author Comment

by:sglee
ID: 40018962
DataStore2 RemovalDataStore2 Removal WarningDataStore2 Removal ErrorDataStore2 as E Drive in SBS2011 VMSBS2011 VM - CompMgmtAndy,
I successfully deleted the snapshot from SBS2011 VM. Then I selected DataStore2, right clicked, clicked "Delete", but I get an error like above.
(1) Is that because I needed to unmount first? or
(2) I need to go to SBS2011 VM (where the datastore2 is being used as E drive), run compmgmt.msc, and remove that partition first?

What are the steps to follow in order to delete the datastore2?
0
 
LVL 117
ID: 40018975
You need to unmount first, but also are you using VMware HA, because there looks like a VMware HA error, because it uses the datastores!

Also you may want to inspect the datastore from Datastore Browser and/or SSH/console and check for any files and folders (e.g. vmdks or vmx files!)

But that looks like a HA file lock.
0
 

Author Comment

by:sglee
ID: 40018987
vmx and vmdk files"Also you may want to inspect the datastore from Datastore Browser and/or SSH/console and check for any files and folders (e.g. vmdks or vmx files!)" --->

I created two more VMs - Win71 and Win72 on Datastore2 and I backed up all the files that belong to Win71 & Win72 into the local hard drive so that I can copy them back later once I create a new datastore.

So go ahead and unmounts & delete?
0
 
LVL 117
ID: 40018992
If you are sure, you do not need any of the files.

But you didn't answer are you using VMware HA?

because the error message stating cannot delete datastore, suggests you are using VMware HA, do you have a cluster with VMware HA enabled?
0
 

Author Comment

by:sglee
ID: 40018995
What is VMware HA?
I don't have a cluster. It is only VMware box on the network.
0
 

Author Comment

by:sglee
ID: 40019050
It is done and this is what I did:
(1) Removed DataStore2 from SBS2011 VM. It was successful because I removed "snapshot" from this VM.
(2) Then I deleted Win71 and Win72. (I backed up all the files that belong to these VMs on a local HD)
(3) I selected "UnMount" and selected "Delete".
0
 

Author Comment

by:sglee
ID: 40019066
Andy,
 
 Let me ask another question. If you prefer, I can close this and open a new question. Just let me know.
  Anyhow I created new datastore2 with 1.33TB (out of total 1.89TB) thinking I can create another datastore like datastore3 with 500GB of space.
  But when I tried to created 3rd datastore, I did not see any hard drive available.
  My plan was to assign datastore2 to SBS2011 VM as E drive and using datastore3, I was going to create more virtual machines down the road.
0
 
LVL 117
ID: 40019093
Please post a new question, to deal with this new issue.
0
 

Author Comment

by:sglee
ID: 40019095
will do.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:

706 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

15 Experts available now in Live!

Get 1:1 Help Now