Migrating Data from SFS Capacity-Oriented to SFS Turbo (CIFS Protocol)
Solution Overview
This section describes how to migrate data from SFS Capacity-Oriented to SFS Turbo. The migration aims to efficiently and securely migrate data while ensuring data integrity and consistency. The entire process includes a full migration (no impact on services), a first incremental migration (no impact on services), unmounting the SFS Capacity-Oriented file system (services are interrupted), a second incremental migration (services are interrupted), and switching the mount service (services are interrupted).

Constraints
- This solution is only applicable for the data migration of Windows ECSs.
- The Windows ECS, SFS Capacity-Oriented file system, and SFS Turbo file system must be in the same VPC and same security group.
- The SFS Capacity-Oriented file system uses the CIFS protocol, and the SFS Turbo file system uses the SMB protocol.
Preparations
- Create an SMB SFS Turbo file system in the same VPC and security group as the SFS Capacity-Oriented file system.
- For how to create an SFS Turbo file system, see Creating an SFS Turbo File System.
- If no VPC is available, create one in the same region and then create the SFS Turbo file system.
- If your account does not have the security group permissions, when creating the SFS Turbo file system, select Security Group under Advanced Settings and deselect Allow traffic on certain ports on the displayed page (this way, the file system can only be mounted to ECSs in the same security group).
- Prepare a Windows ECS. The ECS must be in the same VPC and security group as the SFS Capacity-Oriented and SFS Turbo file systems, so that it can communicate with both file systems.
If no ECS is available, buy one by referring to Purchasing and Using a Windows ECS.
- Log in to the ECS and enable the Workstation and TCP/IP NetBIOS Helper services. For details, see Mounting an SMB File System in Windows.
- Mount both the SFS Capacity-Oriented and SFS Turbo file systems on the Windows ECS.
- Obtain the mount information.
Log in to the SFS console. Click the name of the created file system. Obtain the mount command of the SFS Capacity-Oriented file system by following "Mount Information" > "Mount in Windows" on the page. Obtain the mount command of the SFS Turbo file system by following "Basic Info" > "IPv4 Mount Command" > "Command in Windows".
- Switch in to the ECS console and log in to the Windows ECS.
- Open Command Prompt and run the following commands to mount the SFS Capacity-Oriented and SFS Turbo file systems using available drive letters (X and Y are used as example drive letters):
net use X: <mount-address of-the-SFS Capacity-Oriented-file-system>
net use Y: <mount-address-of-the-SFS-Turbo-file-system>
The format of the file system mount address is \\<file-system-domain-name>\<path>.
Table 1 Variables Variable
Description
<file-system-domain-name>
Obtain the file system domain name from the file system mount address. For details, see Viewing a File System.
<path>
The format is share-xxxxxxxx, where x is a digit or letter.
- Run net use. If information similar to the following is returned, the file systems have been mounted:
PS C:\Users\Administrator> net use New connections will be remembered. Status Local Remote Network ----------------------------------------------------------------- OK X: \\sfs-nas1.xxx.myhuawei xxx OK Y: \\f8be395d-xxx-8aa8-6aa460 xxx The command completed successfully.
- During mounting, if the system returns the message "You cannot access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network", handle it by referring to Failed to Access the Shared Folder in Windows.
- Open Command Prompt and run the following commands to mount the SFS Capacity-Oriented and SFS Turbo file systems using available drive letters (X and Y are used as example drive letters):
- Obtain the mount information.
Resource Planning
Table 1 describes the resource planning in this solution.
|
Resource |
Example Configuration |
|---|---|
|
ECS |
Specifications: general computing | x1.2u.2g | 8 vCPUs | 16 GiB OS: Windows Region: CN-Hong Kong VPC: VPC1 |
Procedure
- Log in to the ECS console.
- Log in to the Windows ECS using VNC.
- Full migration: Migrate all files from the SFS Capacity-Oriented file system to the SFS Turbo file system.
Run the following command to synchronize data using Robocopy:
robocopy X:\ Y:\ /e /w:5 /z /mt:32
- /e: copies all subdirectories (including empty directories).
- /w: sets the retry interval (in seconds) of an error.
- /z: enables resumable transfer.
- /mt: specifies the number of concurrent copy threads. The value ranges from 1 to 128. The default value is 8.
- First incremental migration: Synchronize the incremental data generated after the full migration to the SFS Turbo file system.
robocopy X:\ Y:\ /e /w:5 /z /mt:32
Take note of the start time and end time of this operation. This period is approximately the time that customer services are interrupted.
- Unmounting the SFS Capacity-Oriented file system: To prevent new data from being written to the file system, before synchronizing the incremental data, stop the service application that uses the source file system on all ECSs and containers.
- Ensure that the SFS Capacity-Oriented file system is unmounted from all service ECSs (or cloud containers). Otherwise, after the migration, data in the SFS Turbo file system may be inconsistent with that in the SFS Capacity-Oriented file system.
- Do not unmount the SFS Capacity-Oriented file system from the ECS that you use to perform the migration.
- Ensure that services are stopped when you perform this step.
- Log in to each service ECS that mounts the SFS Capacity-Oriented file system.
- Unmount the SFS Capacity-Oriented file system.
net use <drive-letter>: /del
- Second incremental migration: Synchronize the incremental data generated after the first incremental migration to the SFS Turbo file system. After the synchronization, data in the SFS Turbo file system will be the same as that in the SFS Capacity-Oriented file system.
robocopy X:\ Y:\ /e /w:5 /z /mt:32
- Check that data in the SFS Turbo file system is the same as that in the SFS Capacity-Oriented file system.
- Ensure that services are stopped when you perform this step.
- Check the migration result.
robocopy X:\ Y:\ /e /l /ns /njs /njh /ndl /fp /log:reconcile.txt
If the files in the two file systems are the same, the reconcile.txt log file is empty. Otherwise, the log file records the file list.
- /e: Lists directories (including empty directories) only.
- /l: Records differences only and does not modify or copy files.
- /ns: Does not include file sizes in the log.
- /njs: Does not include job summaries.
- /njh: Does not include job headers.
- /ndl: Does not include folders in the log.
- /fp: Includes full paths of files in the log.
- /log:reconcile.txt: Writes the migration results to the reconcile.txt log. If the log already exists, the existing log will be overwritten.
- Switching the mount service: Mount all service ECSs to the SFS Turbo file system.
- Log in to the service ECS and run the following command to unmount the SFS Capacity-Oriented file system:
net use <drive-letter>: /del
- Mount the SFS Turbo file system.
net use <drive-letter>: <mount-address-of-the-SFS-Turbo-file-system>
- Ensure that the mount parameters and directories are correct. Or, services may be affected.
- Because there are differences between metadata storage and SFS Capacity-oriented, after the mount service is switched to SFS Turbo, it is normal that the data size may increase by 8% to 10%.
- Log in to the service ECS and run the following command to unmount the SFS Capacity-Oriented file system:
- The customer restores services and checks whether services are normal.
- After observing the services for a period of time, the customer can release the SFS Capacity-Oriented file system resources to prevent unintended charges.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot