31
Using Oracle ZFS Storage Appliance iSCSI LUNs in a Microsoft Windows Server 2008 R2 Environment Configuration Guide ORACLE WHITE PAPER | APRIL 2014

Using Oracle ZFS Storage Appliance iSCSI LUNs in a Microsoft Windows … · 2 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT Introduction

  • Upload
    lelien

  • View
    231

  • Download
    1

Embed Size (px)

Citation preview

Using Oracle ZFS Storage Appliance iSCSI LUNs in a Microsoft Windows Server 2008 R2 Environment Configuration Guide O R A C L E W H I T E P A P E R | A P R I L 2 0 1 4

USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Table of Contents

Introduction 2

Enabling the Windows iSCSI Initiator 2

Configuring the Oracle ZFS Storage Appliance Using the Browser User Interface 6 Defining an iSCSI Target Group 6 Defining an iSCSI Initiator 9 Defining the iSCSI Initiator Group 10 Defining a ZFS Storage Appliance Project 11 Defining an Oracle ZFS Storage Appliance LUN 12

Configuring the Oracle ZFS Storage Appliance Using the Command Line Interface 14 Defining the iSCSI Target Group 14 Defining the iSCSI Initiator 16 Defining the iSCSI Initiator Group 17 Defining an Oracle ZFS Storage Appliance Project 17 Defining an Oracle ZFS Storage Appliance LUN 18

Configuring the LUN for Use by the Windows 2008 R2 Server 20

Conclusion 29

2 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Introduction If your server is running out of internal storage capacity, you can quickly allocate just the right amount of storage from resilient storage pools on the Oracle ZFS Storage Appliance from Oracle. This document describes how to use Oracle ZFS Storage Appliance iSCSI LUNs in a Microsoft Windows 2008 R2 environment. Windows Server 2008 R2 comes with a software iSCSI initiator package that can be configured to integrate iSCSI LUNs presented by the Oracle ZFS Storage Appliance into the Windows environment.

This paper describes how to enable the Windows iSCSI initiator on a Windows Server 2008 R2 host. Then it describes how to configure an iSCSI LUN on the Oracle ZFS Storage Appliance so the LUN can be accessed by the Windows server using the iSCSI protocol. Procedures are provided for configuring the LUN using either the appliance’s browser user interface (BUI) or the appliance’s command line interface (CLI). Finally, the document shows how to prepare the LUN for use by the Windows server.

The procedures in this paper assume the following:

• The root password for the Oracle ZFS Storage Appliance is known.

• The IP address or host name of the Oracle ZFS Storage Appliance is known.

• The network used by the Oracle ZFS Storage Appliance has been configured.

• The Oracle ZFS Storage Appliance has pools configured with sufficient free space available.

• The password of an administrator account on the Windows server is known.

Enabling the Windows iSCSI Initiator The first step is to enable the Microsoft iSCSI Initiator. By default, the Microsoft iSCSI Initiator is not enabled, so it is necessary to enable the initiator and gather the host iSCSI details.

1. Log on to the Windows Server host as a systems administrator.

2. Select Start > Control Panel and choose Large icons or Small icons, as shown in the following image, to display the necessary control applet.

Figure 1. Control Panel Icons

3. Select iSCSI Initiator, as shown in Figure 2.

3 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 2. iSCSI Initiator Icon

If the iSCSI initiator has not been previously enabled, the warning shown in Figure 3 is displayed.

Figure 3. iSCSI Service Warning

4. Click Yes. The iSCSI Initiator Properties dialog box opens, as shown as in Figure 4.

4 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 4. iSCSI Initiator Properties Dialog Box

5. In the iSCSI Initiator Properties dialog box, select the Configuration tab to view the iSCSI Qualified Name (IQN), as shown in Figure 5. The IQN is used to identify the Windows host to the Oracle ZFS Storage Appliance.

5 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 5. iSCSI Initiator Properties Dialog Box Showing the IQN

Note: It is possible to change the IQN (shown here as the Initiator Name). However, changing the IQN is not advisable under normal circumstances.

6. If Challenge-Handshake Authentication Protocol (CHAP) is to be used to authenticate the initiator to the target, click the CHAP button. (CHAP can also be used to authenticate the target to the initiator.)

