VMware Cloud Community
sweetmail
Contributor
Contributor
Jump to solution

moving VM from one LUN to another LUN

I am running vCenter 4.0 and 4 ESX 4.0 U2

I need to rearrange all my VM to take care of the free space issue on the LUN level. We are having VM running out of space problem because we did not know that we should not create a 18G datastorage for a VM with 1G of memory in a 20G LUN Smiley Happy

Our goal is to move all the VM in one of the 500G LUN with at least 20% free space on the LUN for all the vswap and log files and snapshots and such.

Here is what I am envisioning I am going to do or need to do.

1) SAN admin will provide me with a new 500G LUN (new_lun)

2) I will present this new_lun to the 4 ESX hosts

3) Then I will need to remove those empty LUN (orig_lun) from all 4 ESX hosts back to the SAN admin. I have read many posts on the problems of removing LUN from hosts, e.g. all-path-down when one LUN is removed and causing all hosts cannot see all the other LUNs. any advise on that?

4) go back to step 1 until all the datastore is in one of the 500G LUN with at least 20% free space

Now, I am thinking of using vCenter Converter to accomplish this tast. Questions:

1)I have no intention to rename the VM or move the VM to a different host in the Cluster or change its' IP. My question is, can the vCenter converter allows me to just move the VM from one LUN to another LUN?

2) Some of my vmdk need to have a different block size because they are at 256G with block size set to 1M at the moment. That means when they are being moved, I need to create a new vmdk with a new block size (e.g. 2) and then move the data across.

3) Most of my VMs have at least 2 drives and each of the drive has its own LUN. e.g. VM_A has a Drive C (20G), which is on LUN_C and a Drive E (40G) which is on LUN_E. LUN_C and LUN_E are 2 totally separate LUNs. Now, when I try to move these LUN_C and LUN_E to the new_lun (which is 500G), will the vCenter converter make a 60G vmdk or one 20G vmdk and one 40G vmdk under the folder VM_A (if I can still call it VM_A) when I am using the vCenter convector?

Thank you in advance.

0 Kudos
1 Solution

Accepted Solutions
mittim12
Immortal
Immortal
Jump to solution

Since the block size is set when you create the datastore you would have to move all VM's to a different datastore, delete the datastore you want to change the block size on, and create a new one with the correct block size.






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

View solution in original post

0 Kudos
12 Replies
FranckRookie
Leadership
Leadership
Jump to solution

Hi Sweetmail,

Why not using a simple Storage vMotion to move your VMs to the new datastores? Or move them if you can shut them down for a short period? You can also clone them if you want to keep a copy, in case...

Regards

Franck

mittim12
Immortal
Immortal
Jump to solution

1: You should be able to do this.

2: The block size is set on the datastore not the vmdk. Just make sure the datastore you are moving to has a block size larg enough to handle the vmdk.

3: Converter may let you do this but you may need to go into the advanced tab and change some things around.

As the other poster said you can also you storage vmtotion if you are the appropriate license level or a cold migration. Here is a KB for removing a lun containing a datastore from vSphere 4.0. http://kb.vmware.com/kb/1015084






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

sweetmail
Contributor
Contributor
Jump to solution

thank you!

Each datastore is a LUN all by itself. When I need to change the block size of the datastore and on a new LUN, is converter the only way to go?

What is the best practice to remove a LUN from all the ESX hosts?

Thanks

0 Kudos
mittim12
Immortal
Immortal
Jump to solution

You can not change the block size after the datastore has been created. So converter does not help with that.

Sent from my iPhone

0 Kudos
sweetmail
Contributor
Contributor
Jump to solution

What method do I need to use then? To change a block size.

Thanks

0 Kudos
mittim12
Immortal
Immortal
Jump to solution

Since the block size is set when you create the datastore you would have to move all VM's to a different datastore, delete the datastore you want to change the block size on, and create a new one with the correct block size.






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
sweetmail
Contributor
Contributor
Jump to solution

OK! thank you so much. Actually, that was my plan to move all VM to a different datastore and then create a new datastore in the 500G with 2M block size.

Now, after I did that, I can just vstorage the vm back to the new datastore?

What is the best practise to remove a LUN from the host.

Thanks

0 Kudos
mittim12
Immortal
Immortal
Jump to solution

Yes, after you have created the new datastore you can move everything back. The article I linked above gives the steps how to remove the LUN from host. To be honest most of the time I just delete the empty datastore from the host, rescan all the host that it was presented to, and then remove it from the storage group on the SAN






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
sweetmail
Contributor
Contributor
Jump to solution

thank you much Smiley Happy

0 Kudos
sweetmail
Contributor
Contributor
Jump to solution

Since the SAN admin is going to provide me with new LUN to work with, that mean I can set the 2M block size on the LUN to begin with.

Now, if I use vStorage vMotion to move my VM, here is my queston

1) can I increase the size of the drive? The vmdk disk that is.

2) Most of my VM has at least 2 drives which are in their own data storage right now. Can I move one data storage at a time and keep the VM up and running? and can I also change the vmdk size if I want to during the vStorage VMotion?

Thanks

0 Kudos
mittim12
Immortal
Immortal
Jump to solution

You can not change the size of the drive during the sVmotion but that's something that can easily be done after the fact. You should also be able to do the drives one at a time. When you get to the select datastore portion of the svmotion hit te advanced button and pick the one you want to move.






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

0 Kudos
sweetmail
Contributor
Contributor
Jump to solution

thank you mittim 12

0 Kudos