iSCSI

...now browsing by category

 

iSCSI target on Windows Server 2012? Why not!

poniedziałek, Listopad 26th, 2012

I have recently described how to install, configure and use iSCSI target on FreeNAS virtual server. This time let’s have a look how to present an iSCSI target on Windows Server 2012.

iSCSI target is a service role of File and Storage Services. Go to Add Roles and Features and expand File and Storage Services > File and iSCSI Services and select iSCSI Target Server.

Click Next and finish the role installation. No configuration is needed during the installation.

When installed open Server manager’s dashboard, click on File and Storage Services on the left and select iSCSI. On the right, click on Tasks menu and select New iSCSI Virtual Disk…

Create a new LUN... ekhm... virtual disk

Create a new LUN... ekhm... virtual disk

Select a location for your new virtual disk (a disk that will be presented under iSCSI target, you can call it a LUN if you want, Microsoft preferes to call it a virtual disk). Give it a meaningful name and choose a size.

Now we’ll create a new target:

Creating a new target

Creating a new target

Give it a name and add a server:

Click on Add...

Click on Add...

Select the method to identify the initiator. You can use IQN and a wildcard * as a value to allow all of them.

On the next screen you can enable CHAP if you want.

That’s it. You can now use the LUN presented by Windows Server 2012 as a datastore on your ESX server :-)

Definite guide to iSCSI with FreeNAS on ESX(i) – Part 4 – Configuring iSCSI on ESXi 5.1 (standard vswitch)

środa, Październik 31st, 2012

In this part of the guide we will have a look on iSCSI configuration under ESXi, in my example ESXi 5.1. The initial configuration of the host is very similar in what we saw in the previous part. There is one vSwitch and the host is equipped with 3 network interfaces.

Initial network configuration

Initial network configuration

Network interfaces (uplinks)

Network interfaces (uplinks)

Just like before we will first configure the networking part. Go to your host configuration and click on Configuration tab. Go to Networking. Click on Add Networking…

Selecting connection type for the new portgroup

Selecting connection type for the new portgroup

Select VMkernel as your connection type. You can notice that where in ESX we had 3 options to choose from (management, VMkernel, virtual machine networking), here in ESXi management networking has been merged into VMkernel stack which now is responsible for management, iSCSI connectivity, VMotion and FT logging. Select one of your NIC specifying to create a new vSwitch. Click Next.

Available uplinks

Available uplinks

Here you can see what I was talking about. Select what this VMkernel portgroup will be used for. We will use it for iSCSI traffic only (remember: traffic separation) so we don’t have to select anything. Give your portgroup a meaningful label and click Next.

Configuration for the new VMkernel port<br>

Configuration for the new VMkernel port

Insert a correct network configuration and click Next and then Finish.

IP network settings

IP network settings

The networking configuration is ready.

vSwitch for iSCSI configured

vSwitch for iSCSI configured

Click on Storage Adapters. if iSCSI Software Adapter is not installed, click on Add.. and install it.

Software iSCSI Adapter

Software iSCSI Adapter

Right click on the iSCSI Software Adapter and select Properties.

Software iSCSI Adapter properties

Software iSCSI Adapter properties

As you can see it is already enabled so no need to do it. Click on Dynamic Discovery tab and click on Add. Insert IP and port of your FreeNAS portal (check part 2 for FreeNAS installation and configuration guidance).

Dynamic Discovery

Dynamic Discovery

Click OK and Close. when asked to rescan the hba, select Yes. when everything went fine, you should see a device – a LUN presented on your FreeNAS server.

Presented LUN

Presented LUN

If you looked carefully during iSCSI Software Adapter configuration you might have noticed that there is an additional tab called Network Configuration.

Network configuration and port binding? Hm...

Network configuration and port binding? Hm...