The iSCSI Initiator Mutual CHAP Secret prompt is displayed, as shown in Figure 6.

Figure 6. iSCSI Initiator Mutual CHAP Secret Prompt

7. Enter a CHAP secret that is memorable but not easily guessed. The level of complexity should be similar to that of a user password. For the password to be a valid CHAP secret, it must be at least 96 bits (12 bytes) long. Otherwise, the warning shown in Figure 7 is displayed.

6 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 7. Warning Message Displayed if Initiator CHAP Secret Is Too Short

Configuring the Oracle ZFS Storage Appliance Using the Browser User Interface As a unified storage platform, the Oracle ZFS Storage Appliance supports access to block-protocol LUNs using iSCSI and Fibre Channel protocols. This section describes how to use the Oracle ZFS Storage Appliance BUI to configure the Oracle ZFS Storage Appliance to recognize the Windows Server 2008 R2 host and present iSCSI LUNs to it.

To open the Oracle ZFS Storage Appliance BUI, do the following:

1. In the address field of a Web browser, enter an address that includes the IP address or host name of the Oracle ZFS Storage Appliance, as shown below:

https://<appliance IP address or host name>:215

The login dialog shown in Figure 8 is displayed.

Figure 8. Oracle ZFS Storage Appliance Login

2. Enter a user name and password and click LOGIN.

To identify the Windows Server 2008 R2 host to the Oracle ZFS Storage Appliance, an iSCSI target group must be created and iSCSI initiator and initiator groups must be defined. These steps are described in the following sections.

Defining an iSCSI Target Group A target group is created on the Oracle ZFS Storage Appliance to define the ports and the protocol by which the LUN to be presented to the Windows Server 2008 R2 host is accessed. For this example, an iSCSI target group is created that contains the LUN as an iSCSI target that is identified by the default IQN for the Oracle ZFS Storage Appliance and presented over default appliance interfaces. Since CHAP will be used for authentication between the storage and the host, CHAP parameters are also specified in this example.

To define an iSCSI target group on the Oracle ZFS Storage Appliance, complete these steps:

1. Click Configuration > SAN to display the Storage Area Network (SAN) screen, as shown in Figure 9.

2. Click the Targets tab at the right and then select iSCSI Targets at the top of the left panel, as shown in Figure 9.

7 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 9. iSCSI Target Configuration Tab in Oracle ZFS Storage Appliance

3. Click the + icon to the left of iSCSI Targets to display the New iSCSI Target dialog box shown in Figure 10.

4. Enter an Alias for the target and select the Initiator authentication mode (for this example, CHAP is selected).

5. Enter the Target CHAP name and a Target CHAP secret that is different from the secret used for the iSCSI initiator. For this example, chapuser and CHAPsecret22 are used.

Figure 10. New iSCSI Target Dialog Box

6. Click OK to confirm.

7. To create an iSCSI target group that includes the iSCSI target just defined, place the cursor over the new iscsi-Targets entry in the left panel. The Move icon ( ) appears to the left of the entry, as shown in Figure 11.

Figure 11. Move Icon Displayed to the Left of the Selected iSCSI Target Entry

8 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

8. Click the icon and drag it to the iSCSI Target Groups panel on the right. A new entry appears at the bottom of the iSCSI Target Groups column, as shown in Figure 12 (highlighted in yellow).

Figure 12. Creating the iSCSI Target Group

9. Move the cursor over the new target group and release the mouse button. A new iSCSI target group is created with a name targets-n, where n is an integer (shown in Figure 13).

10. Move the cursor over the entry for the new target group. Two icons appear to the right of the target group box, as shown in Figure 13.

Figure 13. Selecting the Target Group for Editing

11. Click the Edit icon ( ) to display the dialog box shown in Figure 14.

12. In the Name field, replace the default name with the name to be used for the iSCSI target group and click OK. For this example, the name iscsi-TG is used.

Figure 14. Renaming the iSCSI Target Group

13. Click APPLY. The changes are shown in the iSCSI Targets panel on the left, as shown in Figure 15.

9 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 15. New iSCSI Target Group with Changes Applied

