VMware Cloud Community
devicemanager
Contributor
Contributor

iSCSI and Adding In New Storage

Hi Guys,

I just added a new server loaded with Windows Server 2012 R2 Storage Server with iSCSI features installed.  I have 2 servers in a datacenter/cluster with vSphere Replication running.  I want to add the new Storage Server into the mix as the master datastore and use vMotion between the two hosts.

The Storage Server has 2 drives on it, one that is 1 TB and the other that is 2 TB.  I want to place the VM files into these locations.

So far I have been working with one host.  I created the iSCSI storage adapter and all seems well on that front.  Now I don't know what to do next.  I went down the avenue about adding the datastore but it bombed out on me.  Is there any documentation on adding this in?  Currently I want to add the d drive in.  Thank you.

0 Kudos
21 Replies
RyanH84
Expert
Expert

Hi,

You'll need the following (in brief):

1) Install iSCSI Server Target windows feature

2) Create iSCSI virtual disk (From your existing drive)

3) Create an iSCSI target and assign it an initiator

4) Assign the iSCSI virtual disk to your iSCSI target.

5) Configure an iSCSI software (assuming) initiator in vSphere (enable it, add new iSCSI target address (2012 server) and rescan HBA).

How far are you in that list? Have you done it all?

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

Well I am not too sure I did this correctly but here's what I have configured.

I made 2 virtual disks, one for the 1 TB of space and another for the 2 TB of space.  I connected one server to the 1 TB and the other to the 2 TB.  I'm not sure I wanted to do it this way.  From my understanding of iSCSI these 2 locations will not be seen from each host.  Should both hosts connect on the same initiators iqn?

Either way one host is connected to one target and the other host is connected to the other target.  I know this because on the storage server it shows virtual disk and targets as connected.

I believe I would need help with step 5 in this case.  But I would be curious is I should have both servers connected to each virtual disk/target as well?

0 Kudos
RyanH84
Expert
Expert

Hi,

If you want to configure a shared data store that both servers can see for then you are best off creating one iSCSI target on your 2012 host and assigning it one one initiator, then add both of your iSCSI disks to this one iSCSI target. It would make it easier to manage that way.

Unless you have a good reason to split things off and then mask LUNs from particular servers you want to keep things as straightforward as possible. In a simplistic scenario:

Server 2012 IP - 10.10.10.10

ESXi Host 1 IP :  10.10.10.20

ESXi Host 2 IP:  10.10.10.30

Both ESXi servers need a VMkernel with an IP address on your storage network. You then configure your iSCSI Software initator to use dynamic discovery  on each ESXi host and point at the IP address of your iSCSI (2012) server. There is plenty more to do with this, including networking considerations for uplinks, multipathing and port binding but the above is a very basic "get it working" kind of test.


I found this blog which is great at explaining the setup, but using powershell. He then talks about adding his iSCSI virtual disks into VMware in a following post. It might be worth having a look into it to see where you might need to go next with your configuration. With limited information it's a little hard to try and assist.

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

My main concern would be that the vMotion works properly between the host.  I would need to use the 3 TB of space or close to it for the vmfiles so I will be straddling the 2 virtual disks. So would there be any down side to having different iSCSI connections for each virtual disk?

0 Kudos
RyanH84
Expert
Expert

Hi,not that I can think of immediately, it just adds complexity to your storage configuration which could probably be made a bit easier. As long as both hosts can see both disks on either iSCSI connection than that should be alright.

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

I hear ya, I'll make a single connection for both servers to use.  So my next step would be to add the datastores in?

0 Kudos
RyanH84
Expert
Expert

Yeah I think once you are presenting the storage from the 2012 server you should be able to add the datastores in by configuring each hosts iSCSI adapter. Definatley take a look at the blog I mentioned as he gives a good description of enabling software iSCSI, setting up iSCSI vmkernel interfaces and binding them to uplinks on your storage network.


Once this is done and your hosts can see the storage, you can turn the iSCSI LUN's into datastores!

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

Ok I got the iSCSI set up but need some advice moving forward.  Here is my setup...

I have the 2 host servers as you know and the storage server with 2 volumes of hard drive space.

I created an iSCSI connection from each host so that they can see both volumes.  I will have vm's for the organization running on both.

I would like to use vMotion between the host in the case of a failure.

What would be the best approach in creating the datastore to move the vm's into.  From what I've collected creating a new datastore at the datacenter would work.  When I attempt to run it thru, I have to chose the host and then the disk/LUN, both disks are there.

Do I add both disks to each host?  Then begin to move the vm's?  Thank you for all your help this far.

0 Kudos
RyanH84
Expert
Expert

No problems with the help, it's all a pleasure.

Yeah, you are literally at the final stage now. If the disks are in the same data center and cluster, when you follow through and create your VMFS 5 data store from the LUN, it will appear on the host and after a short time it will also appear on the other host automatically. No matter which host you follow through the process on, you it will automatically refresh and see the data store once it is formatted on either.

