RAID and Cluster Resource Creation

Tip:

Spare pools are not supported in an HA cluster configuration.

Follow the steps below to create a xiRAID RAID and add a Pacemaker resource to manage it:
  1. Disable RAID autostart:
    # xicli settings cluster modify --raid_autostart 0
    Warning:

    It is important to disable xiRAID autostart before creating any RAIDs to prevent data corruption due to accidental active-active mode.

  2. Create a xiRAID RAID by following the instructions in the xiRAID Classic 4.1.0 Administrator's Guide.
  3. Get the RAID UUID:
    # xicli raid show -n <raid_name> -f json
  4. Unload the RAID:
    # xicli raid unload -n <raid_name>
  5. Add the Pacemaker resource to manage the RAID using the RAID name (<raid_name>) and UUID (<raid_uuid>):
    # pcs resource create <raid_name> ocf:xraid:raid \
     	  name=<raid_name> uuid=<raid_uuid> \
     	  op monitor interval=5s \
    	  meta migration-threshold=3
    Tip:

    You can set the migration-threshold value for a resource, allowing it to move to a new node after a specified number of failures. When working with xiRAID RAIDs, it is recommended to set this parameter to 3. To learn more, see Moving Resources Due to Failure.

Configuring Multiple RAID Pacemaker Resources

If you have configured multiple Pacemaker resources to manage xiRAID RAIDs in a single cluster, it is important to add Pacemaker constraints to prevent these RAID resources from starting simultaneously. If you have 2 RAIDs, you only need to add a single constraint:

# pcs constraint order start <RAID resource 1> then start <RAID resource 2> kind=Serialize

, where <RAID resource 1> is the name of one of the RAID resources and <RAID resource 2> is the name of the other resource.

Here's an example with 5 RAID resources:

rr_mdt0
rr_ost0
rr_ost1
rr_ost2
rr_ost3

To ensure that these resources do not start in parallel, multiple constrains must be added:

# pcs constraint order start rr_mdt0 then start rr_ost0 kind=Serialize
# pcs constraint order start rr_mdt0 then start rr_ost1 kind=Serialize
# pcs constraint order start rr_mdt0 then start rr_ost2 kind=Serialize
# pcs constraint order start rr_mdt0 then start rr_ost3 kind=Serialize

# pcs constraint order start rr_ost0 then start rr_ost1 kind=Serialize
# pcs constraint order start rr_ost0 then start rr_ost2 kind=Serialize
# pcs constraint order start rr_ost0 then start rr_ost3 kind=Serialize

# pcs constraint order start rr_ost1 then start rr_ost2 kind=Serialize
# pcs constraint order start rr_ost1 then start rr_ost3 kind=Serialize

# pcs constraint order start rr_ost2 then start rr_ost3 kind=Serialize