Initializing DRBD

Perform this procedure to initialize DRBD and the mirrored storage areas.

  1. Log in to the primary node as root, or as a user with superuser privileges.
  2. Synchronize the storage areas of both nodes.
    1. Start the synchronization.
      drbdadm primary --force serviced-dfs
      The command may return right away, while the synchronization process continues running in the background. Depending on the sizes of the storage areas, this process can take several hours.
    2. Monitor the progress of the synchronization.
      drbd-overview

      Do not proceed until the status is UpToDate/UpToDate, as in the following example output:

      0:serviced-dfs/0 Connected Primary/Secondary UpToDate/UpToDate
      1:serviced-dfs/1 Connected Primary/Secondary UpToDate/UpToDate
      2:serviced-dfs/2 Connected Primary/Secondary UpToDate/UpToDate

      The Primary/Secondary values show that the command was run on the primary node; otherwise, the values are Secondary/Primary. Likewise, the first value in the UpToDate/UpToDate field is the status of the node on which the command is run, and the second value is the status of the remote node.

  3. Format the block storage for Control Center internal services data and for Control Center metadata.
    The following commands use the paths of the DRBD devices defined previously, not the block storage paths.
    mkfs.xfs /dev/drbd0
    mkfs.xfs /dev/drbd1
    The commands create XFS filesystems on the primary node, and DRBD mirrors the filesystems to the secondary node.
  4. Create a device mapper thin pool for Control Center application data.
    The following command uses the path of the DRBD device defined previously, not the block storage path.
    serviced-storage -v create-thin-pool serviced /dev/drbd2
    On success, DRBD mirrors the device mapper thin pool to the secondary node.
  5. Configure Control Center storage variables.
    1. Open /etc/default/serviced in a text editor.
    2. Locate the line for the SERVICED_FS_TYPE variable, and then make a copy of the line, immediately below the original.
    3. Remove the number sign character (#) from the beginning of the line.
    4. Locate the line for the SERVICED_DM_THINPOOLDEV variable, and then make a copy of the line, immediately below the original.
    5. Remove the number sign character (#) from the beginning of the line.
    6. Set the value to the device mapper name of the thin pool for application data.
      SERVICED_DM_THINPOOLDEV=/dev/mapper/serviced-serviced--pool
    7. Save the file, and then close the editor.
  6. In a separate window, log in to the secondary node as root, or as a user with superuser privileges, and then replicate the Control Center configuration on the secondary node.
    Use a utility like sum to compare the files and ensure their contents are identical.
  7. On the primary node, monitor the progress of the synchronization.
    drbd-overview
  8. On the primary node, deactivate the serviced volume group.
    vgchange -an serviced
  9. On both nodes, stop DRBD.
    drbdadm down all