However, we haven’t even touched it and the iSCSI storage seems to be working fine, so what’s the big deal? Well, imagine that you want (and usually you do) to use more than one NIC for iSCSI storage for multipathing and failover, you will need to bind vmknics (virtual adapters) to vmknics (physical) in 1:1 manner. Go back to Networking and click on vSwitch1 Properties. Click on Network Adapters tab and then on Add…

Adding some redundancy

Adding some redundancy

Select the unused vmnic, click Next twice and then Finish. Close vSwitch proprieties. Now our network configuration looks like this:

Second uplink added

Second uplink added

Now we will create another vmkernel portgroup on vSwitch1. The procedure is very similar to the first one except this time we add a new portgroup to the existing vSwitch. Click on vSwitch1 Properties and on Ports tab click on Add… Here’s the result:

2 uplinks, two vmkernel portgroups

2 uplinks, two vmkernel portgroups

Let’s go back to Storage Adapters and to Software iSCSI Adapter properties. Click on Network Configuration tab and click on Add…

VMkernel ports are not compliant

VMkernel ports are not compliant

Ops, there is no VMkernel adapter available except Management Network and if you select anything else you see the following message:
The selected physical network adapter is not associated with VMkernel with compliant teaming and failover policy.  VMkernel network adapter must have exactly one active uplink and no standby uplinks to be eligible for binding to the iSCSI HBA.

Why is that? That’s why. Basically, like I have mentioned before, you need to bind VMkernel port with physical uplinks (vmknics) 1:1 and if you go back to Configuration, Networking, click on vSwitch1 properties and then edit one of two VMkernel ports you will see (on NIC teaming tab) that each of them has got two NICs selected as active.

Two active uplinks for iSCSI vmkernel port? A no-no.

Two active uplinks for iSCSI vmkernel port? A no-no.

This is not a supported solution. what we need to do is to select Override switch failover order and mark one of the uplinks as unused. Then on the second VMkernel port we need to do the same, with another uplink of course.

That's better...

That's better...

Then go back to iSCSI Software Adapter’s properties, to Network configuration tab. Click on Add… and you will see both iSCSI VMkernel ports.

vmkernel ports are now compliant

vmkernel ports are now compliant

Add them both, you see they are compliant. If they are not, these are the possible reasons:

  • The VMkernel network adapter is not connected to an active physical network adapter or it is connected to
    more than one physical network adapter.
  • The VMkernel network adapter is connected to standby physical network adapters.
  • The active physical network adapter got changed.

If you’d like to know how to configure it from CLI, here’s your documentation.

Now if you right-click on the LUN presented by your FreeNAS and select Manage Paths… you will see that you can choose different path management policies for iSCSI storage.

Changing PSP for iSCSI storage is simple as that

Changing PSP for iSCSI storage is simple as that

Definite guide to iSCSI with FreeNAS on ESX(i) – Part 3 – Configuring iSCSI on ESX 3.5 (standard vswitch)

piątek, Październik 19th, 2012

This is Part 3 of the definite guide to iSCSI with FreeNAS on ESX(i). Make sure to check out the other parts as well.

1. Introduction
2. FreeNAS installation and configuration
3. Configuring iSCSI on ESX 3.5 (standard vswitch)
4. Configuring iSCSI on ESXi 5.1 (standard vswitch)
5. Configuring iSCSI on a distributed vswitch
6. Migrating iSCSI from a standard to a distributed vswitch

 

3. Configuring iSCSI on ESX 3.5 (standard vswitch)

Make sure your ESX server has got at least two NICs – if you’re doing this in the nested, virtual environment and you have created a virtual ESX with only one NIC, shut it down, add a new network card and start the server again. We will use one for management and the second for iSCSI configuration. You will probably want to use more NICs anyway (for VM traffic, VMotion, redundancy, etc.) but for this demonstration we will use only two NICs – vmnic0 (management) and vmnic1 (iSCSI).

