You are here: DTSetup > Setup tasks > Replication configuration > Configuring block device replication

Configuring block device replication

In order to use Double-Take Availability replication, data that will be replicated on a block device must be accessed through a loop device, which is specially attached using the Double-Take Availability loop driver (DTLOOP). DTLOOP allows the loop device to serve as an access point for operations performed on the block device so that data changes can be captured. Existing block devices may be available for replication, but the data on those block devices can only be replicated if they are accessed through the DTLOOP loop device. It is important that operations on the block device be made through the loop device only, or the operations will not be replicated. Failure to do so will result in corrupted data on the target.

DTSetup allows you to configure entries in /etc/DT/dtloop_devices to attach block devices as DTLOOP when Double-Take Availability is started.

If your block device being protected with DTLOOP has a file system on it, do not mount them from /etc/fstab. They should be mounted from an init script. DTMount must be started in the boot sequence before the script to mount the loop devices is executed in order to ensure that the loop devices have the replicated block devices associated with them. The script should then mount the loop device, not on the native block device.

When making replication configuration changes, stop any applications that may be running and restart them after the replication changes have been made. Double-Take Availability needs to be loaded on the file system before any applications, otherwise some data may not be replicated.

After the block device replication configuration is complete, applications must read and write through the /dev/loop# device in order for replication to work.

 

  1. Start DTSetup.
  2. Select Setup tasks.
  3. Select Configure File System or Block Device Replication.
  4. Select Configure Block Device Replication setup file.
  5. If you want to see a list of block devices to which DTLOOP can be attached, select List block devices on this system. Swap and LVM physical partitions will not be included in the list.
  6. Press Enter to continue.
  7. To add a DTLOOP device, select Add an entry to /etc/DT/dtloop_devices.
  8. Enter the path to the block device that is to be replicated and press Enter.
  9. Enter the path to the loop device to use (/dev/loop#), if the same one should always be attached. If you use more than one loop device, you should assign a specific number to the loop device so it will persist beyond reboots. DTLOOP can also use the first one available, but that may mean it attaches to a different one on subsequent reboots/restarts, which may not be desirable. Press Enter to continue.
  10. You will be asked if you want to attach at an offset into the block device and if you want to use an encrypted loop device. In general, these options can be left blank. See the losetup man page for more information on using encryption.
  11. To remove any DTLOOP devices, select Remove /Detach entries in /etc/DT/dtloop_devices and specify the path that you want to remove.
  12. To immediately attach all of the entries in /etc/DT/dtloop_devices, select Attach all entries in /etc/DT/dtloop_devices to a loop device. If you do not select this option, you must stop and restart the daemon for the changes to take effect.
  13. To immediately detach all of the entries in /etc/DT/dtloop_devices, select Detach loop devices from all entries in /etc/DT/dtloop_devices. This allows you to make changes to DTLOOP without unloading the daemon.
  14. When you have completed your block device replication configuration, press Q as many times as needed to return back to the main menu or to exit DTSetup.

You can also attach and detach DTLOOP manually using the Setup Tasks, Configure File System or Block Device Replication, (DEPRECATED) Manual Replication Configuration menu option. Changes made from this menu are not persisted between reboots/restarts.