IBM Cloud Docs
Replicating Block Storage for Classic Volumes

Replicating Block Storage for Classic Volumes

Replication uses one of your snapshot schedules to automatically copy snapshots to a destination volume in a remote data center. The copies can be recovered in the remote site if a catastrophic event occurs or your data becomes corrupted.

Replication keeps your data in sync in two different locations. If you want to clone your volume and use it independently from the original volume, see Creating a duplicate Block Volume.

Before you can replicate, you must create a snapshot schedule. The option to Order Replica does not appear unless this condition is met.

Determining the remote data center for my replicated storage volume in the UI

IBM Cloud® data centers are paired into primary and remote combinations in every region worldwide. When you replicate data, consider the local data residency laws because moving data across borders can have legal implications. Replication across regions is not allowed.

See Table 1 for the complete list of data center availability and replication targets within each region.

Table 1 - This table shows the complete list of data centers with enhanced capabilities in each region. Every region is a separate column. Some cities, such as Dallas, San Jose, Washington DC, Amsterdam, Frankfurt, London, and Sydney have multiple data centers.
US Latin America Canada Europe Asia-Pacific Australia
  • SJC03
  • SJC04
  • WDC04
  • WDC06
  • WDC07
  • DAL09
  • DAL10
  • DAL12
  • DAL13
  • DAL14
  • SAO01
  • SAO04
  • SAO05
  • TOR01
  • TOR04
  • TOR05
  • MON01
  • AMS03
  • FRA02
  • FRA04
  • FRA05
  • LON02
  • LON04
  • LON05
  • LON06
  • PAR01
  • MIL01
  • MAD04
  • MAD05
  • TOK02
  • TOK04
  • TOK05
  • OSA21
  • OSA22
  • OSA23
  • SNG01
  • CHE01
  • SYD01
  • SYD04
  • SYD05

Determining the remote data center for the replicated storage volume from the CLI

Before you begin, decide on the CLI client that you want to use.

IBM Cloud data centers are paired into primary and remote combinations in every region worldwide. When you replicate data, consider the local data residency laws because moving data across borders can have legal implications. Replication across regions is not permitted.

Listing data center locations from the IBMCLOUD CLI

You can use the ibmcloud sl block replica-locations command to locate a replica location for your block volume. The following example lists the available location for a block volume that is located in the US south region.

$ ibmcloud sl block replica-locations 560156918
ID        Short Name   Long Name
449494    dal09        Dallas 9
957095    wdc04        Washington 4
1004995   sjc03        San Jose 3
1441195   dal10        Dallas 10
1854795   dal12        Dallas 12
2017603   wdc07        Washington 7
2017695   wdc06        Washington 6
2178495   sjc04        San Jose 4

For more information about all of the parameters that are available for this command, see ibmcloud sl block replica-locations.

Listing data center locations from the SLCLI

To list suitable replication data centers for a specific volume, use the following command.

$ slcli block replica-locations --help
Usage: slcli block replica-locations [OPTIONS] VOLUME_ID

Options:
  --sortby TEXT   Column to sort by
  --columns TEXT  Columns to display. Options: ID, Long Name, Short Name
  -h, --help      Show this message and exit.

As part of the data center modernization strategy for IBM Cloud®, several data centers are scheduled to consolidate in 2023. For more information, see Data center consolidations.

Creating the initial replica in the UI

Replications work based on a snapshot schedule. You must first have snapshot space and a snapshot schedule for the source volume before you can replicate. If you try to configure replication and one or the other isn't in place, you are going to be prompted to purchase more space or set up a schedule. Replications are managed under Storage, Block Storage for Classic in the IBM Cloud® console.

  1. Click the name of your storage volume to display its details.

  2. Click Actions Actions icon and click Order Replica.

  3. Select the existing snapshot schedule that you want your replication to follow. The list contains all of your active snapshot schedules.

    You can select only one schedule even if you have a mix of hourly, daily, and weekly. All snapshots that were captured after the previous replication are copied over to the replica. For more information, see Working with Snapshots. Replication starts 5 minutes after the snapshot is taken to ensure that the most up-to-date data is copied to the replica volume.

  4. Select a Location for the replica volume.

  5. Click Continue.

  6. Enter in a Promo Code if you have one, and click Recalculate. The other fields in the window are completed by default.

    Discounts are applied when the order is processed.

  7. Review your order, and read the service agreement. If you agree with the terms, check the box.

  8. Click Place Order.

Creating the initial replica from the CLI

Replications work based on a snapshot schedule. You must first have snapshot space and a snapshot schedule for the source volume before you can replicate.

Creating the replica volume from the IBMCLOUD CLI

You can use the ibmcloud sl block replica-order command to order a replica volume. Specify the source volume, the replication schedule, and the location of your replica volume.

$ ibmcloud sl block replica-order 562193766 --snapshot-schedule DAILY -d dal13 -t 0.25 -o LINUX
This action will incur charges on your account. Continue?> y