Then, when you go into your datastores view and select the hosts tab, you will see both hosts connected to it and mounted. You should then be able to vMotion any VM's between these datastores, using either of your hosts to run them.


Let me know if you need any more help!

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
devicemanager
Contributor
Contributor

That's what I thought too but when I go to add the datastore while under the datacenter tree in vCenter, it asks me to select a host in which I want the disks to be viewable.  I thought I would be able to add both hosts but I cant.  You said it would be viewable shortly after on both servers.  I'm just making sure.

0 Kudos
RyanH84
Expert
Expert

Hi,

If you click on a host within vCenter and then go to configuration tab and then storage and then "add storage". If you follow the menu through on "Disk/LUN" you should see the two iSCSI disks presented to the host.

If you cancel that out and then go and look at the other host and perform the same process, you should be able to see that the host can also see the same LUNs.

From what you describe, it sounds like both hosts can't see all stoage that you've provisioned and that's why you can't select all hosts.

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

Yes, that is correct.  Both hosts can see the storage.  So what am I missing, do I just migrate the servers over - when I try to change the datastore I just see the local one and not the newly created.

0 Kudos
RyanH84
Expert
Expert

If you add the storage via the Host menu I described, the Datastore should appear and then vCenter should force a rescan on all of your hosts and both hosts should be linked to it. If you repeat that for both LUNS that's job done.


Are you at that stage? If that is done then you should be able to start migrating VM's into the data stores and hosting them on either ESXi box.

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
devicemanager
Contributor
Contributor

Ok great, I did it thru vCenter web client and added the new disks in - sure enough like you said they are both there now.  Great!

But before I move anything this is how I've been running up until this point.

We are a small organization maybe 5 vm servers, 1 vCenter Server and been running vSphere Replication.  I had performance problems with slow server drives (all vm's were running locally on each host) so I moved half to one host and the rest to the other.  The vSphere Replication replicated the servers from host a to host b and replicated the servers from host b to host a.  you can see why I need the shared storage desperately here.

So I plan to disable the vSphere replication and rely on vMotion.  Do I move all the machines to one host and leave the vm files on the storage or is it ok to leave them split between hosts as they are now and just change their respective datastore to the new disks...

0 Kudos
RyanH84
Expert
Expert

We are slowly getting there! Nice job.

Well, in this situation you have had VM's running on local disk and rightly so replicating them across to your other host for data redundancy.

With both hosts in a vCenter cluster utilising shared storage you can turn on HA, which, in the event of hardware failure will automatically restart your VM's on the other host. With DRS, if you power on all of your VM's from scratch it will automatically place the VM's evenly throughout your hosts and ensure neither host is running low on resources if it gets busy.

With replication, you were also taking a semi-backup copy of the VM's by replicating them from A to B (local host datastores). I would setup your environment to use all of your shared storage and place the VM's evenly on each datastore and host. I would consider keeping replication for your jobs though, perhaps keep a replication job to run the copy into the hosts local disk. That way in the event of storage failure you can go back to your old solution of local copy temporarily.

If you've got no backup system in place for keeping your VM (such as Veeam), then make sure you have you're replication set to keep as previous versions and such for as far back as you can allow.


Does this help?

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

Yes and Thank You very much and I appreciate your insight.

The vSphere Replication will work if I move the vmfiles to the new disks, wow that's pretty awesome!

Ok so I will just change the datastore and move those servers over.  If vMotion is enabled I should be able to do this while they are in production correct or is this type of move a different story?

0 Kudos
RyanH84
Expert
Expert

Yep that is correct! As long as you have configured vMotion correctly in terms of networking then you can vMotion or Storage vMotion (shared only) VM's at any time, even if they are in production. This is the main functionality of DRS which watches if a host is over committed on CPU/Memory and automatically (depending on your settings) moves a VM over to another host for you. (Assuming vCenter licensing levels here)

Please don't forget to mark this post as answered if it has been useful to you!

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos
devicemanager
Contributor
Contributor

Well it looks like I have everything set up correctly.  I am changing the datastores as we speak and all systems are live and running.  Does this mean if I lose a host my system will stay up and running?  Is there some way to check to be sure?

0 Kudos
RyanH84
Expert
Expert

If you can now migrate everything between hosts and you have HA enabled on the cluster, if one of your physical servers die - the VM that lives on it will automatically get restarted on the other host. There will be a small outage but it will be minor.


You should definitely check out further reading on HA/DRS! It's interesting stuff and essential to know if you are managing a vCenter.


Again, if  you don't mind, please mark this thread as answered!

------------------------------------------------------------------------------------------------------------------------------------------------- Regards, Ryan vExpert, VCP5, VCAP5-DCA, MCITP, VCE-CIAE, NPP4 @vRyanH http://vRyan.co.uk
0 Kudos