Defining an iSCSI Initiator An iSCSI initiator is defined to allow access from one or more servers to particular volumes. Access to volumes should be configured so that a minimum number of iSCSI initiators are allowed to access a particular volume. If more than one host can write to a given volume concurrently and a non-shared file system is used, inconsistencies might occur in file system caches on the hosts, which can ultimately lead to corruption of the on-disk image. Typically, a single initiator is given access to a volume, unless a specialized cluster file system is being used.

The iSCSI initiator defines the “host” from the point of view of the Oracle ZFS Storage Appliance. The iSCSI initiator definition contains the host IQN. To identify the Windows server to the Oracle ZFS Storage Appliance, the Windows 2008 R2 iSCSI initiator IQN must be registered with the appliance by completing the following steps:

1. Click Configuration >SAN to display the Storage Area Network (SAN) screen shown in Figure 16.

2. Click the Initiators tab at the right and then select iSCSI Initiators at the top of the left panel, as shown in Figure 16.

Figure 16. Selecting the SAN Configuration

3. Click the + icon to the left of iSCSI Initiators to display the New iSCSI Initiator dialog box shown in Figure 17.

4. Enter the Initiator IQN for the Windows server (see the previous section Enabling the Windows iSCSI Initiator for how to obtain the Initiator IQN).

5. Enter a more meaningful symbolic name as the Alias field.

6. If CHAP authentication has been set up (see the previous section Enabling the Windows iSCSI Initiator), select the Use CHAP check box. Enter the CHAP name in the Initiator CHAP name field and enter the password in the Initiator CHAP secret field, as shown in Figure 17. The CHAP name and password must be identical to those defined in the host configuration.

10 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 17. New iSCSI Initiator Definition

7. Click OK.

Defining the iSCSI Initiator Group Related iSCSI initiators can be combined into logical groups to allow single commands to be executed on multiple iSCSI initiators, for example, assigning LUN access to all iSCSI initiators in a group by using one command. For this example, the iSCSI initiator group contains one initiator, but in a cluster, where multiple servers are treated as a single logical entity, the initiator group may contain multiple initiators.

To create an iSCSI initiator group, complete these steps:

1. Select Configuration > SAN to display the Storage Area Network (SAN) screen.

2. Select the Initiators tab at the right and the click iSCSI Initiators at the top of the left panel.

3. Place the cursor over the entry for the iSCSI initiator created in the previous section. The Move icon ( ) appears to the left of the entry, as shown in Figure 18.

Figure 18. Displaying the Move Icon for a New iSCSI Initiator

4. Click the icon and drag it to the iSCSI Initiator Groups panel on the right. A new entry appears at the bottom of the iSCSI Initiators Groups panel, as shown in Figure 19 (highlighted in yellow).

Figure 19. Creating the iSCSI Initiator Group

11 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

5. Move the cursor over the new entry box and release the mouse button. A new iSCSI initiator group is created with a name initiators-n, where n is an integer, as shown in Figure 20.

6. Move the cursor over the entry for the new initiator group. Several icons appear to the right of the target group box, as shown in Figure 20.

Figure 20. Selecting the iSCSI Initiator Group

Click the Edit icon ( ) to display the dialog box shown in the following figure.

7. In the Name field, replace the default name with the name to be used for the iSCSI initiator group and click OK. For this example, the name win2k8-servers is used.

Figure 21. Renaming the iSCSI Initiators Group

8. Click APPLY on the SAN configuration screen to confirm all the modifications, as shown in Figure 22.

Figure 22. iSCSI Initiator Configuration Completed

Defining a ZFS Storage Appliance Project

A project can be defined in the Oracle ZFS Storage Appliance to group related volumes. A project allows inheritance of properties for file systems and LUNs presented from the project and also allows quotas and reservations to be applied.

To create a project, complete the following steps:

1. Select Shares > Projects to display the Projects screen, as shown in Figure 23. If necessary click the Projects icon ( ) on the left of the screen.

12 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 23. Viewing a Project

2. Click the + icon to the left of Projects at the top of the left panel to display the Create Project dialog box shown in Figure 24.

Figure 24. Create Project Dialog Box

3. To create a new project, enter a Name for the project and click APPLY. A new project appears in the Projects list in the left panel.

4. Select the new project to view the components that comprise the project, as shown in Figure 25.

