Product SiteDocumentation Site

3.2. Role: The Storage Pool Manager

Red Hat Enterprise Virtualization hosts deal with storage domain structure related metadata (image/snapshot creation, image/snapshot deletion, and volume/domain extension) based on a single writer and multiple readers configuration. The Red Hat Enterprise Virtualization host that can can make changes to the structure of the data domain is known as the Storage Pool Manager. All hosts can read structural metadata but only the storage pool manager can write domain structure metadata for the data center. The storage pool manager coordinates all metadata changes in the data center, such as creating and deleting disk images, creating and merging snapshots, copying images between storage domains, creating templates and storage allocation for block devices.
To assign the storage pool manager role, the Red Hat Enterprise Virtualization Manager causes a potential SPM host to attempt to assume a storage-centric lease. The Manager issues the spmStart command to a host, causing VDSM on that host to attempt to assume the storage-centric lease. If the host is successful it retains the storage-centric lease until the Red Hat Enterprise Virtualization Manager requests the a new host assume the role of SPM. This will happen if:
  • The SPM host can not access all storage domains, but can access the master storage domain.
  • The host is unable to renew the lease because of a loss of storage connectivity or the lease volume is full and no write operation can be performed.
  • The host crashes.
VDSM on a host uses a distributed algorithm to take a mutex (storage-centric lease) on the storage pool to ensure that it is the only host anywhere that is the SPM. This algorithm is storage based; it does not communicate with other hosts through the network. Mutex communications are written to a special logical volume in the data storage domain called leases. Metadata about the structure of the data domain is written to a special logical volume called metadata. Changes to the metadata logical volume are protected against by the leases logical volume.
The storage pool manager reads and writes structural metadata, other hosts read structural metadata.
Figure 3.3. The Storage Pool Manager exclusively writes structural metadata.

Storage Pool Manager Selection Process
  1. The storage pool manager selection process is initiated and managed by the Red Hat Enterprise Virtualization Manager. First, the Red Hat Enterprise Virtualization Manager requests that VDSM confirm which host has the storage-centric lease.
    • The Red Hat Enterprise Virtualization Manager tracks the history of SPM assignment from the initial creation of a storage domain onward. The availability of the SPM role is confirmed in three ways:
      • "getSPMstatus": the Manager uses VDSM to check with the host that had SPM status last and receives one of "SPM", "Contending", or "Free".
      • The metadata volume for a storage domain contains the last host with SPM status.
      • The metadata volume for a storage domain contains the version of the last host with SPM status.
    • If an operational, responsive host retains the storage-centric lease, the Red Hat Enterprise Virtualization Manager marks that host SPM in the administrator portal. No further action is taken.
    • If the SPM host does not respond, it is considered unreachable. If power management has been configured for the host, it is automatically fenced, if not it requires an administrator to fence it manually. The storage pool manager role cannot be assigned to a new host until the previous storage pool manager is fenced.
  2. When the storage pool manager role and storage-centric lease are free, the Red Hat Enterprise Virtualization Manager assigns them to a randomly selected operational host in the data center.
  3. If the storage pool manager role assignment fails on a new host, the Red Hat Enterprise Virtualization Manager adds the host to a list containing the hosts the operation has failed on. On subsequent iterations of the SPM selection, the Red Hat Enterprise Virtualization Manager attempts to assign the role to a host that is not included in the list.
  4. The Red Hat Enterprise Virtualization Manager continues request that the storage pool manager role and storage-centric lease be assumed by a randomly selected host that is not on the list of failed hosts until the SPM selection succeeds.
Each time the current SPM is unresponsive or unable to fulfill its responsibilities, the Red Hat Enterprise Virtualization Manager initiates the storage pool manager selection process.