Skip to main content

Replicating a file-based volume

Before you begin

Before you can replicate a file-based virtual storage container (NFS or CIFS/SMB), you must first make sure:

  • You have installed and configured the Multi System Manager (MSM) and witness service.
  • Pools with names matching the pools used by the source volume exist on the target system.
  • The destination system has enough free capacity to accommodate the replicated volume (and expected growth).
  • You have created replication floating IPs on both the source and target systems.
  • If you are planning on replicating to an existing application and volume on the target system, the volume must be uninitialized. In other words, the target volume must not have a filesystem, shares, or any mapped initiator hosts. For simplicity, StorONE recommends allowing the replication setup to create a matching application and volume name on the target system. This requires that the application and volume do not exist on the target system.
  • Although it is not required for replication to work, if you want to be able to access the replicated volume at the same IP address regardless of which system is currently hosting the primary, you should have created and paired floating IPs for the volume. You can create and pair floating IPs at any time, even after replication has been configured.

Starting replication

You can start replication using the web UI or the command line interface (CLI):

Web UI

In the admin web interface, go to Replication Replication. Click the Start button, and fill in the fields:

Application: Select the application containing the volume you want to replicate.

Volume: Select the volume that you want to replicate.

Target System: Select the target system that you want to replicate to.

Source Floating Ip: Select the replication floating IP entity that you want to use for replication. Most deployments use just one replication floating IP entity per system. In a highly available (HA) deployment, the replication floating IP entity defines two IP addresses: one per controller node. However, this uses a single named configuration entity, so there is only one entry to select in the drop-down menu.

Target Floating Ip: Select the target replication floating IP entity. As with the source floating IP, in most systems, there is only one target floating IP configuration entity to select that encompasses both floating IPs in an HA system.

Synchronous, Semisynchronous, or Asynchronous: Select the replication mode you want to use. For more information on these modes, see Replication overview.

Parameters

In the Parameters section, StorONE recommends leaving the fields empty to allow the replication setup to create a matching application and volume on the target system. If you need to pre-create the application and volume (for example, to modify some of the volume settings between the source and target systems), you can do so, but StorONE recommends against it.

Target Application: If you pre-created an application and volume on the target system, select the application.

Target Volume: If you selected an existing application, the Target Volume field appears, and you can select an existing volume from that application. The volume must be uninitialized, meaning that it cannot have a filesystem, object store, or have been mapped to an initiator host.

After completing all fields, click Submit to start replication. You can view the progress by clicking the List button on the Replication page.

CLI

To start replication using the CLI, use the following command:

replication start --application=<name> --volume=<name> --targetSystem=<name>
[(--targetApplication=<name> --targetVolume=<name>)]
  --sourceFloatingIp=<name> --targetFloatingIp=<name>
  --synchronous | --semisynchronous | --asynchronous
 [--force]

--application=<name>

Specify the application containing the volume you want to replicate. You can use the TAB key auto-complete to list available applications.

--volume=<name>

Specify volume you want to replicate. You can use the TAB key auto-complete to see the available volumes.

--targetSystem=<name>

Specify the target system that you want to replicate to. You can use the TAB key auto-complete to see the available systems.

--targetApplication=<name> --targetVolume=<name>

These parameters are optional, but mutually inclusive. If you specify them, you must specify both. StorONE recommends omitting these parameters to allow the replication setup to create a matching application and volume on the target system. If you need to pre-create the application and volume (for example, to modify some of the volume settings between the source and target systems), you can do so, but StorONE recommends against it.

--sourceFloatingIp=<name>

Specify the replication floating IP entity that you want to use for replication. Most deployments use just one replication floating IP entity per system. In a highly available (HA) deployment, the replication floating IP entity defines two IP addresses: one per controller node. However, this uses a single named configuration entity, so there is only one floating IP to specify. You can use the TAB key auto-complete to see the available replication floating IPs.

--targetFloatingIp=<name>

Specify the target replication floating IP entity. As with the source floating IP, in most systems, there is only one target floating IP configuration entity to select that encompasses both replication floating IPs in an HA system. You can use the TAB key auto-complete to see the available target replication floating IPs.

--synchronous | --semisynchronous | --asynchronous

Specify the replication mode you want to use. For more information on these modes, see /docs/administration/replication/.

--force

Skip the confirmation prompt.

Examples

  1. To asynchronously replicate the homedir volume in the users application to a target system named acme-dr, and have the system create a matching application and volume on the target system:

    replication start --application users --volume homedir --targetSystem acme-dr --sourceFloatingIp repl-float --targetFloatingIp repl-float --asynchronous
  2. To synchronously replicate the ds01 volume in the vm application to an unitialized volume named ds01-repl in the vm-repl application within the us-repl target system:

    replication start --application vm --volume ds01 --targetSystem us-repl --targetApplication vm-repl --targetVolume ds01-repl --sourceFloatingIp replication-ip --targetFloatingIp replication-ip --synchronous

Configure NAS server and floating IPs

To be able to access a replicated NAS volume on a target system, the target system must have a NAS server with a floating IP.

If you have not already done so, create floating IPs on the source and target systems, and pair them together. Assign a real IP address to the floating IP on the system hosting the primary volume, and specify the other as a standby IP. When you initiate a replication transition, you specify the standby floating IP to activate.

Then, make sure that the paired floating IPs are assigned to the NAS servers in the source and target systems:

Web UI

To see which floating IPs are assigned to the NAS server, in the admin web interface, go to NAS servers NAS servers icon. If the paired floating IP is not listed on the NAS server:

  1. Click the Edit button.
  2. In the Floating Ips section, click in the white space in the selection box, and select the paired floating IP you want to add.
  3. Click Submit.
  4. Repeat on the other system.
CLI

Run the following command to see the floating IPs assigned to the NAS server:

nas_servers list

If the paired floating IP is not listed, edit the NAS server to add it:

nas_servers edit --name=<name> --floatingIps=<floating_ip...>

--name=<name>

Specify the name of the NAS server you want to edit. You can use the TAB key auto-complete to list the NAS server. Only one NAS server can be configured per system.

--floatingIps=<floating_ip...>

Specify the floating IPs to associate with the NAS server, separated by a space. If you are adding a new floating IP, make sure to also specify the existing floating IP, or it will be overwritten with only the new floating IP.