Figure 25. Displaying the New w2k8-project Project

Defining an Oracle ZFS Storage Appliance LUN

A LUN must now be created from an existing pool of storage resources, which the Windows Server 2008 R2 host will access. For this example, a thin-provisioned 64 GB LUN called DocArchive1 is created.

The target group will be the iSCSI target group created in the

Defining an iSCSI Target Group section to ensure that this LUN can be accessed using iSCSI protocol. The initiator group defined in the

Defining the iSCSI Initiator Group section will be used to ensure that only the server(s) defined in the win2k8-servers group can access this LUN (in this example, this group contains only one server).

To create a target group, complete the following steps:

1. Select Shares > Projects to display the Projects screen.

2. In the Projects panel at the left, select the project. Then select LUNs at the top of the panel at the right, as shown in Figure 26.

13 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 26. Selecting Shares > Project > LUNs

3. Click the + icon to the left of LUNs to display the Create LUN dialog box shown in Figure 27.

4. Enter values, as appropriate, to set up the LUN. For this example, set the Name field to DocArchive1, set the Volume size field to 64 GB, and select the Thin-provisioned check box. Set the Target Group to the iSCSI target group iscsi-TG and the Initiator Group to win2k8-servers. Set the Volume block size to 32K because the volume will hold a ZFS file system.

Figure 27. Create LUN Dialog Box

5. Click APPLY to create the LUN and make it available to the Windows server.

14 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Configuring the Oracle ZFS Storage Appliance Using the Command Line Interface As a unified storage platform, the Oracle ZFS Storage Appliance supports access to block-protocol LUNs using iSCSI and Fibre Channel protocols. This section describes how to use the Oracle ZFS Storage Appliance CLI to configure the Oracle ZFS Storage Appliance to recognize the Windows Server 2008 R2 host and present iSCSI LUNs to it.

The CLI must be accessed using an SSH-enabled terminal session. On a host that has an SSH client available, enter the following:

user@host> ssh root@<zfssa-ip-address-or-hostname> login as: root Using keyboard-interactive authentication. Password: XXXXX Last login: Mon Jul XX XX:XX:XX XXXX from desktop zfssa:>

Navigation follows a similar pattern in the CLI as in the BUI with paths used in commands often corresponding to paths through tabs and screens in the BUI.

Defining the iSCSI Target Group In the example in Listing 1, a target group is defined on the Oracle ZFS Storage Appliance to specify which ports and protocols will be used to access the LUN. The LUN can be assigned to a particular target group when it is created, or it can be added later by editing the target group. In the example below, an iSCSI target group consisting of a single iSCSI target is defined, using a default IQN, to allow a LUN to be presented through the appliance’s default ports using iSCSI protocol.

Since CHAP will be used for authentication between the storage and the host, CHAP parameters are also specified in this example.

Listing 1: Defining an iSCSI Target Group

zfssa:> configuration san targets zfssa:configuration san targets> iscsi zfssa:configuration san targets iscsi> create zfssa:configuration san targets iscsi target (uncommitted)> set alias=iscsi-Target alias = iscsi-Target (uncommitted) zfssa:configuration san targets iscsi target (uncommitted)> commit zfssa:configuration san targets iscsi> list TARGET ALIAS target-000 iscsi-Target | +-> IQN iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi>

15 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

select target-000 zfssa:configuration san targets iscsi target-000> list Properties: alias = iscsi-Target iqn = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 auth = none targetchapuser = (unset) targetchapsecret = (unset) interfaces = nge0 zfssa:configuration san targets iscsi target-000> set targetchapuser= iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 targetchapuser = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted) zfssa:configuration san targets iscsi target-000> set targetchapsecret=CHAPsecret11 targetchapsecret = ************ (uncommitted) zfssa:configuration san targets iscsi target-000> commit zfssa:configuration san targets iscsi target-000> list Properties: alias = iqn = auth = targetchapuser = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 targetchapsecret = ************ interfaces = zfssa:configuration san targets iscsi target-000> cd .. zfssa:configuration san targets iscsi> list TARGET ALIAS target-000 iscsi-Target | +-> IQN iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi> group zfssa:configuration san targets iscsi groups> create zfssa:configuration san targets iscsi group (uncommitted)> set name=iscsi-TG name = iscsi-TG (uncommitted) zfssa:configuration san targets iscsi group (uncommitted)> set targets=iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 targets = iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted) zfssa:configuration san targets iscsi group (uncommitted)>

