Skip to main content

Updating the CBS superblock

This section covers the steps required to update the CBS superblock.

Ensure that the sizes of the CBS pool and CBS pool data are properly increased according to the Increasing the size of the CBS pool section.

Procedure performed by: Customer or field service

To update the CBS superblock, follow these steps:

  1. Copy the current CBS superblock to a temporary file:

    head -c 4096 /dev/mapper/vdo > /tmp/superblock.tmp

  2. Check the current values in the previously created temporary file:

    # cat /tmp/superblock.tmp

    {"special_thin_blocks": {"TEMPLATE": {"size_sectors": "93066911448", "thinid": 2, "uuid":
    "0657a4c083b44d8bb0d22cb4e6d0d750"}, "METADATA": {"size_sectors": "2097152", "thinid": 1, "uuid":
    "a0528f49b71948aa8be9d7f4d490b97f"}}, "thin_block_tracking_enabled": true, "name": "CBS Superblock",
    "pool_device": {"size_sectors": "93066911448", "block_size_sectors": 8192}, "data_device":
    [{"offset_sectors": "67608872", "start_offset_sectors": "0", "size_sectors": "93066911448"}],
    "metadata_device": {"offset_sectors": "34054440", "size_sectors": "33554432"}, "thin_block_metadata":
    {"record_size_bytes": 256, "record_count": 1000000, "superblock_offset_bytes": 4096}, "version": 2,
    "metadata_backup_device": {"offset_sectors": "500008", "size_sectors": "33554432"}}

  3. Get the new number of 512–byte sectors:

    dmsetup table CBS_POOL

    0 186220306136 thin-pool 253:11 253:8 8192 0 0

    There are now 186,220,306,136 512–byte sectors.

  4. Update the pool_device : size_sectors and data_device : size_sectors in /tmp/superblock.tmp
    1. Edit superblock.tmp.

      vi /tmp/superblock.tmp

    2. Type i to input data.
    3. Replace the values of the pool_device : size_sectors and data_device : size_sectors with the number of 512–byte sectors from step 3.

      In our example, this value is 186,220,306,136 512–byte sectors.

    4. Press ESC and enter :wq to saves the changes and close the superblock.tmp file.
      Attention
      • Do not modify the size_sectors in the TEMPLATE section as this remains unchanged since the filesystem is not resized.

      • Do not add extra characters or new lines as these may cause problems, such as the storage stack failing to reassemble the next time it is rebooted or HA is performed.

      {"special_thin_blocks": {"TEMPLATE": {"size_sectors": "93066911448", "thinid": 2, "uuid":
      "0657a4c083b44d8bb0d22cb4e6d0d750"}, "METADATA": {"size_sectors": "2097152", "thinid": 1, "uuid":
      "a0528f49b71948aa8be9d7f4d490b97f"}}, "thin_block_tracking_enabled": true, "name": "CBS Superblock",
      "pool_device": {"size_sectors": "186220306136", "block_size_sectors": 8192}, "data_device":
      [{"offset_sectors": "67608872", "start_offset_sectors": "0", "size_sectors": "186220306136"}],
      "metadata_device": {"offset_sectors": "34054440", "size_sectors": "33554432"}, "thin_block_metadata":
      {"record_size_bytes": 256, "record_count": 1000000, "superblock_offset_bytes": 4096}, "version": 2,
      "metadata_backup_device": {"offset_sectors": "500008", "size_sectors": "33554432"}}

  5. Copy the configuration to the CBS superblock header:

    cat /tmp/superblock.tmp > /dev/mapper/vdo

  6. Restart the storage controller:

    # tacp-storage-controller-safe-stop# systemctl start tacp-storage-controller

    Note

    This forces the storage controller to send a new registration message to the Management Layer, which updates the controller with the new available capacity.

  7. Check that the new storage capacity is displayed in the Cloud Controller Web Portal.

The storage capacity upgrade is now complete. The new additional storage space can be used immediately.