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