4.6. Storage

4.6.1. Introduction to Storage
4.6.2. Local Storage
4.6.3. Network File System Storage
4.6.4. iSCSI Storage
4.6.5. Sun ZFS Storage
4.6.6. Preparing iSCSI and Sun ZFS Storage

4.6.1. Introduction to Storage

Storage is closely related to virtualization because the virtualization platforms require a location for creating and storing the virtual disks used for desktops.

Whether you have limited hardware or dedicated storage appliances, Oracle VDI is designed to enable you to use a variety of storage types to meet your requirements. Oracle VDI supports four types of storage:

The storage types that can be used for a desktop provider type depend on the virtualization platform and the operating system, as shown in the following table.

Storage Type

VirtualBox (Linux)

VirtualBox (Solaris)

Microsoft Hyper-V

Local

 

Network file system

 

iSCSI

  

Sun ZFS

VMware vCenter desktop providers also require storage but the storage is managed by the VMware infrastructure and not Oracle VDI. However, Oracle VDI is able to query vCenter for the available storage, and can select the data store to use when creating virtual disks.

For all other desktop providers, storage is managed independently of Oracle VDI.

All the supported storage types require preparation before they can be used. The level of preparation required depends on how directly Oracle VDI manages the storage.

For high availability, a desktop provider can be configured to use more than one storage. To achieve the best performance and to balance the load, Oracle VDI selects a storage to clone and host virtual disks based on the available free space and current workload. Once a virtual disk is created, it remains on the storage until it is deleted. With some storage platforms, such as Sun Unified Storage Systems, you can also create storage clusters to provide redundancy for the hardware components of a storage server.

An Administrator can enable maintenance mode for a storage. In maintenance mode, the storage is disabled and all running desktops are either shut down or suspended. Once this mode is enabled, maintenance can take place on the storage. This mode is also useful for replicating and replacing a storage server, for example to replace hardware.

4.6.2. Local Storage

Local storage enables you to use any local directory on the virtualization host.

Local storage can be inexpensive to set up and performs reasonably, but it is not suitable for high availability deployments. Because the storage is not shared between virtualization hosts, personal desktops cannot be load-balanced between hypervisors and there is also no redundancy in the event of failure.

Local storage is different from all the other storage types because it is not a central storage that is accessed by all virtualization hosts. Instead each virtualization host accesses its own local disk to store the virtual disks. With local storage, the virtualization hosts and the storage hosts are the same. When local storage is used, Oracle VDI automatically creates a local storage for each virtualization host that is added to the desktop provider so that the free space and number of desktops can be monitored on each host.

You can only have one local storage for a Oracle VM VirtualBox desktop provider and you cannot mix local storage with any other storage type.

Storage Preparation

To use local storage with Oracle VDI, you must configure a directory at the same location on each virtualization host. The directory must reside in a local file system and it must not be provided by a shared storage location. For performance reasons, it is better to use a server with at least two disks, so that the storage can be separated from the operating system. When you add the storage for a desktop provider, you simply provide the path to the directory.

How the Storage is Used

The virtual disks are created in the local file system using the VirtualBox command line. When a user requests a desktop, Oracle VDI registers a virtual machine with a virtualization host and this includes the file path to the virtual disk in the local file system.

4.6.3. Network File System Storage

Network file system storage enables you to use any distributed file system that can be mounted or shared on the virtualization host.

A network file system storage can be a Network File System (NFS) share. In a production environment, it is best to use a file system that is designed for clustering such as the Oracle Cluster File System version 2 (OCFS2).

Compared to local storage, network file system storage provides shared access for the virtualization hosts. High availability and redundancy can be achieved through the use of multiple shares and multiple network paths. However the performance for virtual disk I/O can be slower than a local disk. There is also the management overhead in setting up, monitoring, and maintaining this type of storage.

For Oracle VM VirtualBox desktop providers on Oracle Solaris platforms, you cannot mix network file system storage with the Sun ZFS storage type.

Storage Preparation

To use network file system storage with Oracle VDI, you must configure the network file system on a storage host and mount it at the same mount point on all the virtualization hosts for a desktop provider. When you add the storage for a desktop provider, you simply provide the path to mount point of the storage.

