8.3. Preparing and Adding Local Storage
8.3.1. Preparing Local Storage
A local storage domain can be set up on a host. When you set up a host to use local storage, the host automatically gets added to a new data center and cluster that no other hosts can be added to. Multiple host clusters require that all hosts have access to all storage domains, which is not possible with local storage. Virtual machines created in a single host cluster cannot be migrated, fenced or scheduled. For more information on the required system users and groups see Appendix G, System Accounts.
For information on preserving local storage domains when reinstalling Red Hat Virtualization Host (RHVH), see Upgrading to RHVH While Preserving Local Storage in the Upgrade Guide for Red Hat Virtualization 4.0 for more details.
On Red Hat Virtualization Host (RHVH), the path used for local storage must be within the
/vardirectory. For RHVH, prepend
/varto the directories in the Preparing Local Storage procedure.
Local storage in the
/vardirectory will be lost when Red Had Virtualization Host is reinstalled. To avoid this, you can mount external storage to a host machine for use as a local storage domain. For more information on mounting storage, see the Red Hat Enterprise Linux Storage Administration Guide.
Procedure 8.3. Preparing Local Storage
- On the host, create the directory to be used for the local storage.
# mkdir -p /data/images
- Ensure that the directory has permissions allowing read/write access to the
vdsmuser (UID 36) and
kvmgroup (GID 36).
# chown 36:36 /data /data/images
# chmod 0755 /data /data/images
Your local storage is ready to be added to the Red Hat Virtualization environment.
8.3.2. Adding Local Storage
Storage local to your host has been prepared. Now use the Manager to add it to the host.
Adding local storage to a host in this manner causes the host to be put in a new data center and cluster. The local storage configuration window combines the creation of a data center, a cluster, and storage into a single process.
Procedure 8.4. Adding Local Storage
- Click the Hosts resource tab, and select a host in the results list.
- Click Management → Maintenance to open the Maintenance Host(s) confirmation window.
- Click OK to initiate maintenance mode.
- Click Management → Configure Local Storage.
Figure 8.2. Configure Local Storage Window
- Click the Edit buttons next to the Data Center, Cluster, and Storage fields to configure and name the local storage domain.
- Set the path to your local storage in the text entry field.
- If applicable, select the Optimization tab to configure the memory optimization policy for the new local storage cluster.
- Click OK to save the settings and close the window.
Your host comes online in a data center of its own.