Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

7.6. Managing Bricks

A brick is the basic unit of storage, represented by an export directory on a host in the storage cluster. You can expand or shrink your cluster by adding new bricks or deleting existing bricks.

Note

When expanding distributed replicated volumes, the number of bricks being added must be a multiple of the replica count. For example, to expand a distributed replicated volume with a replica count of 2, you need to add bricks in multiples of 2 (such as 2, 4, 6, 8, etc.).

7.6.1. Adding Bricks

You can expand a volume by adding new bricks to an existing volume.

Procedure 7.8. Adding a Brick

  1. Click the Volumes tab.
    A list of volumes displays.
  2. Select the volume to which the new bricks are to be added. Click the Bricks tab from the Details pane.
    The Bricks tab lists the bricks of the selected volume.
  3. Click Add to add new bricks. The Add Bricks window is displayed.
    Add Bricks

    Figure 7.3. Add Bricks

    Table 7.1. Add Bricks Tab Properties

    Field/Tab
    Description/Action
    Volume Type
    The type of volume.
    Replica Count
    Number of replicas to keep for each stored item.
    Host
    The selected host from which new bricks are to be added.
    Brick Directory
    The directory in the host.
  4. Use the Host drop-down menu to select the host on which the brick resides.
  5. Select the brick directory from the Brick Directory drop-down menu.

    Note

    Uncheck Show available bricks from host to type the brick directory path since the brick is not shown in the brick directory drop-down.
  6. Select the Allow bricks in root partition and re-use the bricks by clearing xattrs to use the system's root partition for storage and to re-use the existing bricks by clearing the extended attributes.

    Note

    It is not recommended to reuse bricks of restored volume as is. In case of reusing the brick, delete the logical volume and recreate it from the same or different pool (the data on the logical volume will be lost). Otherwise there would be some performance penalty on copy-on-write because the original brick and the restored brick shares the block.

    Note

    Using the system's root partition for storage backend is not recommended. Original bricks of snapshot restored volume is not recommended to be used as a new brick
  7. Click Add and click OK. The new bricks are added to the volume and is displayed in the Bricks tab.

7.6.2. Removing Bricks

You can shrink volumes as needed while the cluster is online and available. For example, to remove a brick that has become inaccessible in a distributed volume due to hardware or network failure.

Note

  • When shrinking distributed replicated volumes, the number of bricks being removed must be a multiple of the replica count. For example, to shrink a distributed replicated volume with a replica count of 2, you need to remove bricks in multiples of 2 (such as 2, 4, 6, 8). In addition, the bricks you are removing must be from the same replica set. In a non-replicated volume, all bricks must be available in order to migrate data and perform the remove brick operation. In a replicated volume, at least one of the bricks in the replica must be available.
  • You can monitor the status of Remove Bricks operation from the Tasks pane.
  • You can perform Commit, Retain, view Status and Stop from remove-brick icon in the Activities column of Volumes and Bricks sub-tab.

Procedure 7.9. Removing Bricks from an Existing Volume

  1. Click the Volumes tab.
    A list of volumes is displayed.
  2. Select the volume from which bricks are to be removed. Click the Bricks tab from the Details pane.
    The Bricks tab lists the bricks for the volume.
  3. Select the brick to remove. Click Remove. The Remove Bricks window is displayed, prompting to confirm the removal of the bricks.

    Warning

    If the brick is removed without selecting the Migrate Data from the bricks check box, the data on the brick which is being removed will not be accessible on the glusterFS mount point. If the Migrate Data from the bricks check box is selected, the data is migrated to other bricks and on a successful commit, the information of the removed bricks is deleted from the volume configuration. Data can still be accessed directly from the brick.
  4. Click OK, remove brick starts.

    Note

    • Once remove-brick starts, remove-brick icon is displayed in Activities column of both Volumes and Bricks sub-tab.
    • After completion of the remove brick operation, the remove brick icon disappears after 10 minutes.
  5. In the Activities column, ensure that data migration is completed and select the drop down of the remove-brick icon corresponding to the volume from which bricks are to be removed.
  6. Click Commit to perform the remove brick operation.
    Remove Bricks Commit

    Figure 7.4. Remove Bricks Commit

    Note

    The Commit option is enabled only if the data migration is completed.
    The remove brick operation is completed and the status is displayed in the Activities column. You can check the status of the remove brick operation by selecting Status from the activities column.