16 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

commit zfssa:configuration san targets iscsi groups> list GROUP NAME group-000 iscsi-TG | +-> TARGETS iqn.1986-03.com.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi groups> cd / zfssa:>

Defining the iSCSI Initiator An iSCSI initiator is defined to restrict which servers have access to a particular volume. If more than one host can write to a given volume concurrently, inconsistency in file system caching between hosts can cause corruption in the on-disk image. Typically, a single initiator is given access to a volume, unless a specialized cluster file system is being used.

The iSCSI initiator is the “host,” as defined from the point of view of the Oracle ZFS Storage Appliance. To define the Windows Server 2008 R2 host as an iSCSI initiator with an alias win2k8r2, the iSCSI IQN for the Windows server must be registered with the appliance, as shown in the example in Listing 2.

Listing 2: Defining an iSCSI Initiator

zfssa:> configuration san initiators zfssa:configuration san initiators> iscsi zfssa:configuration san initiators iscsi> ls Children: groups => Manage groups zfssa:configuration san initiators iscsi> create zfssa:configuration san initiators iscsi initiator (uncommitted)> set alias=win2k8r2 alias = win2k8r2 (uncommitted) zfssa:configuration san initiators iscsi initiator (uncommitted)> set initiator= iqn.1991-05.com.microsoft:win2k8r2 initiator = iqn.1991-05.com.microsoft:win2k8r2 (uncommitted) zfssa:configuration san initiators iscsi initiator (uncommitted)> set chapuser= iqn.1991-05.com.microsoft:win2k8r2 chapuser = iqn.1991-05.com.microsoft:win2k8r2 (uncommitted) zfssa:configuration san initiators iscsi initiator (uncommitted)> set chapsecret=CHAPsecret11 chapsecret = ************ (uncommitted) zfssa:configuration san initiators iscsi initiator (uncommitted)> commit zfssa:configuration san initiators iscsi> ls Initiators: NAME ALIAS

17 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

initiator-000 win2k8r2 | +-> INITIATOR iqn.1991-05.com.microsoft:win2k8r2 Children: groups => Manage groups zfssa:configuration san initiators iscsi>

Defining the iSCSI Initiator Group

Related iSCSI initiators can be combined into logical groups to allow single commands to be executed on multiple iSCSI initiators, for example, assigning LUN access to all iSCSI initiators in a group by using one command. In the example in Listing 3, the iSCSI initiator group contains one initiator. However, in a cluster, where multiple servers are treated as a single logical entity, the initiator group may contain multiple initiators.

Listing 3: Defining an iSCSI Initiator Group

zfssa:configuration san initiators iscsi> groups zfssa:configuration san initiators iscsi groups> create zfssa:configuration san initiators iscsi group (uncommitted)> set name=win2k8-servers name = win2k8-servers (uncommitted) zfssa:configuration san initiators iscsi group (uncommitted)> set initiators= iqn.1991-05.com.microsoft:win2k8r2 initiators = iqn.1991-05.com.microsoft:win2k8r2 (uncommitted) zfssa:configuration san initiators iscsi group (uncommitted)> commit zfssa:configuration san initiators iscsi groups > ls Groups: GROUP NAME group-000 win2k8-servers | +-> INITIATORS iqn.1991-05.com.microsoft:win2k8r2 zfssa:configuration san initiators iscsi groups> cd / zfssa:>

Defining an Oracle ZFS Storage Appliance Project

A project can be defined in the Oracle ZFS Storage Appliance to group related volumes. A project allows inheritance of properties for file systems and LUNs presented from the project and also allows quotas and reservations to be applied.

Define a project as shown in the example below:

18 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

zfssa:> shares zfssa:shares> project w2k8-project zfssa:shares w2k8-project (uncommitted)> commit zfssa:shares> cd / zfssa:>

Defining an Oracle ZFS Storage Appliance LUN