It is best to permit root access to the network file system from the virtualization hosts, as this enables virtual disks to be cloned with secure file permissions.

How the Storage is Used

The virtual disks are created in the shared file system using the VirtualBox command line. When a user requests a desktop, Oracle VDI registers a virtual machine with a virtualization host and this includes the file path to the virtual disk in the shared file system.

4.6.4. iSCSI Storage

iSCSI storage enables you to connect virtualization hosts to any storage device that supports the Internet SCSI (iSCSI) protocol.

iSCSI storage is only available for Oracle VM VirtualBox desktop providers on Oracle Linux platforms.

With iSCSI storage, existing IP networks are used to connect a virtualization host to a LUN on a storage area network (SAN) device so that the LUN appears to the host as a locally attached disk. The virtualization host acts as the iSCSI initiator (the client) and the storage is the iSCSI target.

The following are requirements for using an iSCSI storage with Oracle VDI:

  • The storage must be compatible with the Oracle Linux iSCSI stack.

  • The storage must be able to publish an iSCSI target and a Logical Unit Number (LUN).

  • The storage must provide unauthenticated access to the LUN.

Storage Preparation

To use an iSCSI storage with Oracle VDI, you must configure an iSCSI target and LUN on the storage host. Setting Up an iSCSI Target on Sun ZFS Systems provides some example instructions for preparing an iSCSI target.

When you add the storage for a desktop provider, you provide the following details:

  • The IP address or fully-qualified DNS name of the storage host.

  • The iSCSI Qualified Name (IQN) of the iSCSI target.

  • The LUN number.

How the Storage is Used

Oracle VDI uses iSCSI to connect to the LUN on the storage host. Oracle VDI then automatically formats the LUN using Oracle Cluster File System version 2 (OCFS2) and mounts the file system at /vdi on all the virtualization hosts. The virtual disks are created in the shared file system using the VirtualBox command line.

When a user requests a desktop, Oracle VDI registers a virtual machine with a virtualization host and this includes the path to the virtual disk in the mounted OCFS2 file system as shown in Figure 4.1.

Figure 4.1. iSCSI Storage and VirtualBox

The diagram shows the VDI Service registering virtual machines with a VirtualBox host and connecting the virtual machines to their virtual disks hosted on a separate iSCSI storage host.

4.6.5. Sun ZFS Storage

Sun ZFS storage enables you to use Zettabyte File System (ZFS) storage pools on Sun Storage 7000 Unified Storage Systems or Oracle Solaris hosts. The following are the supported Sun ZFS storage platforms:

  • Oracle Solaris 10 10/09 x86 (64-bit) and later

    Note

    Oracle Solaris 11 and Oracle Solaris on SPARC platforms are not supported.

  • Sun Storage 7000 series Unified Storage Systems 2009.Q2.5.1 and later

For Sun Storage 7000 Unified Storage Systems, note the following:

  • For performance reasons, do not disable the write cache if you do not have write solid-state drives (SSDs), also known as Logzilla. If the write cache is enabled and you have write SSDs, the write SSDs are not used. See Section 7.4.2, “About ZFS Storage Caches” for more information on write caching.

  • Oracle VDI supports only the default pool.

    Use projects to separate your areas of concern.

For Oracle VM VirtualBox desktop providers on Oracle Solaris platforms, you cannot mix Sun ZFS storage with any other storage type.

For more information about supported storage, see the following:

Storage Preparation

To use a ZFS storage, Oracle VDI requires SSH root access to the storage host and a ZFS pool on that host. The following provides some example instructions:

With Sun Storage 7000 Unified Storage Systems, you can create storage clusters to provide redundancy for the hardware components of a storage host. Storage Clustering for Sun Storage 7000 Unified Storage Systems provides information about configuring clusters for use with Oracle VDI.

After configuring the storage, it is best practice to prepare the storage host for backup and recovery in the event of a failure. The following provides some example instructions:

When you add the storage for a desktop provider, you provide the following details:

  • The IP address or fully-qualified DNS name of the storage host.

  • The SSH port used on the host.

  • The user name and password of a user with root access to the host.

