Storage Configuration for Machine & Cloud Images

In this section we'll show you an example of how to assign a storage-element, the message spool, to an external storage volume; however, the method is generally applicable to all storage-elements.

:   For production, it's necessary to provide additional storage by assigning the event broker's storage-elements to external block devices. Software event broker Machine and Cloud Images provide a 10 GB partition for storage, which is only enough space for modestly sized storage-elements suitable for use in proof-of-concept deployments. It's insufficient for supporting scaling tiers above 1,000 client connections, and for most Guaranteed Messaging deployments, in production environments.

Before you begin

It's recommended that you review the following points in order to assemble the requirements necessary for assigning storage-elements to external storage volumes.

  • Review the Storage-Element Properties table.

    Make note of the IOPS and write load recommendations.

  • Review the Minimum Recommended Storage-Element Size per Scaling Tier table.

    Make note of the recommended minimum storage required for your scaling tier.

  • device-mapper is used as the backing store.
  • The supported filesystem is xfs.
  • In order for your software event broker to be upgradeable, its associated storage-elements must be assigned to persistent, external storage.
  • The example is presented with respect to a particular storage-element, the message-spool, but the principles and commands can be applied to the other storage-elements as they make use of the Solacectl Utility command solacectl storage, described in Managing Storage Volumes, which is applicable to all storage volumes.

  • If you need to review storage-element basics, the section on Storage-Element Characteristics & Requirements provides general guidance to help you understand what an event broker's storage-elements are, and the factors affecting their assignment to external storage volumes.

Example: Increasing Message Spool Storage

As was noted in the introduction, by default, the software event broker uses a small partition of its virtual disk for storage. Due to the partition's limited size, it's recommended to increase message spooling capacity by assigning the spool to an external block device. In this section we'll show you an example of how to move the message spool storage-element to an external block device. It's a two-step procedure:

Although this example focuses on assigning the message spool to an external storage device, the procedure is applicable to the other storage-elements. The instructions make use of the Solace CLI command solacectl storage, and for general instructions on how to use the command refer to the Managing Storage Volumes section.

Step 1: Configure External Block Device

The first task is to attach an external block device, which is basically a second disk, to the event broker virtual machine.

For best performance and maximum data integrity, especially in production deployments, it’s recommended that you use an enterprise-grade SSD, or equivalent, that supports power loss data protection features.

The exact procedure for adding an external block device to the event broker virtual machine depends on the hypervisor or cloud service you're using, but the following is a list of steps that are commonly encountered when performing this task:

  1. Stop the event broker if it is running.
  2. Using the hypervisor or cloud configuration tools, add a hardware device or storage to the virtual machine, specifying a new or existing virtual disk.

    The following are guidelines for settings that may be available in your hypervisor when creating a virtual disk:

    • The new disk must be sized in light of the considerations noted in Storage Configuration for Machine & Cloud Images.
    • Use a permanent disk (whereby changes are immediately and permanently written to disk).
    • Use a SCSI disk if possible. For a SCSI virtual disk the virtual device node may be SCSI(0:1).
    • Use a fixed size disk.
    • Use thick, eager-zeroed disk provisioning.
    • Do not split files.
  3. Restart the event broker.
  4. Log into the event broker Linux host environment as user sysadmin. It is accessible by ssh to port 22 or through the console .
  5. Confirm that a new disk device is present. It should be called /dev/sdb, /dev/vdb, /dev/xvdb, or something similar.

Step 2: Assign Storage-Element