A LUN, which the Windows Server 2008 R2 host will access, must now be created from an existing pool of storage resources. In the example in Listing 4, a thin-provisioned 64 GB LUN called DocArchive1 is created. The LUN is set up for a ZFS file system.

The target group is the iSCSI target group created in the

Defining the iSCSI Target Group section to ensure that this LUN can be accessed using iSCSI protocol. The initiator group defined in the

Defining the iSCSI Initiator Group section is used to ensure that only the server(s) defined in the win2k8r2-servers group can access this LUN (in this example, this group contains only one server).

Listing 4: Defining an Oracle ZFS Storage Appliance LUN

zfssa:shares> select w2k8-project zfssa:shares w2k8-project> lun DocArchive zfssa:shares w2k8-project/DocArchive (uncommitted)> set volsize=64G volsize = 64G (uncommitted) zfssa:shares w2k8-project/DocArchive (uncommitted)>

set targetgroup=iscsi-TG targetgroup = iscsi-TG (uncommitted) zfssa:shares w2k8-project/DocArchive (uncommitted)>

set initiatorgroup=win2k8-servers initiatorgroup = win2k8-servers (uncommitted) zfssa:shares w2k8-project/DocArchive (uncommitted)> list Properties: checksum = fletcher4 (inherited) compression = off (inherited) dedup = false (inherited) copies = 1 (inherited) logbias = latency (inherited) secondarycache = all (inherited) volblocksize = 8K (default) volsize = 64G (uncommitted) sparse = false (default) exported = true (inherited) targetgroup = iscsi-TG (uncommitted) initiatorgroup = win2k8-servers (uncommitted) lunumber = (default) assignednumber = (default)

19 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

status = (default) fixednumber = (default) lunguid = (default) canonical_name = (default) nodestroy = (default) Children: snapshots => Manage snapshots replication => Manage remote replication zfssa:shares w2k8-project/DocArchive (uncommitted)>

set volblocksize=32k volblocksize = 32K (uncommitted) zfssa:shares w2k8-project/DocArchive (uncommitted)> commit zfssa:shares w2k8-project> cd / zfssa:shares>

20 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Configuring the LUN for Use by the Windows 2008 R2 Server Once the iSCSI LUN has been prepared, the Windows Server 2008 R2 environment must be configured to access the allocated storage, as described in the following steps:

1. On the control panel, select iSCSI Initiator to display the iSCSI Initiator Properties dialog box (see Enabling the Windows iSCSI Initiator for details).

2. Select the Discovery tab and click the Discover Portal button to display the dialog box shown in Figure 28.

Figure 28. iSCSI Initiator Discover Target Portal Dialog Box

3. Click OK to set up the target.

The Target portals box now contains the newly added target, as shown in Figure 29.

Figure 29. Newly Added iSCSI Target

4. Select the Targets tab. The IQN of the Oracle ZFS Storage Appliance is displayed, as shown in Figure 30.

21 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 30. IQN of the New Target

5. Click the Connect button on the Targets tab to display the Connect To Target dialog box, as shown in Figure 31.

Figure 31. Connect to Target Dialog Box

6. Click the Advanced button to display the Advanced Settings dialog box shown in the following figure.

22 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 32. Specifying the CHAP Details

7. Select the Enable CHAP log on check box. In the Name field, enter the IQN of the Windows 2008 R2 server, and in the Target Secret field, enter the target secret selected in the Enabling the Windows iSCSI Initiator section.

8. Click the OK button to save the settings and close the Advanced Settings dialog box.

9. In the iSCSI Initiator Properties dialog box, click Connect.

If the connection is successful, an entry appears in the Discovered Targets box showing the IQN of the Oracle ZFS Storage Appliance with a “Connected” status, as shown in Figure 33. Click OK to continue.

If an “Authentication Failure” warning is displayed, check that the same CHAP password (CHAP target secret) is used in each of the following places (you may need to re-enter hidden passwords to ensure consistency):

• In the Microsoft Windows iSCSI Initiator configuration properties (see Figure 6 in the Enabling the Windows iSCSI Initiator section).

• In the Oracle ZFS Storage Appliance iSCSI Initiator definition (see Figure 17 in the

• Defining an iSCSI Initiator section).