How the Storage is Used With VirtualBox (Solaris) and Hyper-V Desktop Providers

Each virtual disk is created as a thin-provisioned (sparse) ZFS volume in the ZFS pool and each ZFS volume is configured as an iSCSI target on the storage host. Oracle VDI uses either the Sun Unified Storage command line (Sun Storage 7000 Unified Storage Systems) or ZFS commands (Oracle Solaris hosts) to perform this configuration.

When a user requests a desktop, Oracle VDI registers a virtual machine with a virtualization host and this includes the iSCSI target address of the ZFS volume. When the desktop is started, iSCSI is used to connect the desktop to its virtual disk, as shown in Figure 4.2.

Figure 4.2. Sun ZFS Storage and VirtualBox on Oracle Solaris Platforms

The diagram shows the VDI Service registering virtual machines with a VirtualBox host and connecting the virtual machines to their virtual disks hosted on separate ZFS volumes on the storage host.

How the Storage is Used With VirtualBox (Linux) Desktop Providers

A single thin-provisioned (sparse) ZFS volume is configured in the ZFS pool and the ZFS volume is configured as an iSCSI target on the storage host. Oracle VDI uses either the Sun Unified Storage command line (Sun Storage 7000 Unified Storage Systems) or ZFS commands (Oracle Solaris hosts) to perform this configuration. On the virtualization hosts, Oracle VDI uses iSCSI to connect to the ZFS volume on the storage host. The volume is formatted using the Oracle Cluster File System version 2 (OCSF2) file system and mounted at /vdi on all the virtualization hosts. The virtual disks are then created in the shared file system using the VirtualBox command line.

When a user requests a desktop, Oracle VDI registers a virtual machine with a virtualization host and this includes the path to the virtual disk in the mounted OCFS2 file system as shown in Figure 4.3.

Figure 4.3. Sun ZFS Storage and VirtualBox on Oracle Linux Platforms

The diagram shows the VDI Service registering virtual machines with an VirtualBox host and connecting the virtual machines to their virtual disks hosted on a ZFS volume on the storage host.

4.6.6. Preparing iSCSI and Sun ZFS Storage

4.6.6.1. 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 Storage 7000 Unified Storage System and on an Oracle Solaris System. Adapt the principles for your own iSCSI storage device.

Setting Up an iSCSI Target on a Sun Storage 7000 Unified Storage System
  1. Log in to the browser user interface (BUI) of your Sun Storage 7000 Unified Storage System.

  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 -sV<size> <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.

4.6.6.2. Setting Up a Sun Storage 7000 Unified Storage System

For a list of supported Sun Storage 7000 Unified Storage Systems, see Section 4.6.5, “Sun ZFS Storage”.

Steps
  1. Set up the system.

    Follow the instructions in the Sun Storage 7000 Unified Storage System Quick Setup manual.

  2. (Optional) Update the Sun Storage 7000 Unified Storage System software.

    Update the Sun Storage 7000 Unified Storage System 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.6.6.3. Setting Up an Oracle Solaris Storage

For a list of supported Oracle Solaris storage systems, 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.

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

    # svcadm enable svc:/system/iscsitgt:default

4.6.6.4. Storage Clustering for Sun Storage 7000 Unified Storage Systems

For Sun Storage 7000 Unified Storage Systems using firmware 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 taken care of 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 / aggregated.

For more information about Sun Storage 7000 series Unified Storage Systems and clustering, refer to the Administration Guide:

4.6.6.5. Replicating and Replacing a Sun Storage 7000 Unified Storage System

Storage replication is a useful technique to increase storage server availability for lower budget Oracle VDI installations. After replicating a Sun Storage 7000 Unified Storage System, 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 Storage 7000 Unified Storage System for replication and replicate it. Replication is a built-in feature, and can be configured from the Sun Unified Storage System browser user interface (BUI). The following steps are valid for 2010.Q1 firmware and above.

  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 Unified Storage System UI, convert the replication package to a local project.

    Sever the replication connection of 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.6.6.6. Replicating and Replacing an Oracle Solaris Storage System

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.