Migrating Data Using Direct Connect

Context

Users can migrate data from local Network Attached Storage (NAS) devices to SFS Turbo using Direct Connect.

In this solution, a Linux ECS is created to enable the connection between a local NAS device and SFS Turbo and to migrate data from the NAS device to the cloud.

You can also refer to this solution to migrate data from the NAS in the cloud to SFS Turbo. For details, see Migrating Data from the NAS in the Cloud to SFS.

Limitations and Constraints

  • Only ECSs running Linux can be used for data migration.
  • The UID and GID of your file are no longer consistent after synchronization.
  • The file access modes are no longer consistent after synchronization.

Prerequisites

  • You have enabled and configured Direct Connect. For details, see Direct Connect User Guide.
  • You have obtained a Linux ECS.
  • You have created an SFS Turbo file system and have obtained the mount point of the file system.
  • You have obtained the mount point of the local NAS device.

Procedure

  1. Log in to the ECS management console.
  2. Log in to the created Linux ECS to access the local NAS device and the SFS Turbo file system.
  3. Run the following mount command to access the local NAS storage device:

    mount -t nfs -o vers=3,timeo=600,noresvport,nolock Mount point of the local NAS device /mnt/src

  4. Run the following mount command to access the file system:

    mount -t nfs -o vers=3,timeo=600,noresvport,nolock Mount point of the file system /mnt/dst 

  5. Run the following command on the Linux ECS to install the rclone tool:

    wget https://downloads.rclone.org/rclone-current-linux-amd64.zip --no-check-certificate
    unzip rclone-current-linux-amd64.zip
    chmod 0755 ./rclone-*/rclone
    cp ./rclone-*/rclone /usr/bin/
    rm -rf ./rclone-*

  6. Run the following command to synchronize data:

    rclone copy /mnt/src /mnt/dst -P --transfers 32 --checkers 64 --copy-links

    The parameters are described as follows. Set transfers and checkers based on the system specifications.

    • transfers: number of files that can be transferred concurrently
    • checkers: number of local files that can be scanned concurrently
    • P: data copy progress
    • copy-links: copying soft links

    After data synchronization is complete, go to the target file system to check whether the migration is successful.

Migrating Data from the NAS in the Cloud to SFS

To migrate data from a NAS device in the cloud to your SFS Turbo file system, ensure that the NAS and file system are in the same VPC or you can use Cloud Connect.

For details about how to configure Cloud Connect, see Direct Connect User Guide.