After you have installed ESX 3.5, go to the Configuration tab and under Hardware click on Networking.  All you will see is one virtual switch (vSwitch0). First of all we will create a new vswitch for iSCSI traffic. In the upper-right corner click on ‘Add Networking…’.

Select VMkernel and click Next.

Select VMkernel

Select VMkernel

Select ‘Create a virtual switch’ (this option is available if you have at least one unassigned NIC) and select an uplink NIC to be used with your new vswitch. Click Next.

Adding an uplink tpo the vSwitch

Adding an uplink tpo the vSwitch

Now you will create a new portgroup on your new vswitch. Give it a meaningfull name (label) like ‘iSCSI’ for example. Configure VLAN (if necessary, if not – leave this field empty).

Setting IP configuration for VMkernel port

Setting IP configuration for VMkernel port

Click Next and then Finish. A new virtual switch called vSwitch1 is created.

New virtual switch

New virtual switch

Under Hardware click on Storage Adapters. And select iSCSI Software Adapter. Click on Properties.

Software iSCSI initiator

Software iSCSI initiator

The software initiator is disabled by default so click on Configure and enable it.

Enabling software adapter

Enabling software adapter

You will see the following message:

Service Console needs to be able to communicate with iSCSI storage too

Service Console needs to be able to communicate with iSCSI storage too

Here’s the thing – target’s discovery is done by the Service Console. That means that both ports: VMkernel (the one we created) and Service Console (already created on vSwitch0) must be able to communicate with iSCSI target (on the FreeNAS server). If you look on the screenshot above you will see that both Service Console and VMketnel port for IP storage are in the same subnet (as well as FreeNAS server of course) so they both will be able to communicate with the target. However, if your Service Console is in the different network (and it should be if it is a production environment in order to introduce traffic separation), you will need to create a second Service Console – on vSwitch1 – and assign it an IP address allowing it to discover the FreeNAS iSCSI target. In our case it is not necessary.

Let’s continue with the software initiator’s confiuration. Click on the Dynamic Discovery tab and click Add… Put the IP address and you configured on FreeNAS Target.

IP  and port of FreeNAS server iSCSI service (remember the portal in Part 2?)

IP and port of FreeNAS server iSCSI service (remember the portal in Part 2?)

You will be asked to rescan the HBAs. Click on Yes.

Rescan the host's HBAs

Rescan the host's HBAs

If all goes well, you will see the target device:

LUN presented on FreeNAS to ESX host

LUN presented on FreeNAS to ESX host

Now you can go on and create a new storage for ESX server on the LUN (VMFS or RDM).

Definite guide to iSCSI with FreeNAS on ESX(i) – Part 1 – Introduction

piątek, Październik 12th, 2012

This is Part 1 of the definite guide to iSCSI with FreeNAS on ESX(i). Make sure to check out the other parts as well.

1. Introduction
2. FreeNAS installation and configuration
3. Configuring iSCSI on ESX 3.5 (standard vswitch)
4. Configuring iSCSI on ESXi 5.1 (standard vswitch)
5. Configuring iSCSI on a distributed vswitch
6. Migrating iSCSI from a standard to a distributed vswitch

 

1. Introduction

Since many search queries on my blog lead to this article where I struggled with FreeNAS configuration on nested ESXi 5.0, I decided to write a guide how to configure FreeNAS to work with ESX and ESXi, both in „regular” and „nested” environment, on standard and distributed switches. By „nested” I mean ESX servers installed as virtual machines on a physical ESX(i) or on VMware Workstation.

iSCSI is configured on ESX and ESXi in slightly different manners so they will be covered separately. I would also like to show you how to configure iSCSI connection on a distributed virtual switch and how to migrate to a distributed vswitch a working connection from a standard vswitch.

When writing this article I assume that you’ve got:

  • basic understading of VI / vSphere netowrking concepts
  • working knowledge of vSphere client

Have fun reading this guide and please laeve me a comment or contact me directly if something’s not clear or if you have additional questions/issues/doubts.