All Products
Search
Document Center

Data Online Migration:Migrate data between NAS file systems

Last Updated:Feb 28, 2026

Data Online Migration migrates data between Alibaba Cloud File Storage NAS (NAS) file systems. It mounts each NAS file system to an Elastic Compute Service (ECS) instance and treats it as a LocalFS source, then transfers data between the mounted directories.

Warning

Data Online Migration does not guarantee consistency between source data and migrated data during migration. Verify the migrated data at the destination after a migration task completes. If you delete source data before verification, you bear full responsibility for any resulting data loss.

How it works

Data Online Migration mounts NAS file systems to ECS instances as local directories, then migrates data between these directories using the LocalFS migration workflow. This approach works for all NAS-to-NAS scenarios, regardless of region or VPC configuration. For the full LocalFS migration tutorial, see Migrate data between local file systems.

Migration flowchart

Prerequisites

Before you begin, ensure that you have:

  • At least one ECS instance per tunnel, each with a minimum of 4 CPU cores, 8 GB of memory, and 20 GB of free disk space. For sizing details, see Select an agent

  • Network connectivity between each ECS instance and its corresponding NAS file system

  • For cross-region migrations, a Cloud Enterprise Network (CEN) connection between the source and destination VPCs. See Mount a NAS file system across accounts and regions using CEN

Step 1: Plan agent capacity

Calculate the number of ECS instances required per tunnel:

Number of ECS instances = Expected migration speed / Migration speed of a single instance

For example, with an ecs.c7.xlarge instance (4 CPU cores, 8 GB of memory, 3 Gbps baseline bandwidth):

Expected speedCalculationECS instances per tunnel
2 Gbps2 / 3 = 0.61
5 Gbps5 / 3 = 1.62
Note

Actual migration speed depends on network conditions, NAS file system performance, directory structure, and average file size. Treat the calculated instance count as a starting estimate.

Step 2: Mount the NAS file systems

Mount the source NAS file system on all source ECS instances, and the destination NAS file system on all destination ECS instances.

Mount requirements

  • Create separate tunnels for the source and destination data addresses.

  • Use the same local mount directory on every ECS instance within a tunnel. For example, if you mount the source NAS file system to /mnt/src/ on one source ECS instance, mount it to /mnt/src/ on all other source ECS instances.

Mount command

Use the NFS v3 protocol to mount the NAS file system:

sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport <mount_address>:<nas_directory> <local_path>

Mount address format

NAS file system typeMount address format
General-purpose NASfile-system-id.region.nas.aliyuncs.com:/ /mnt
Extreme NASfile-system-id.region.extreme.nas.aliyuncs.com:/share /mnt

To find the mount address, go to the File System List page in the NAS console, click Manage next to the target file system, and open the Mount Targets tab. For details, see Manage mount targets.

Note

The shared directory for an Extreme NAS file system must start with /share (for example, /share or /share/subdir).

Mount parameters

ParameterDescriptionRecommended value
versNFS protocol version. General-purpose NAS supports NFS v3 and NFS v4.0. Extreme NAS supports only NFS v3.3
rsizeRead data block size in bytes.1048576 (maximum)
wsizeWrite data block size in bytes.1048576 (maximum)
hardApplications wait if the NAS file system becomes temporarily unavailable.Enabled
timeoTimeout in tenths of a second before the NFS client retries a request.600 (60 seconds). Use a minimum of 150 (15 seconds).
retransNumber of NFS client retries for a request.2
noresvportUses a new TCP port on reconnection to maintain uninterrupted recovery from network faults.Enabled
Important

Do not use the soft mount option. It poses data consistency risks. Avoid changing read/write buffer sizes or disabling attribute caching, as these changes degrade performance.

Important

Keep the NAS file system mounted and available throughout the migration. If the mount point becomes unavailable, data may be written to the local disk instead of the NAS file system. For NAS mount questions, contact NAS technical support.

Step 3: Configure the migration in Data Online Migration

Open the Data Online Migration console and follow the LocalFS migration tutorial to complete these steps:

  1. Create a source tunnel. Create one or more source agents, set the Network Type to Leased Line/VPN (VPC), associate them with the source tunnel, and deploy them on the source ECS instances.

  2. Create a destination tunnel. Create one or more destination agents, set the Network Type to Leased Line/VPN (VPC), associate them with the destination tunnel, and deploy them on the destination ECS instances.

  3. Create a source data address. Associate it with the source tunnel, select the source agents, and set the Directory to Be Migrated to the local mount path (for example, /mnt/src/).

  4. Create a destination data address. Associate it with the destination tunnel, select the destination agents, and set the Directory to Be Migrated to the local mount path (for example, /mnt/dest/).

  5. Create a migration task using the source and destination data addresses.

Agent permissions

Start all agents as an administrator.

  • Source agents require read access to all files and subdirectories in the source NAS file system directory.

  • Destination agents require read and write access to all files and subdirectories in the destination NAS file system directory.

Examples

Same region, same VPC

Scenario: Migrate 200 TB from a source NAS file system in China (Beijing) (VPC: vpc-nas, vSwitch: vsw-nas) to a destination NAS file system in the same region and VPC. Target migration speed: 2 Gbps.

