4.7. Preparing Sun ZFS and iSCSI Storage

4.7.1. Setting Up a Sun ZFS Storage Appliance
4.7.2. Storage Clustering for Sun ZFS Storage Appliances
4.7.3. Replicating and Replacing a Sun ZFS Storage Appliance
4.7.4. Setting Up an Oracle Solaris ZFS Storage
4.7.5. Replicating and Replacing an Oracle Solaris ZFS Storage
4.7.6. Setting Up an iSCSI Target on Sun ZFS Systems

4.7.1. Setting Up a Sun ZFS Storage Appliance

Steps

  1. Set up the system.

    Follow the instructions in the Sun ZFS Storage Appliance Installation Guide.

  2. (Optional) Update the Sun ZFS Storage Appliance software.

    Update the Sun ZFS Storage Appliance software to get important performance enhancements. See Section 4.6.5, “Sun ZFS Storage” for the supported software releases.

  3. Create a project.

    You do not need to create a separate ZFS pool for use with Oracle VDI because only the default pool is supported. Instead you use a project to separate the data.

    Project names must be unique. If you are using a storage cluster, using a project name that exists on both heads causes Oracle VDI to fail in the event of failover.

4.7.2. Storage Clustering for Sun ZFS Storage Appliances

For Sun ZFS Storage Appliances using software version 2010.Q1.0.0 and later, Oracle VDI supports active-passive as well as active-active storage clusters. Clustered storage is managed by Oracle VDI the same way as individual storages.

A storage cluster introduces redundancy for the server components of a storage including CPU, memory, main board, network cards, but does not increase the redundancy of the disks or their controllers. That is provided by the JBODS and the RAID levels used.

The two storage servers in the cluster (called "heads") are connected over a special card, the Clustron, which allows the heads to exchange state and configuration information and to detect a failed head.

A resource is a core concept of clustering, and is typically either a network interface or a storage pool. To ensure availability, the resource is taken over by a head if the other head fails.

The main configuration steps when setting up a cluster are to define the resources, which is performed the same way as in a single setup (Configuration, Storage or Configuration, Network), and to assign a head as the resource owner (Configuration, Cluster).

A cluster is called "active-passive" if only one head owns all resources. A cluster is called "active-active" if both heads own resources. While the performance of an active-passive cluster does not degrade if one head fails, both heads of an active-active cluster are actively processing requests during normal operation resulting in a better utilization of the available hardware.

Identical hardware available on both storages can only be used to create one resource owned by one head. For example, if you configure a 192.168.100.100 interface using the nge0 device and assign head1 as its owner, head2 will use its nge0 device to take over the 192.168.100.100 interface in case head1 fails. To be able to do so the nge0 device must be unused on head2.

Another constraint about clustered interfaces is that they must be statically configured. You cannot use DHCP.

A typical setup for two storages with four network devices each and array:

 

Head1

Head2

nge0

owner

-

nge1

owner

-

nge2

-

owner

nge3

-

owner

Array 1

owner

-

Array 2

-

owner

nge0 and 1 as well as nge2 and 3 are typically trunked or aggregated.

For more information about clustering, see Cluster in the Sun ZFS Storage 7000 System Administration Guide

4.7.3. Replicating and Replacing a Sun ZFS Storage Appliance

Storage replication is a useful technique to increase storage server availability for lower budget Oracle VDI installations. After replicating a Sun ZFS Storage Appliance, the Oracle VDI storage replace feature allows you to easily enable the replicated storage server from Oracle VDI Manager if, for some reason, the storage server fails.

Preparation

Configure the Sun ZFS Storage Appliance for replication and replicate it. Replication is a built-in feature, and can be configured from the Sun ZFS Storage Appliance browser user interface (BUI). The following steps are valid for 2010.Q1 software and later.

  1. Add the target storage for the replication to the Remote Replication service. Go to Configuration, then Services.

  2. Add a replication action to the project. Go to Shares, Projects, project, then Replication. The Include Snapshots option must be selected.

The ZFS structures are now replicated to the target storage as replication package.

Disaster Recovery

If a storage server fails, use the procedure below to replace and re-enable the storage server.

  1. Disable the failed storage server.

    1. In Oracle VDI Manager, go to Desktop Providers.

    2. Select a desktop provider that uses the failed storage server.

    3. Go to the Storage tab, select the storage server, and click Maintenance.

    4. Choose a time for the server to begin entering maintenance, or click Now to select the current time.

    5. Click OK to submit the maintenance mode job.

  2. In the Sun ZFS Storage Appliance BUI, convert the replication package to a local project.

    Disconnect the replication connection to the replication target.

    Go to Shares, Projects, Replica, replication-package, then Replication.

  3. Enable the new storage server.

    1. In Oracle VDI Manager, go to Desktop Providers.

    2. Select a desktop provider that uses the failed storage server.

    3. Go to the Storage tab.

    4. Select the storage server to be replaced and click Replace to activate the Replace Storage wizard. Enter information about the new storage (replication target).

    5. Select the new storage and click Edit to activate the Edit Storage wizard.

    6. Enter additional information about the new storage.

    7. Select the new storage and click Enable.

4.7.4. Setting Up an Oracle Solaris ZFS Storage

For a list of supported Oracle Solaris storage platforms, see Section 4.6.5, “Sun ZFS Storage”.

