-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat Gluster Storage
Configuring Red Hat Enterprise Virtualization with Red Hat Storage
Getting Started with Red Hat Storage 3 and Red Hat Enterprise Virtualization 3.4 or later.
Abstract
Preface
Chapter 1. Introduction to Red Hat Storage for Virtualization
- Red Hat Enterprise Virtualization environment.See Red Hat Enterprise Virtualization Architecture in Introduction in Red Hat Enterprise Virtualization Installation Guide.
- Red Hat Storage environment.A Red Hat Storage environment consists of bricks that are used to build volumes. Different types of optimized storage volumes can be used as virtual machine stores to hold resources such as virtual disks, templates, and snapshots.
Figure 1.1. Integration architecture
Important
libgfapi
protocol in the future releases.
1.1. Prerequisites
- Update Red Hat StorageEnsure that your system is up to date with the latest patches and upgrades. Use the following command to install the software updates:
# yum update
Important
See the upgrade steps mentioned in the Red Hat Storage Installation Guide to upgrade to the latest version. - Download the
.iso
file for the latest version of Red Hat StorageDownload the.iso
file that holds the installation sources before you start the installation on the system.Verify the MD5 checksums for the.iso
file to ensure that the download is successful.If you have a subscription or evaluation subscription, follow the steps to obtain the Red Hat Storage.iso
files:- Visit the customer portal at https://access.redhat.com/login and enter your Red Hat Login and Password.
- Click Downloads to visit the Software & Download Center.
- In the Red Hat Storage Server area, click
Download Red Hat Storage
. - In Download Red Hat Storage,select to download the following software:
Red Hat Storage Server for On-premise (v. 3.0 x86_64)
Alternatively, visit the following link to obtain the software https://access.redhat.com/downloads/content/186/ver=3/rhel---6/3.0/x86_64/product-downloads.
Figure 1.2. Downloading the ISO
- Verify the system requirements.The system must satisfy the requirements to ensure smooth integration of Red Hat Enterprise Virtualization and Red Hat Storage. See System Requirements in the Red Hat Enterprise Virtualization Installation Guide, which outlines the minimum system requirements required to install, configure, and operate a Red Hat Enterprise Virtualization environment. Also, see the hardware compatibility matrix and system requirements outlined in the section Planning Red Hat Storage Installation of the Red Hat Storage Installation Guide.When creating a data center in Red Hat Enterprise Virtualization Manager, ensure that you select the compatibility version as 3.4. See the compatibility matrix for information on backward compatibility of earlier versions.
- Subscribe to the Red Hat Enterprise Virtualization channels.Subscribe to the Red Hat Enterprise Virt Management Agent channel on all Red Hat Enterprise Linux 6.3, 6.4, and 6.5 hypervisors that now act as the clients for your Red Hat Storage volumes.
- Subscribe to the Red Hat Storage Native Client channel.Subscribe to all Red Hat Enterprise Linux 6.3, 6.4, and 6.5 hypervisors to the Red Hat Storage Native Client channel to get the latest version.
- Set the fully qualified domain name for each hypervisor.Correct DNS records must exist for each hypervisor and Red Hat Storage server node. A fully qualified domain name must be resolvable via both forward and reverse DNS lookup.
- Set SELinux booleans.If you are using QEMU/KVM as a hypervisor, ensure that you set the following SELinux booleans:
# setsebool -P sanlock_use_fusefs on # setsebool -P virt_use_sanlock on # setsebool -P virt_use_fusefs on
Chapter 2. Enabling Red Hat Storage in Red Hat Enterprise Virtualization Manager
2.1. Using Red Hat Storage Volumes in the Red Hat Enterprise Virtualization Manager
Figure 2.1. Installation Workflow
Procedure 2.1. To Enable Red Hat Storage in Red Hat Enterprise Virtualization Manager
- Install Red Hat Enterprise Virtualization ManagerThe Red Hat Enterprise Virtualization Manager is the control center of the Red Hat Enterprise Virtualization environment. Ensure that Red Hat Enterprise Virtualization Manger is installed and configured.Install and configure Red Hat Enterprise Virtualization Manager. See the Manager Installation chapter of the Red Hat Enterprise Virtualization Installation Guide for more information.
- Install HostsInstall the virtual machine hosts using either Red Hat Enterprise Virtualization Hypervisor or Red Hat Enterprise Linux as hosts. Before beginning the installation process, ensure that all virtualization hosts meet the hardware requirements and that the installation of Red Hat Enterprise Virtualization Manager is complete.You can use the following hypervisors as hosts:
- Red Hat Enterprise Virtualization Hypervisor 3.4
- Red Hat Enterprise Linux 6.3
- Red Hat Enterprise Linux 6.4
- Red Hat Enterprise Linux 6.5
During installation, set the fully qualified domain name (FQDN) and IP address for the server in order to avoid network conflicts. See the Installing Red Hat Enterprise Virtualization Hypervisor Hosts chapter of the Red Hat Enterprise Virtualization Installation Guide for information on installing the hypervisor.Note
You must install Red Hat Enterprise Linux 6.3, Red Hat Enterprise Linux 6.4 Server or Red Hat Enterprise Linux 6.5 on a system to use it as a virtualization host in a Red Hat Enterprise Virtualization environment. See the Installing Red Hat Enterprise Linux Hosts chapter of the Red Hat Enterprise Virtualization Installation Guide or the Red Hat Enterprise Linux 6 Installation Guide for detailed instructions.Subscribe to the channelsRed Hat Enterprise Linux hosts need to be registered and subscribed to a number of entitlements using either Subscription Manager or Red Hat Network Classic. For more information, see section Subscribing to Required Channels using RHN Classic in the chapter Installing Red Hat Enterprise Linux Hosts in the Red Hat Enterprise Virtualization Installation Guide.Subscribe Red Hat Enterprise Linux 6.3, 6.4, and 6.5 hosts to the channels listed below:- rhel-x86_64-server-6
- rhel-x86_64-rhev-mgmt-agent-6
Apart from the above channels, you must also subscribe to the Red Hat Storage 3 Native Client channels to get the latest version:Run therhn-channel --add --channel
command to subscribe the system to the correct Red Hat Storage Native Client channel:- For Red Hat Enterprise Linux 7.x clients using Red Hat Satellite Server:
# rhn-channel --add --channel= rhel-x86_64-server-rh-common-7
- For Red Hat Enterprise Linux 6.x clients:
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-6
- For Red Hat Enterprise Linux 5.x clients:
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-5
See Installing Native Client in Red Hat Storage Administration Guide for information on how to install native clients. - Configure the Hypervisor
Red Hat Enterprise Virtualization Hypervisor host
Install Red Hat Enterprise Virtualization Hypervisor 3.4 on bare metal. See Configuring the Hypervisor and Attaching the Hypervisor to the Red Hat Enterprise Virtualization Manager in the Installing the Red Hat Enterprise Virtualization Hypervisor chapter of the Red Hat Enterprise Virtualization Installation Guide for more information.Red Hat Enterprise Linux 6.3, Red Hat Enterprise Linux 6.4 or Red Hat Enterprise Linux 6.5 host
A Red Hat Enterprise Linux virtualization host must be registered and subscribed to a number of entitlements using either Subscription Manager or Red Hat Network Classic. See Subscribing to Required Channels using RHN Classic in the Installing Red Hat Enterprise Linux Hosts chapter of the Red Hat Enterprise Virtualization Installation Guide for more information.Subscribe to the Red Hat Storage Native Client from the Additional Services Channels to ensure the server has the latest clients installed:#
See the Installing Native Client section in the Red Hat Storage Administration Guide for more information.yum install glusterfs-fuse glusterfs
- Configure the data centersDefine data centers and clusters to organize the virtualization hosts. The installation process creates a data center and associated cluster named
Default
.Note
A server can be a Red Hat Enterprise Virtualization Hypervisor or a Red Hat Enterprise Linux host. A trusted storage pool requires a minimum of one storage host, and at least one active virtualization host is required to connect the system to a storage pool. - Install Red Hat StorageInstall the latest version of RHS on the system.See section, "Prerequisites" of the Red Hat Storage Installation Guide for more information on obtaining the software. For information on installing Red Hat Storage from an ISO, see the Red Hat Storage Installation Guide.
- Configure StorageConfigure the Red Hat Storage installation for your requirements.For instructions on creating a Red Hat Storage Volume, see chapter Red Hat Storage Volume in the Red Hat Storage Administration Guide.Red Hat Enterprise Virtualization uses a centralized storage system for virtual machine disk images. Before adding storage, ensure that you have a working Red Hat Enterprise Virtualization Manager environment. You must be able to access the Administration Portal, and there must be at least one host connected with Up status.
Note
Red Hat Storage recommends that you use Replicate or Distributed Replicate volume type for hosting virtual machine disk images. - Attach Storage to HypervisorAttach the Red Hat Storage volume as a storage domain.
2.2. Optimizing Virtual Machines On Red Hat Storage Volumes
multiply_disk_readahead 4
to multiply_disk_readahead 16
. If you are running a Red Hat Enterprise Linux host, run the following commands to enable read-ahead.
- Install the Tune daemonInstall the tuned daemon that tunes the system settings dynamically.
#
yum install tuned
- Edit the virtual-guest profile provided by the Tune daemon.Edit the
/etc/tune-profiles/virtual-guest/ktune.sh
Identify the linemultiply_disk_readahead 4
and replace it withmultiply_disk_readahead 16
- Apply the virtual-guest profile on the virtual machinesActivate the updated profile with the command:
#
tuned-adm profile virtual-guest
Chapter 3. Hosting Virtual Machine Images on Red Hat Storage volumes
3.1. Configuring Volumes Using the Command Line Interface
Procedure 3.1. To Configure Volumes Using the Command Line Interface
- Configure the Red Hat Storage volume using the following command:
#
gluster volume set VOLNAME group virt
Important
After tagging the volume asgroup virt
, use the volume for storing virtual machine images only and always access the volume through the glusterFS native client. - The
gluster volume set <VOLNAME> group virt
command configures the specified volume using the settings in the/var/lib/glusterd/groups/virt
file. The following settings are the recommended defaults:quick-read=off read-ahead=off io-cache=off stat-prefetch=off eager-lock=enable remote-dio=on quorum-type=auto server-quorum-type=server
Important
When you upgrade to Red Hat Storage 3, a new virt file is created in/var/lib/glusterd/groups/virt.rpmnew
. Ensure to apply the newvirt
file on the existing volumes by renaming thevirt.rpmnew
file tovirt
, along with the customized settings.All the performance-related settings other thancluster.eager-lock
prevent caching within GlusterFS client stack, as it is the preferred mode for attaching disks to a virtual machine. Thecluster.eager-lock
option optimizes write performance with synchronous replication when there is a single writer to a file. For description on each of these performance-related settings, see chapter Configuring Volume Options in the Red Hat Storage Administration Guide.Note
Server-Side and Client-Side Quorum are enabled by default in the/var/lib/glusterd/groups/virt
file to minimize split-brain scenarios. If Server-Side Quorum is not met, then the Red Hat Storage volumes become unavailable causing the Virtual Machines (VMs) to move to a paused state. If Client-Side Quorum is not met, although a replica pair in a Red Hat Storage volume is available in the read-only mode, the VMs move to a paused state.Manual intervention is required to make the VMs resume the operations after the quorum is restored. Consistency is achieved at the cost of fault tolerance. If fault tolerance is preferred over consistency, disable server-side and client-side quorum with the commands:# gluster volume reset <vol-name> server-quorum-type # gluster volume reset <vol-name> quorum-type
For more information on these configuration settings, see Managing Red Hat Storage Volumes in the Red Hat Storage Administration Guide. - Set the brick permissions for
vdsm
andkvm
. If you do not set the required brick permissions, creation of virtual machines fails.- Set the user and group permissions using the following commands:
# gluster volume set VOLNAME storage.owner-uid 36 # gluster volume set VOLNAME storage.owner-gid 36
- If you are using QEMU/KVM as a hypervisor, set the user and group permissions using the following commands:
# gluster volume set VOLNAME storage.owner-uid 107 # gluster volume set VOLNAME storage.owner-gid 107
3.2. Configuring Virtual Machines on Red Hat Storage volumes using the Red Hat Enterprise Virtualization Manager
Note
Procedure 3.2. To Add a Red Hat Storage Server for Virtualization Using Red Hat Enterprise Virtualization Manager
- Create a data center:
- Select the Data Centers resource tab to list all data centers.
- Click New to open the New Data Center window.
Figure 3.1. New Data Center Window
- Enter the Name and Description of the data center.
- Select the storage Type as
Shared
from the drop-down menu. - Select the Quota Mode as
Disabled
. - Click OK.
The new data center isUninitialized
until you configure the cluster, host, and storage settings. - Create a cluster:
- Select the Clusters resource tab to list all clusters.
- Click New to open the New Cluster window.
Figure 3.2. New Cluster Window
- Select a Data Center for the cluster from the drop-down menu.
- Enter a Name and Description for the cluster.
- Select the CPU Name and Compatibility Version from the drop-down menus.
- Check Enable Virt Service.
- Click OK.
- Add hosts:
- Select the Hosts resource tab to view a list of all hosts in the system.
- Click New to open the New Host window.
Figure 3.3. New Host Window
Important
A Red Hat Enterprise Linux hypervisor and Red Hat Enterprise Virtualization hypervisor on a single VDSM cluster accessing the same virtual machine image store is not supported. - Select the Data Center and Host Cluster for the new host from the drop-down menus.
- Enter the Name, Address, and Root Password of the new hypervisor host.
- Check Automatically configure host firewall if required.
- Click OK.
The new host appears in the list of hypervisor hosts with the status Installing. After the host is activated, the status changes to Up automatically. - Create and configure volumes on the Red Hat Storage cluster using the command line interface. For information on creating and configuring volumes, see Setting up Red Hat Storage Volumes in the Red Hat Storage Administration Guide and Section 3.1, “Configuring Volumes Using the Command Line Interface”.
- Add a storage domain using Red Hat Enterprise Virtualization Manager:
- Select the Storage resource tab to list existing storage domains.
- Click New Domain to open the New Domain window.
Figure 3.4. New Domain Window
- Enter a Name for the storage domain.
- Select a shared Data Center to associate with the storage domain.
- Select
Data / glusterFS
from the Domain Function/Storage Type drop-down menu. - Select a host from the Use Host drop-down menu.
- Enter the Path of a Red Hat Storage server in the cluster. For example,
RHS-Server:/VOLNAME
- Enter
glusterfs
as VFS Type. This selection is made by default if the data center is of typeglusterFS
. - Enter the applicable Red Hat Storage native client Mount Options. Enter multiple mount options separated by commas. For more information on native client mount options, see Accessing Data - Setting up Clients in the Red Hat Storage Administration Guide.
- Click OK.
- Click Activate to activate the new Red Hat Storage domain.
Figure 3.5. Activated Red Hat Storage Domain
Note
Chapter 4. Managing Red Hat Storage Servers and Volumes using Red Hat Enterprise Virtualization Manager
Enable Gluster Service
option enabled.
Note
4.1. Creating a Data Center
- Select the Data Centers resource tab to list all data centers in the results list.
- Click the New button to open the New Data Center window.
Figure 4.1. New Data Center Window
- Enter the
Name
andDescription
of the data center. - Set
Type
toShared
from the drop-down menu.Set Quota Mode asDisabled
. - Click
OK
.
Uninitialized
until a cluster, host, and storage are configured.
4.2. Creating a Cluster
- Create a cluster with the gluster service enabled.
Figure 4.2. New Cluster Window
- Select the
Compatibility Version
from the drop-down menu. - Click OK.
4.3. Adding Red Hat Storage Server to the Cluster
- To import an existing gluster configuration:
- Select Enable Gluster Service.
- Select Import existing gluster configuration. With this option you can import the existing Gluster configurations into a cluster.
- Provide the IP address of one of the hosts.
- To add new hosts:
- Use the drop-down lists to select the Data Center and Host Cluster for the new host.
- Click OK.The new host displays in the list of hosts with a status of
Installing
. The host is activated and the status changes to Up automatically.
You can manage the lifecycle of a volume using hook scripts. For more information, see chapter Managing Gluster Hooks in the Red Hat Storage Console Administration GuideNote
To add multiple servers to a cluster, you must first add a Red Hat Storage server to the cluster. An error message appears if you add multiple servers in the first attempt.Figure 4.3. New Host window
4.4. Optimizing Red Hat Storage Volumes for Virtual Machine Images
- On the Volumes tab, select the volume to configure and click Optimize for Virt Store.The volume is configured and
group
,storage-owner-uid
, andstorage-owner-gid
options are set.Figure 4.4. Volume Options
For more information on eachvolume set
tunable options, see Managing Red Hat Storage Volumes in the Red Hat Storage Administration Guide.
4.5. Starting the Red Hat Storage Volume
- In the Volumes tab, select the new volume and click Start to start the volume.The volume status changes to Up.
Note
If you are using Red Hat Storage Volumes for hosting Virtual Machine images, you must optimize the volume before attaching the volume to the storage domain.
4.6. Adding Bricks to Volumes
- Click
Add Bricks
to add bricks to your volume.A brick is the basic unit of storage, represented by an export directory on a server in the storage cluster. You can expand or shrink your cluster by adding new bricks or deleting existing bricks.Figure 4.5. Add Bricks
- Enter the path for the brick and click OK.
- In the Allow Access From field, specify volume access control as a comma-separated list of IP addresses or hostnames.By default, an asterisk (*) is used as a wildcard to specify ranges of addresses such as IP addresses or hostnames. You need to use IP-based authentication for Gluster and NFS exports.
- Click OK to create the volume.The new volume is added and it appears on the Volumes tab.
Allow bricks in root partition and reuse the bricks by clearing xattrs
4.7. Performing Asynchronous Tasks
Chapter 5. Recommended Best Practices and Troubleshooting
- Enable the server side quorum at all times for the Red Hat Storage volumes hosting virtual machine images. For more information, see section, Configuring Server-Side Quorum in the Red Hat Storage Administration Guide
- Red Hat Storage Volumes that serve as Red Hat Enterprise Virtualization Master Storage Domain contain SANLocks and have the Red Hat Storage volume profile set to
virt
. This enables the Client Side Quorum for 2-way Automatic File Replication and avoids the inconsistency problems for Multiple Writer situations. For more information see section, Configuring Client-Side Quorum in the Red Hat Storage Administration Guide - Disable the client side quorum for Red Hat Storage volumes that host Virtual Machines images for high-availability with 2-way replication.
5.1. Compatible Versions
Table 5.1. Compatibility Matrix for Red Hat Enterprise Virtualization Version 3.5
Red Hat Storage Version | Cluster Compatibility Version |
---|---|
3.0 Update 4 | 3.5 |
3.0 Update 3 | 3.4 |
3.0 Update 2 | 3.4 |
3.0 | 3.4 |
2.1 Update 6 | 3.3 |
2.1 Update 5 | 3.3 |
2.1 Update 4 | 3.3 |
2.1 Update 2 | 3.3 |
2.1 Update 1 | 3.2 |
2.1 | 3.2 |
Table 5.2. Compatibility Matrix for Red Hat Enterprise Virtualization Version 3.4
Red Hat Storage Version | Cluster Compatibility Version |
---|---|
3.0 Update 3 | 3.4 |
3.0 Update 2 | 3.4 |
3.0 | 3.4 |
2.1 Update 6 | 3.3 |
2.1 Update 5 | 3.3 |
2.1 Update 4 | 3.3 |
2.1 Update 2 | 3.3 |
2.1 Update 1 | 3.2 |
2.1 | 3.2 |
Table 5.3. Compatibility Matrix for Red Hat Enterprise Virtualization Version 3.3
Red Hat Storage Version | Cluster Compatibility Version |
---|---|
2.1 Update 6 | 3.3 |
2.1 Update 5 | 3.3 |
2.1 Update 4 | 3.3 |
2.1 Update 2 | 3.3 |
2.1 Update 1 | 3.2 |
2.1 | 3.2 |
Table 5.4. Compatibility Matrix for Red Hat Enterprise Virtualization Version 3.2
Red Hat Storage Version | Cluster Compatibility Version |
---|---|
2.1 Update 1 | 3.2 |
2.1 | 3.2 |
5.2. Troubleshooting the Integration
- Red Hat Storage 3.0 Volumes do not get mounted with Red Hat Enterprise Virtualization Hypervisor 3.3 and 3.4 versions as the glusterfs native clients available in those Hypervisors are not compatible with Red Hat Storage 3.0 servers.In order to make use of Red Hat Storage 3.0 volumes in Red Hat Enterprise Virtualization Hypervisor 3.3 and 3.4 versions, disable the readdir-ahead option on those volumes. This makes the volumes compatible with the older native client available with Red Hat Enterprise Virtualization Hypervisor 3.3 and 3.4.
# gluster volume set <vol> readdir-ahead off
Appendix A. Revision History
Revision History | |||
---|---|---|---|
Revision 3-21 | Fri Mar 20 2015 | Pavithra Srinivasan | |
| |||
Revision 3-12 | Mon Oct 20 2014 | Pavithra Srinivasan | |
|