Procedure:

  1. Calculate the ECS instance count: 2 Gbps / 3 Gbps = 0.6, rounded up to 1 instance per tunnel.

  2. In the ECS console, create two ecs.c7.xlarge instances (ECS-1 and ECS-2) in China (Beijing), VPC vpc-nas, vSwitch vsw-nas.

  3. Log on to ECS-1, create /mnt/src/, and mount the source NAS file system. Log on to ECS-2, create /mnt/dest/, and mount the destination NAS file system.

    Important

    Keep both NAS file systems mounted and available during the entire migration.

  4. In the Data Online Migration console for China (Beijing):

    1. Create a source tunnel with one agent (Network Type: Leased Line/VPN (VPC)). Deploy the agent on ECS-1.

    2. Create a destination tunnel with one agent (Network Type: Leased Line/VPN (VPC)). Deploy the agent on ECS-2.

    3. Create a source data address linked to the source tunnel. Set Directory to Be Migrated to /mnt/src/.

    4. Create a destination data address linked to the destination tunnel. Set Directory to Be Migrated to /mnt/dest/.

    5. Create a migration task with the source and destination data addresses.

Same region, different VPCs

Scenario: Migrate 200 TB from a source NAS file system in China (Beijing) (VPC: vpc-nas-1, vSwitch: vsw-nas-1) to a destination NAS file system in the same region but a different VPC (vpc-nas-2, vSwitch: vsw-nas-2). Target migration speed: 2 Gbps.

Procedure:

  1. Calculate the ECS instance count: 2 Gbps / 3 Gbps = 0.6, rounded up to 1 instance per tunnel.

  2. Create ECS-1 (ecs.c7.xlarge) in China (Beijing), vpc-nas-1, vsw-nas-1. Create ECS-2 (ecs.c7.xlarge) in China (Beijing), vpc-nas-2, vsw-nas-2.

  3. Log on to ECS-1, create /mnt/src/, and mount the source NAS file system. Log on to ECS-2, create /mnt/dest/, and mount the destination NAS file system.

    Important

    Keep both NAS file systems mounted and available during the entire migration.

  4. In the Data Online Migration console for China (Beijing):

    1. Create a source tunnel with one agent (Network Type: Leased Line/VPN (VPC)). Deploy the agent on ECS-1.

    2. Create a destination tunnel with one agent (Network Type: Leased Line/VPN (VPC)). Deploy the agent on ECS-2.

    3. Create a source data address linked to the source tunnel. Set Directory to Be Migrated to /mnt/src/.

    4. Create a destination data address linked to the destination tunnel. Set Directory to Be Migrated to /mnt/dest/.

    5. Create a migration task with the source and destination data addresses.

Different regions, different VPCs

Scenario: Migrate 200 TB from a source NAS file system in China (Beijing) (VPC: vpc-nas-1, vSwitch: vsw-nas-1) to a destination NAS file system in China (Hangzhou) (VPC: vpc-nas-2, vSwitch: vsw-nas-2). Target migration speed: 5 Gbps.

Procedure:

  1. Enable cross-region mount access through Cloud Enterprise Network (CEN). For details, see Mount a NAS file system across accounts and regions using CEN.

  2. Calculate the ECS instance count: 5 Gbps / 3 Gbps = 1.6, rounded up to 2 instances per tunnel.

  3. In the ECS console, create two ecs.c7.xlarge instances named ECS-Src1 and ECS-Src2 for the source NAS file system. Select the China (Beijing) region, vpc-nas-1, and vsw-nas-1 when you create the instances. Then, create two ecs.c7.xlarge instances named ECS-Dst1 and ECS-Dst2 for the destination NAS file system. These instances must also be created in the China (Beijing) region.

  4. Log on to ECS-Src1 and ECS-Src2, create /mnt/src/, and mount the source NAS file system to this directory on both instances. Log on to ECS-Dst1 and ECS-Dst2, create /mnt/dest/, and mount the destination NAS file system to this directory on both instances.

    Important

    Keep all NAS file systems mounted and available during the entire migration.

  5. In the Data Online Migration console for China (Beijing):

    1. Create a source tunnel with two agents (Network Type: Leased Line/VPN (VPC)). Deploy the agents on ECS-Src1 and ECS-Src2.

    2. Create a destination tunnel with two agents (Network Type: Leased Line/VPN (VPC)). Deploy the agents on ECS-Dst1 and ECS-Dst2.

    3. Create a source data address linked to the source tunnel. Set Directory to Be Migrated to /mnt/src/.

    4. Create a destination data address linked to the destination tunnel. Set Directory to Be Migrated to /mnt/dest/.

    5. Create a migration task with the source and destination data addresses.

Performance considerations

FactorImpact
Deep directory nesting with few filesSlows scanning. For example, 1 million files in 500,000 directories scan slower than the same files in 10,000 directories.
Directories with more than 200,000 filesLimits migration speed due to OS kernel and NAS concurrency constraints.
Very large or actively modified directoriesMay cause the NAS file system to respond slowly or become unresponsive during list operations, interrupting the migration task. See Why does a file system stutter or not respond when I run the ls command?

References