For more information about all of the parameters that are available for this command, see ibmcloud sl block replica-order.

Creating the replica volume from the SLCLI

You can use the following command to order a replica volume.

$ slcli block replica-order --help
Usage: slcli block replica-order [OPTIONS] VOLUME_ID

Options:
-s, --snapshot-schedule [INTERVAL|HOURLY|DAILY|WEEKLY]
                                Snapshot schedule to use for replication,
                                (INTERVAL | HOURLY | DAILY | WEEKLY)
                                [required]
-l, --location TEXT             Short name of the data center for the
                                replicant (e.g.: dal09)  [required]
--tier [0.25|2|4|10]            Endurance Storage Tier (IOPS per GB) of the
                                primary volume for which a replicant is
                                ordered [optional]
-h, --help                      Show this message and exit.

Viewing the replica volumes in the Volume List in the UI

You can view your replication volumes on the Block Storage for Classic page under Storage > Block Storage for Classic. The Volume Name shows the primary volume's name followed by REP. The Type is Endurance or Performance – Replica.

Viewing the replica volumes from the CLI

Listing replica volumes from the IBMCLOUD CLI

You can use the ibmcloud sl block replica-order command to list the replicas of your block volume. The following example lists the replica partners of the block volume 560156918.

$ ibmcloud sl block replica-partners 560156918
ID          User name                  Account ID   Capacity (GB)   Hardware ID   Guest ID   Host ID
560382016   SL02SEV1414935_268_REP_1   1234567      500             -             -          -

For more information about all of the parameters that are available for this command, see ibmcloud sl block replica-partners.

Listing replica volumes from the SLCLI

List existing replicant volumes for a block volume with the following command.

$ slcli block replica-partners --help
Usage: slcli block replica-partners [OPTIONS] VOLUME_ID

Options:
  --sortby TEXT   Column to sort by
  --columns TEXT  Columns to display. Options: ID, Username, Account ID,
                  Capacity (GB), Hardware ID, Guest ID, Host ID
  -h, --help      Show this message and exit.

Viewing the replication history in the UI

To view the Replication history, click Manage on the main menu bar. Select Account, and scroll to the Audit Log. The Storage Replication Events list contains the names of the volume, a description of the replication event and the timestamp of the event.

Editing the Replication Schedule in the UI

The replication schedule is based on an existing snapshot schedule. To change the replica schedule from Hourly to Daily or Weekly or vice versa, you must cancel the replica volume and set up a new one.

However, if you want to change the time of day when your Daily replication occurs, you can adjust the existing schedule on the active volume.

  1. On the active volume details page, click Actions Actions icon.
  2. Select Edit Snapshot Schedule.
  3. Look in the Snapshot frame under Schedule to determine which Daily schedule you're using for replication. Change the schedule that you want.
  4. Click Save.

Deleting an existing replica block volume in the UI

You can cancel replication either immediately or on the anniversary date, which causes billing to end.

  1. Click the volume from the Block Storage for Classic page.
  2. Click Actions Actions icon.
  3. Select Delete Replica.
  4. Select when to cancel. Choose Immediately or Anniversary Date, and click Continue.
  5. This operation deletes the replica volume with all its data. Click the checkbox to acknowledge the information, and click Delete.

Canceling replication when the primary volume is deleted in the UI

When a primary volume is canceled, the replication schedule and the volume in the replica data center are deleted. Replicas are canceled from the Block Storage for Classic page.

You can expect the volume to remain visible in your Storage list for at least 24 hours (immediate cancellation) or until the anniversary date. Certain features aren't going to be available any longer, but the volume remains visible until it is reclaimed. However, billing is stopped immediately after you click Delete Replica.

Active replicas can block reclamation of the Storage volume. Make sure that the volume is no longer mounted, host authorizations are revoked, and replication is canceled before you attempt to cancel the original volume.

Creating a duplicate of a replica

You can create a duplicate of an existing IBM Cloud® Block Storage for Classic. The duplicate volume inherits the capacity and performance options of the original volume by default and has a copy of the data up to the point-in-time of a snapshot.

Duplicates can be created from both primary and replica volumes. The new duplicate is created in the same data center as the original volume. If you create a duplicate from a replica volume, the new volume is created in the same data center as the replica volume.

Duplicate volumes can be accessed by a host for read/write as soon as the storage is provisioned. However, snapshots and replication aren't allowed until the data copy from the original to the duplicate is complete.

For more information, see Creating a duplicate Block Storage for Classic.

Using replicas to failover when disaster strikes

When you fail over, you’re "flipping the switch" from your storage volume in your primary data center to the destination volume in your remote data center. For example, your primary data center is London and your secondary data center is Amsterdam. If a failure event occurs, you’d fail over to Amsterdam – connecting to the now-primary volume from a Compute instance in Amsterdam. After your volume in London is repaired, a snapshot is taken of the Amsterdam volume to fail back to London and the once-again primary volume from a Compute instance in London.