To assign an event broker's message spool to the newly attached external block device, perform the following steps on the Linux host:

  1. Review the available external block devices, partitions and storage volumes.

    In this example, internalSpool, which is the name of the message spool, initially resides on the path /var/lib/docker/volumes/internalSpool/_data. Also, there is an external block device called vdb to which internalSpool will be assigned.

    Note that the main device disk size of the software event broker is hard-coded to 30G. External storage must be attached to extend the disk size.

    >sudo solacectl storage ls

    Block Devices:

    Name Size Note

    vda 30.0G Main device

    └─vda1 0.2G

    └─vda2 29.8G

    vdb 30.0G

    Storage Volumes:

    Name Size Used Available Path

    /dev/mapper/vg01-root 9.8G 1.1G 8.8G /

    /dev/mapper/vg01-solace 9.8G 1.4G 8.5G /var/lib/docker/volumes

    ├─adb 9.8G 1.0G 8.5G /var/lib/docker/volumes/adb/_data

    ├─adbBackup 9.8G 0 8.5G /var/lib/docker/volumes/adbBackup/_data

    ├─diagnostics 9.8G 4.0K 8.5G /var/lib/docker/volumes/diagnostics/_data

    ├─etc 9.8G 8.0K 8.5G /etc/solace/solace-container.d

    ├─internalSpool 9.8G 274M 8.5G /var/lib/docker/volumes/internalSpool/_data

    ├─jail 9.8G 9.8M 8.5G /var/lib/docker/volumes/jail/_data

    └─var 9.8G 25M 8.5G /var/lib/docker/volumes/var/_data

    Image Pool:

    Name Size Used Available

    Image pool 8.905 GB 1.033 GB 7.872 GB

  2. Stop the event broker if it's running.

    >solacectl service stop

  3. Assign internalSpool to vdb.

    >sudo solacectl storage configure vdb internalSpool

    Creating new partition...

    Verified the file system is XFS

    Mounting /dev/vdb1

    Volumes have been configured in the new block device.

  4. Review to confirm the assignment of internalSpool to vdb.

    >sudo solacectl storage ls
    Block Devices:
    Name Size Note
    vda 30.0G Main device
    └─vda1 0.2G
    └─vda2 29.8G
    vdb 30.0G
    └─vdb1 30.0G

    Storage Volumes:
    Name Size Used Available Path
    /dev/mapper/vg01-root 9.8G 1.1G 8.8G /
    /dev/mapper/vg01-solace 9.8G 1.1G 8.7G /var/lib/docker/volumes
    ├─adb 9.8G 1.0G 8.7G /var/lib/docker/volumes/adb/_data
    ├─adbBackup 9.8G 0 8.7G /var/lib/docker/volumes/adbBackup/_data
    ├─diagnostics 9.8G 4.0K 8.5G /var/lib/docker/volumes/diagnostics/_data
    ├─etc 9.8G 8.0K 8.7G /etc/solace/solace-container.d
    ├─jail 9.8G 9.8M 8.7G /var/lib/docker/volumes/jail/_data
    └─var 9.8G 25M 8.7G /var/lib/docker/volumes/var/_data
    /dev/vdb1 30G 306M 30G /mnt/vmr
    └─internalSpool 30G 274M 30G /mnt/vmr/internalSpool

    Image Pool:
    Name Size Used Available
    Image pool 8.905 GB 1.032 GB 7.872 GB
  5. Restart the event broker.

    >solacectl service start

To undo the above assignment, the message spool internalSpool can be re-assigned to the main device, vda, with the command: sudo solacectl storage configure vda internalSpool.

Setting max-message-spool when scaling up the message spool

If you are scaling up storage space for the message spool as per the instructions in Example: Increasing Message Spool Storage, after completing the task you'll need to change the value of max-spool-usage in order to make use of the increased storage. It's a two-step process:

Step 1: Calculate the Minimum Value of Max-Spool-Usage

You should calculate the minimum recommended value of max-spool-usage prior to starting configuration to confirm that your external block device has sufficient storage for your needs. It's a simple two-step process:

  1. Look up your scaling tier in Storage Configurationto find the recommendation for the minimum amount of storage space.
  2. It's recommended that 20% of the message spool storage device be reserved as overhead, so the minimum recommended value for max-spool-usage is 0.80 times the capacity of your external block device.

So, for example, if your external block device is 30GB, the recommended value for max-spool-storage is 24 GB. If you're planning on supporting up to 100,000 client connections, from step 1, the minimum storage space you'll need for the message spool is 2.1 GB, so the candidate device has sufficient space.

When Solace PubSub+ software event broker storage volumes share the same external block device, it should be noted that there are no event broker facilities to prevent the storage from being over provisioned, so it's recommended that there be no storage over provisioning. When multiple storage volumes are mounted on a single external block device, the external block device should be at least as large as the sum of the recommended storage volume sizes.

Step 2: Increase Message Spool Usage

After the message spool has been migrated to the external block device, you must change the configured maximum spool usage limit, max-spool-usage, to access the increased capacity, with the following Solace CLI command:

solace(configure)# hardware message-spool max-spool-usage <new-maximum>