7.6.2.1. Stopping a Remove Brick Operation

You can stop a remove brick operation after starting the remove brick operation. The remove brick operation is stopped and the migration of data is stopped.

Note

  • Stop remove-brick operation is a technology preview feature. Technology Preview features are not fully supported under Red Hat subscription level agreements (SLAs), may not be functionally complete, and are not intended for production use. However, these features provide early access to upcoming product innovations, enabling customers to test functionality and provide feedback during the development process. As Red Hat considers making future iterations of Technology Preview features generally available, we will provide commercially reasonable efforts to resolve any reported issues that customers experience when using these features.
  • Files which were migrated during Remove Brick operation are not migrated to the same brick when the operation is stopped.

Procedure 7.10. Stopping a Remove Brick Operation

  1. Click the Volumes tab. A list of volumes displays.
  2. In the Activities column, select the drop down of the remove-brick icon corresponding to the volume to stop remove brick.
  3. Click Stop to stop remove brick operation. The remove brick operation is stopped and remove-brick icon in the activities column is updated. The remove brick status is displayed after stopping the remove brick.
    You can also view the status of the Remove Brick operation by selecting Status from the drop down of the remove-brick icon in the Activities column of Volumes and Bricks sub-tab..

7.6.2.2. Viewing Remove Brick Status

You can view the status of a remove brick operation when the remove brick operation is in progress.

Procedure 7.11. Viewing Remove Brick Status

  1. Click the Volumes tab. A list of volumes displays.
  2. In the Activities column, click the arrow corresponding to the volume.
  3. Click Status to view the status of the remove brick operation. The Remove Bricks Status window displays.
    Remove Brick Status

    Figure 7.5. Remove Brick Status

  4. Click one of the options below for the corresponding results
    • Stop to stop the remove brick operation
    • Commit to commit the remove brick operation
    • Retain to retain the brick selected for removal
    • Close to close the remove-brick status popup

7.6.2.3. Retaining a brick selected for Removal

You can retain a brick selected for removal operation when the remove brick operation is in progress. The brick that was selected to be removed will be retained and will not be removed from the volume.
The Retain option is enabled only after migration of data to other brick is completed.

Note

When a brick is retained, already migrated data is not migrated back.

Procedure 7.12. Retaining a Brick selected for Removal

  1. Click the Volumes tab. A list of volumes displays.
  2. In the Activities column, click the arrow corresponding to the volume.
  3. Click Retain to retain the brick selected for removal. The brick is not removed and the status of the operation is displayed in the remove brick icon in the Activities column.
    You can also check the status by selecting the Status option from the drop down of remove-brick icon in the activities column.

7.6.3. Viewing Advanced Details

You can view the advanced details of a particular brick of the volume through Red Hat Gluster Storage Console. The advanced view displays the details of the brick, and is divided into four parts. Namely, General, Clients, Memory Statistics, and Memory Pools.

Procedure 7.13. Viewing Advanced Details

  1. Click the Volumes tab. A list of volumes displays.
  2. Select the required volume and click the Bricks tab from the Details pane.
  3. Select the brick and click Advanced Details. The Brick Advanced Details window displays.
    Brick Advanced Details

    Figure 7.6. Brick Advanced Details

Table 7.2. Brick Details

Field/Tab
Description/Action
General
Displays additional information about the bricks.
Clients
Displays a list of clients accessing the volumes.
Memory Statistics/Memory Pool
Displays the details of memory usage and memory pool for the bricks.
You can view the advanced details of Red Hat Gluster Storage volumes through Red Hat Gluster Storage Console.