Link to home
Start Free TrialLog in
Avatar of svillardi
svillardi

asked on

Shrink one drive in large VM (vsphere 5.5)

Hi Experts,

I have a Win2008 server which is about 2.5 TB.  One of my drives is about 500GB oversized, accidentally.  I want to shrink the drive so I have more space to allocate to another archive drive  -- all coming from the same SAN.

I was trying VMware Converter but the conversion is taking days.  Since the server is in use, this is making no sense as the data will be 7 days old by the time its finished.

Is there a way I can migrate just one drive rather than the whole VM to speed up the process?

Thanks!
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Is this already a VM?  If so you could just use VMconverter for just the base system and the C drive...once it's done, you could detach the other drives from the old vm and attach them to the new one and you'll have everything current.
Hi,
as Black Flag mentioned above, you can migrate just one drive with vmware converter.
At the last step before launching the migration you will have the option to choose which drive to migrate/convert.

In my actual version of vmware converter (5.0.1), which is already rather old, I also have an option (also at the last step of converter) to synchronise the changes after a first migration pass. I did not test this option yet but I think you could look if it is interesting for you or not.
Avatar of svillardi
svillardi

ASKER

Well, I tried converter and spotted the option to choose just the drive I wanted to resize but the job got stuck, several times.  I am trying a robocopy, but that's not going so well either.
Hi again,
By the way svillardi, you did not answer Black Flag's relevant question : your server is a VM, or not ?
And another thing, it could be of use to give us info about your VM's drives (I am assuming here that your oversized drive is not your system drive, and that you have only these 2 drives, 1 system and 1 data).

if it is a VM, and assuming you can power it down "a little", one method could be the one I describe below, but note that you will have to create a new VM, and at the end delete the actual one :

1) create a new VM that will replace the actual one ; don't give or create any disk to this VM

2) shut down the actual VM

3) clone the VM system drive vmdk with this KB http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1027876, then power back on your actual VM
Clone the vmdk giving it the name of the new VM, for example VM001.vmdk

4) move the vmdk system drive you just have cloned in this new VM's folder (vmdk and flat.vmdk files) ; attach this vmdk system drive to this new VM, editing its settings

5) the data migration part : create a new vmdk for your new vm, with the size you want (well, in fact, the actual volume of your production VM data drive minus 500GB if I understand correctly) ; then copy your data from the actual production VM to the new one (robocopy or another data migration tool)

6) when you are ready, stop the production on the actual VM, make a last pass of robocopy, and you're done ; you can shut down the old VM and work with the new one.


I tested it, it works, and I manage to have a fine new VM (with clean naming of folder, vm and vmdk files).
You will have to deal with the Microsoft domain when you have both VM, old and new, with same name/ip, and want to migrate your data. But it was not the more difficult part.
Also you will have to set again your ip parameters on the new VM as the network card is recreated during the process.

You can also clone the system drive while VM is powered on, snapshoting it before, but this is not my advice.
SOLUTION
Avatar of svillardi
svillardi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mr Tortur,

If the drive letters are being switched, doesn't the shares remain?

 S.....
Hi Svillardi,
Sorry for the delay. I would say no the shares will not remain, because robocopy does not "migrate" that. There is a small chance, yes, as you try to guess, that after migrating your data, if you delete the old data drive, and reboot the vm (or just lanmanserver service restart, see the link below, at the bottom) with the new data drive having the original data drive letter, that shares work. But I would not do that at the last time without testing if I were you.
If not working, there are several method to migrate your shares, including using another tool than robocopy, but I think it will surely not be free.
I remember there was a registry key you can use to recreate shares easily, depending on your OS version. Well, according to this one it is more difficult for 2008 first release, but not for 2008R2 :
http://blog.dabasinskas.net/migrating-shares-to-a-different-drive-on-various-windows-server-versions/ 
I don't know what is yours.
I was looking for a faster alternative, but I wasn't comfortable with the solutions provided.  So I went back to robocopy.