• In the Microsoft Windows iSCSI Initiator Advanced Settings (see Figure 32 in the Configuring the LUN for Use by the Windows 2008 R2 Server section).

23 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 33. Successful Connection

10. To initialize the LUN for use by Windows, select Start and right-click Computer. On the menu that is displayed, select Manage, as shown in Figure 34.

Figure 34. Selecting the Management Utility for the Computer

24 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

11. Select Storage > Disk Management to display the Initialize Disk dialog box, as shown in Figure 35.

12. Click Cancel to close the Initialize Disk dialog box and display the Disk Management dialog box.

Note: If you are absolutely sure that this is the correct disk to be initialized, you can click OK.

Figure 35. Initialize Disk Dialog Box

13. To verify that you are about to initialize the correct disk, find the disk corresponding to the new iSCSI LUN in the list of available disks. Check that the size of the disk is the same as the size that was allocated in the

14. Defining an Oracle ZFS Storage Appliance LUN section (see Figure 27).The disk should also be shown as “Not Initialized.”

15. To prepare the new iSCSI LUN for use by the Windows Server 2008 R2 host, right-click the entry corresponding to the disk to display the menu shown in Figure 36 and click Initialize Disk.

Figure 36. Initializing the Disk

16. The Initialize Disk dialog box shown in Figure 35 will be displayed again. This time, click OK to initialize the disk.

25 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

When the disk is finished initializing, the status of the disk in the Disk Management dialog box will change from “Not Initialized” to “Online.”

17. To the right of identifier for the disk, select the area representing the disk. When selected, the area appears cross-hatched. Right-click this area and select New Simple Volume.

The New Simple Volume Wizard is displayed, as shown in Figure 37.

Figure 37. Wizard for Creating a New Simple Volume

18. Click Next to continue.

The Specify Volume Size dialog box appears, as shown in Figure 38. This dialog box allows you to create a partition on the unallocated space.

Figure 38. Selecting the Size of the Partition

26 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

19. For this example, a single 64 GB volume is created for archived documents, so click Next.

The Assign Letter Drive or Path dialog box is displayed, as shown in Figure 39. Options offered are to assign a drive letter to the new “disk,” mount the new “disk” as an NTFS subfolder (which must be empty), or create the volume without assigning a drive or mounting the disk.

Figure 39. Assigning a Drive Letter

20. For this example, select Assign the following drive letter and then, from the drop-down menu to the right, select an unused drive letter.

21. Click Next to continue. The Format Partition dialog box is displayed with options for formatting or not formatting the volume, as shown in Figure 40. If the volume is to be formatted, a volume label, a file system type, and an allocation unit size can be specified. Options are provided for performing a quick format or enabling file and folder compression.

22. For this example, format the volume with the options shown in Figure 40.

27 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 40. Formatting the Volume

23. Click Next to continue.

A summary of the selected options is displayed, as shown in Figure 41.

Figure 41. Summary of Selected Options

24. Click Finish to apply the options and to format the iSCSI volume.

On the Disk Management screen, the volume status is shown as “Formatting” until the formatting process is complete, as shown in Figure 42.

28 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 42. Disk Formatting

The status then changes to “Healthy,” as shown in Figure 43.

Figure 43. Formatting Complete

The new iSCSI LUN is now available for use, as shown in Figure 44.

29 USING ORACLE ZFS STORAGE APPLIANCE ISCSI LUNS IN A MICROSOFT WINDOWS SERVER 2008 R2 ENVIRONMENT

Figure 44. iSCSI LUN Now Available

Conclusion

This document described how to configure the software iSCSI initiator package supplied with Microsoft Windows Server 2008 R2 to enable a Windows server to access iSCSI LUNs presented by the Oracle ZFS Storage Appliance.

Oracle Corporation, World Headquarters Worldwide Inquiries 500 Oracle Parkway Phone: +1.650.506.7000 Redwood Shores, CA 94065, USA Fax: +1.650.506.7200

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0615 Using Oracle ZFS Storage Appliance iSCSI LUNs in a Microsoft Windows Server 2008 R2 Environment April 2014, version 1.1 Author: Andrew Ness, Application Integration Engineering

C O N N E C T W I T H U S

blogs.oracle.com/oracle

facebook.com/oracle

twitter.com/oracle

oracle.com