Authors:

Feature pages are design documents that developers have created while collaborating on oVirt.

Most of them are outdated, but provide historical design context.

They are not user documentation and should not be treated as such.

Documentation is available here.

Gluster Host Disk Management: Design

Summary

This document describes the design of Disk Management feature for Gluster in oVirt. Refer Features/GlusterHostDiskManagement

Design

New Entities

StorageDevice

This entity helps to store the details of a storage device in the host. A host will nave multiple instance of this storage device to represent the storage devices in the host.

Column name Type Description
id UUID Id generated by engine (Primary Key)
device_uuid String Dev UUID Given by the system to device
vds_id UUID Host ID (Foreign Key to Host).
name String Name of the device
model String Description about the device
device_path String Device Path
parent String Parent Device
mount_point String Mount Point
filesystem_type String File system type
fs_uuid String UUID for the file system in the device.
is_free boolean Is device is already used or its free for usage.

Sync Job

Information about the storage devices in the host will be fetched periodically and stored in the DB by a sync job. This sync job will run for once in 24 hours. There will be an option in the UI to force sync the storage device details.

BLL commands

  • CreateBrick - creates a logical volume with the given set of storage devices and format it with XFS file system and mounts the LV at a pre configured path.
  • ExtendBrick - Add the selected block devices to the given LV to increase the storage space available in the LV.
  • SyncStorageDevices - Force sync the storage devices from host.

Engine Queries

  • GetStorageDevices - lists all the Storage Devices available in the Host
  • HostGetUnusedBricksQuery - lists all the Unused LVs in the Host.

VDSM Verbs

VDSM verbs for Disk Provisioning

  • GlusterStorageDevicesList - Returns all the storage devices in the host

« TODO: explain verb’s parameters and return structure »

  • GlusterBrickCreate - Create an LV which can be to create gluster volume

« TODO: explain verb’s parameters and return structure »

  • GlusterBrickExpand - Expand the given LV by adding the selected disk

« TODO: explain verb’s parameters and return structure »

REST APIs

The details of the REST APIs for Disk Provisioning feature are as below -

storagedevices sub-collection of the host resource

  • Description: a collection of storage devices that are attached to a specific host.

  • Endpoint: /api/hosts/{host:id}/storagedevices

  • Supported actions:
    1. GET returns a list of storage devices attached to the host
  • Output:
<storage_devices>
 <storage_device>
   <id>Storage device guid</id>
   <host>Host ID</host>
   <name>Device Name</name>
   <device_uuid>Device UUID</device_uuid>
   <file_system_uuid>Device UUID</file_system_uuid>
   <model>Device Model information</model>
   <device_path>device_path</device_path>
   <parent>Parent Device</parent>
   <mount_point>mount point if mounted</mount_point>
   <file_system_type>File System type</file_system_type>
   <is_free>Is Device is Free for use<is_free>
 </storage_device>
</storage_devices>

storagedevice resource under host

  • Endpoint: /api/hosts/{host:id}/storagedevices/{storagedeviceuuid}

  • Supported actions:
    1. GET returns the details about the given storage device by uuid
  • Output:
<storage_device>
   <id>Storage device guid</id>
   <host>Host ID</host>
   <name>Device Name</name>
   <device_uuid>Device UUID</device_uuid>
   <file_system_uuid>Device UUID</file_system_uuid>
   <model>Device Model information</model>
   <device_path>device_path</device_path>
   <parent>Parent Device</parent>
   <mount_point>mount point if mounted</mount_point>
   <file_system_type>File System type</file_system_type>
   <is_free>Is Device is Free for use<is_free>
</storage_device>

Create Gluster Brick of the Host resource

  • Description: an action to create gluster brick

  • Endpoint: /api/hosts/{host:id}/createbrick

  • Supported actions:
    • POST - executes CreateBrick action on the host
  • Input:
 <action>
     <name> Brick Name </name>
     <storage_devices>
         <storage_device>
            <id>Device Id </id>
         </storage_device>
    </storage_devices>
 </action>

Extend Gluster Brick of the Host resource

  • Description: An action to extand the given gluster brick

  • Endpoint: /api/hosts/{host:id}/storagedevices/{storagedeviceuuid}/extendbrick

  • Supported actions:
    • POST - executes ExtendBrick action on the given storage device. It extends the give LV with the specified storage devices.
  • Input:
<action>
    <storage_devices>
        <storage_device>
           <id> Device Id </id>
        </storage_device>
   </storage_devices>
</action>

Documentation / External references

Gluster Host Disk Management