Steps

  1. Install the Oracle Solaris operating system.

    The Oracle Solaris installer gives you the choice of using UFS or ZFS for the root file system. If the host has only one disk, choose ZFS. If host has multiple disks and the other disks are exclusively used for the Oracle VDI ZFS pools, either of the two choices is fine.

  2. Enable root access.

    1. Edit the file /etc/ssh/sshd_config and change the line PermitRootLogin no to PermitRootLogin yes

    2. Restart the SSHD service to implement the changes you made to the sshd_config file.

      # svcadm restart ssh
  3. (Optional) Create a ZFS pool.

    If ZFS was selected during installation, the Oracle Solaris OS installer created a pool named rpool. This pool contains the root file systems and can also be used by Oracle VDI. Create a dedicated pool to separate the Oracle VDI data from the Oracle Solaris file systems.

    # zpool create pool name disk1 disk2 disk3 ...
    
  4. Enable iSCSI access.

    Run the following command as root on the Oracle Solaris OS storage server.

    # svcadm enable svc:/system/iscsitgt:default

4.7.5. Replicating and Replacing an Oracle Solaris ZFS Storage

Storage replication is a useful technique to increase storage server availability for lower budget Oracle VDI installations. After replicating an Oracle Solaris storage system, Oracle VDI Manager enables you to replace a failed storage server with the replicated storage.

Preparation

Replicate the Oracle Solaris storage on another host.

  1. Take a ZFS snapshot of the whole storage pool.

    # zfs snapshot pool@rep
    
  2. Take a ZFS snapshot of each volume in the storage pool.

    Use the following command for each volume.

    # zfs snapshot pool/volume@rep
    
  3. Export the ZFS file system to the new storage host.

    # zfs send -R pool@rep | ssh root@host zfs receive -dF newpool
    
  4. Delete all ZFS snapshots on the original and new storage servers.

    Use the following command for the whole storage pool.

    # zfs destroy pool@rep
    

    Use the following command for each volume.

    # zfs destroy pool/volume@rep
    

Disaster Recovery

If a storage server fails, use this procedure to replace the storage server.

  1. Disable the failed storage server.

    1. In Oracle VDI Manager, go to Desktop Providers.

    2. Select a desktop provider that uses the failed storage server.

    3. Go to the Storage tab.

    4. Select the storage server, and click Maintenance.

    5. Choose a time for the server to begin entering maintenance, or click Now to select the current time.

    6. Click OK to submit the maintenance mode job.

  2. Enable the new storage server.

    1. Go to the Storage tab.

    2. Select the storage server to be replaced and click Replace to activate the Replace Storage wizard.

    3. Enter the information about the new storage.

    4. Select the new storage and click Edit to activate the Edit Storage wizard.

    5. Enter additional information about the new storage.

    6. Select the new storage and click Enable.

4.7.6. Setting Up an iSCSI Target on Sun ZFS Systems

The following instructions are provided as an example of how to configure an iSCSI target on a Sun ZFS Storage Appliance and on an Oracle Solaris System. Adapt the principles for your own iSCSI storage device.

Setting Up an iSCSI Target on a Sun ZFS Storage Appliance

  1. Log in to the browser user interface (BUI) of your Sun ZFS Storage Appliance.

  2. In the navigation area, click Configuration and then click SAN.

  3. Create the iSCSI target.

    1. Click iSCSI Targets and then click the Add button (+).

      The New iSCSI Target window is displayed.

    2. For the Target IQN, ensure Auto-assign is selected.

    3. In the Alias box, enter an alias for the iSCSI target.

      The alias is not actually used by Oracle VDI.

    4. For the Initiator Authentication Mode, ensure None is selected.

    5. Click OK.

      The new iSCSI target is added to the list of targets.

      Make a note of the iSCSI Qualified Name (IQN) of the iSCSI target, you need the IQN when you configure the storage for a desktop provider.

  4. Add the iSCSI target to an iSCSI target group.

    1. Drag and drop the new iSCSI target to the iSCSI Target Groups list.

      You can create a new group for the target or add it to an existing group.

    2. Click the Apply button.

  5. In the navigation area, click Shares, and then click Shares if this page is not already selected.

  6. Create a logical unit number (LUN).

    1. Click LUNs and then click the Add button (+).

      The Create LUN window is displayed.

    2. From the Project list, select your project.

    3. In the Name box, enter an name for the LUN.

    4. In the Volume Size box, enter the size of the volume.

      The volume must be big enough to contain all the virtual disks for all desktop providers that use the storage.

    5. Select Thin Provisioned.

    6. From the Target Group list, select the iSCSI target group to which the iSCSI volume belongs.

    7. From the Operational Status list, ensure Online is selected.

    8. Click the Apply button.

      The new LUN is added to the list of LUNs.

  7. Edit the settings for the new LUN.

    1. Double-click the name of the LUN or click the Pencil icon to the right of the LUN name.

    2. Click Protocols and select Write Cache Enabled.

    3. Click the Apply button.

  8. Make a note of the Assigned LU Number displayed.

    You need the LUN number when you configure the storage for a desktop provider.

Setting Up an iSCSI Target on an Oracle Solaris System

  1. Log in as superuser on the Oracle Solaris host.

  2. Create a ZFS sparse volume.

    # zfs create -sVsize poolname/volumename
    

    For example:

    # zfs create -sV 100G vdipool/vdi-disks
  3. Share the ZFS volume over iSCSI.

    # zfs set shareiscsi=on poolname/volumename
    

    For example:

    # zfs set shareiscsi=on vdipool/vdi-disks
  4. Use the iscsitadm list target command to obtain the details of the iSCSI target.

    # iscsitadm list target
    Target: vdipool/vdi-disks
        iSCSI Name: iqn.1986-03.com.sun:02:f3510986-6ed5-ca3e-bc25-a25e2056e5a7
        Connections: 0

    Make a note of the details. When you configure the storage in Oracle VDI, use the iSCSI Name for the Target and use 0 as the LU Number.