Skip to content

AWS MGN incorrectly replicating physical disks instead of MD logical volumes in RAID1 setup

0

We are experiencing a configuration issue with AWS Application Migration Service (MGN) on a Linux server with software RAID1 configuration. System Configuration:

  • OS: Linux with mdadm software RAID
  • Storage: 2 x NVMe disks (894GB each) configured as RAID1

RAID setup:

  • /dev/md2: RAID1 array for /boot (1GB) using nvme0n1p2 + nvme1n1p2
  • /dev/md3: RAID1 array for / (892GB) using nvme0n1p3 + nvme1n1p3

Total logical storage: ~894GB

Problem: MGN is replicating both physical disks (nvme0n1 and nvme1n1) separately instead of recognizing the logical MD volumes. This results in:

Replication backlog showing 1.3TB instead of expected ~894GB Risk of data duplication and inconsistency in target Potential boot issues due to RAID metadata conflicts

Expected Behavior: MGN should detect and replicate only the logical volumes:

  • /dev/md2 (boot partition)
  • /dev/md3 (root partition)

Total replication size: ~894GB

Current Behavior: MGN appears to be replicating both physical NVMe disks individually, treating them as separate volumes rather than components of a RAID1 array.

Steps Taken:

Attempted to manually select only one disk during replication setup Reinstalled MGN agent multiple times Verified RAID arrays are healthy and synchronized (both show [UU] status)

Request: Please provide the correct procedure for configuring MGN with software RAID1 arrays, including:

Proper agent installation parameters for RAID environments How to ensure MGN recognizes MD logical volumes instead of physical components Any specific configuration flags or settings required for mdadm RAID arrays

System Details: (cat /proc/mdstat)

md3 : active raid1 nvme1n1p3[1] nvme0n1p3[0] 935460864 blocks super 1.2 [2/2] [UU] md2 : active raid1 nvme1n1p2[1] nvme0n1p2[0] 1046528 blocks super 1.2 [2/2] [UU]

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian

This appears to be a common scenario with software RAID configurations, and we would appreciate guidance on the standard procedure for handling such setups with MGN. Thank you for your assistance.

2 Answers
0

When working with AWS Application Migration Service (MGN) and software RAID configurations, the behavior you're experiencing is expected. MGN replicates at the block level of physical disks rather than at the logical volume level.

To properly handle your RAID1 setup with MGN, you should:

  1. During agent installation, manually identify only the necessary disks for replication. Since you have a RAID1 configuration, you only need to replicate one of the physical disks from each RAID array, as they contain identical data.

  2. When installing the AWS Replication Agent, use the option to manually select disks for replication. You can specify just one of the physical disks (e.g., only nvme0n1) since it contains all the data needed.

  3. Note that the root disk is always replicated regardless of your selection, so you cannot exclude it.

  4. Be aware that when manually selecting disks, you must use exact disk paths and avoid using apostrophes, brackets, or non-existent disk paths.

  5. After installation, verify that only the intended disks are being replicated by checking the "Disk settings" section in the MGN console.

If you've already installed the agent and need to change which disks are being replicated, you'll need to reinstall the agent. When you reinstall, you'll notice the "Total replicated storage" value changes, and a progress bar will appear indicating that MGN is rescanning the original volumes.

For your RAID1 setup, replicating both physical disks is redundant since they contain identical data. By selecting only one disk from each RAID pair, you can reduce the replication volume and avoid potential issues during the migration process.

After migration, you may need to reconfigure the RAID setup on the target instance, as the migrated instance will only have the replicated physical disks without the RAID configuration.
Sources
Agent related - Application Migration Service
Installing the AWS Replication Agent on Linux servers - Application Migration Service

answered a year ago

0

The suggested solution is not working as expected in practice. Issue with Manual Disk Selection: As shown in the installation logs below, when I manually specify only one disk during agent installation, MGN still identifies and replicates BOTH physical disks:

Choose the disks you want to replicate: /dev/nvme1n1

Result:

  • Identified volume for replication: /dev/nvme1n1 of size 895 GiB
  • Identified volume for replication: /dev/nvme0n1 of size 895 GiB ← Still added automatically

Choose the disks you want to replicate: /dev/nvme0n1

Result:

  • Identified volume for replication: /dev/nvme0n1 of size 895 GiB
  • Identified volume for replication: /dev/nvme1n1 of size 895 GiB ← Still added automatically

Current Behavior:

  • Manual selection is ignored
  • Both disks are always replicated regardless of input
  • Total replication shows ~1.3TB instead of expected 895GB
  • This defeats the purpose of manual selection

Questions:

  • Why does MGN ignore the manual disk selection and add both disks anyway?
  • Is there a specific parameter or flag needed to enforce single-disk replication with RAID1?
  • Are there known limitations with mdadm software RAID that prevent selective replication?
  • Is this behavior specific to NVMe drives or RAID1 configurations?

System Details:

Both disks are components of mdadm RAID1 arrays (md2, md3) RAID arrays are healthy and synchronized [UU]

The manual selection feature appears to not function correctly with our RAID1 setup. Could you provide additional troubleshooting steps or alternative approaches? Request: Please escalate to the MGN engineering team if this is a known limitation or bug with software RAID configurations.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.