
1. Definition
SmartMigration is a key technology for service migration. It can non-disruptively migrate service data within a storage system and between storage systems.
Services on a source LUN can be completely migrated to a target LUN without interrupting host services. The target LUN can totally replace the source LUN to carry services after the replication is complete.
SmartMigration is only supported for LUNs (block services).
2. Concepts
Data organization
The storage system uses a virtual storage technology. Virtual data in the storage pool consists of meta volumes and data volumes.
Meta volume: records the data storage locations, including LUN IDs and data volume IDs. LUN IDs are used to identify LUNs and data volume IDs are used to identify the physical space of data volumes.
Data volume: stores user data.
Source LUN
LUN from which service data is migrated.
Target LUN
LUN to which service data is migrated.
LM module
Manages SmartMigration in the storage system.
Pair
In SmartMigration, a pair indicates the data migration relationship between the source LUN and target LUN. A pair can have only one source LUN and one target LUN.
Dual-write
The process of writing data to the source and target LUNs at the same time during service data migration.
Log
Records data changes on the source LUN to determine whether the data is written to the target LUN at the same time. Both systems can be written simultaneously using the dual-write technology.
Data change log (DCL)
Records differential data that fails to be written to the target LUN during the data change synchronization.
Splitting
The process of stopping service data synchronization between the source LUN and target LUN, exchanging LUN information, and then removing the data migration relationship between the source LUN and target LUN.
3. Working Principles
Service Data Synchronization
After creating a SmartMigration task, you need to use the source LUN and target LUN to create a pair. Service data synchronization between the source and target LUNs involves initial synchronization and data change synchronization. The two synchronization methods can take place at the same time, ensuring that service data in the source LUN is synchronized to the target LUN and service data changes are synchronized to the source and target LUNs.
Initial synchronization
After service data synchronization starts on the source LUN, all initial service data is copied to the target LUN, as shown in Figure 1-1:
Figure 1-1 Initial synchronization

Data change synchronization
During the synchronization, host services can be ongoing. When data is changed on the host, the host sends an I/O write request to the storage system. Then, the storage system starts data change synchronization and writes the changed service data to both the source LUN and target LUN using dual-write technology. If data fails to be written to the target LUN, the storage system records the data differences in the DCL and copies the data that fails to be written from the source LUN to the target LUN according to the DCL. After the copy is complete, the storage system returns a write success acknowledgment to the host. If data fails to be written to the source LUN, the storage system returns a write failure. Upon reception of the write failure, the host re-sends the data to the source LUN only, but not to the target LUN. This mechanism ensures data consistency on the source and target LUNs during migration. Figure 1-2 shows how changed data is synchronized.
Figure 1-2 Data change synchronization

Process of synchronizing changed data during service migration:
The host delivers an I/O write request to the LM module of the storage system. The LM module writes the data to the source LUN and target LUN and records this write operation to the log. The source LUN and target LUN return the data write result to the LM module. The LM module determines the result:If the data fails to be written to the target LUN, the log is saved to the DCL that records the data changes. The storage system copies the changed data from the source LUN to the target LUN according to the DCL and then clears the DCL records. If the data fails to be written to the source LUN, a write I/O failure is returned to the host. Then, the host re-sends the data only to the source LUN. After the data is successfully written, log records will be cleared. If the data is successfully written to the source LUN and target LUN using dual-write technology, log records will be cleared automatically. A write success acknowledgment is returned to the host.
Splitting
Splitting is performed on a single pair. The splitting process is as follows: Service data synchronization between the source LUN and the target LUN in a pair is stopped. Then, the two LUNs exchange LUN information. After that, the data migration relationship is canceled. During the split, host services are suspended. After the information exchange, services are delivered to the target LUN. The process is invisible to users.
Figure 1-3 illustrates the principle of splitting.
Figure 1-3 Principle of splitting

LUN information exchange
LUN information exchange is the prerequisite for the target LUN to take over services from the source LUN after service information is synchronized.
Before LUN information is exchanged, the host uses the source LUN ID to identify the source LUN and uses the source data volume ID to identify the source LUN's physical space. A mapping relationship is established between the source LUN ID and the source data volume ID so that the host can read the physical space of the source LUN. The mapping relationship also exists between the target LUN ID and target data volume ID. During LUN information exchange, the source and target data volume IDs are exchanged while the source and target LUN IDs remain unchanged. In this way, the source LUN ID points to the physical space identified by the target data volume ID. After LUN information exchange, the host can still identify the source LUN using the source LUN ID but read the target LUN's physical space. In this way, services are migrated without awareness of users.
Figure 1-4 illustrates the principle of LUN information exchange.
Figure 1-4 LUN information exchange

Pair splitting
You can remove the data migration relationship between the source LUN and target LUN after LUN information is exchanged. After the pair is split, if the host delivers an I/O request to the storage system, data is only written to the source LUN (the physical space to which the source LUN ID points is the target data volume). The target LUN will store all data of the source LUN at the pair splitting point in time. After the pair splitting, no connections can be established between the source LUN and target LUN.
Consistent splitting enables multiple pairs to exchange LUN information at the same time and splits all pairs after the exchange is complete, ensuring data consistency at any point in time before and after the pairs are split.
In scenarios where multiple pairs are used, such as in medium- and large-size database applications, data, logs, records, and other files are stored on LUNs that are associated with one another in the storage system. Splitting cannot ensure that information in one LUN is always associated with that in another. If data in a LUN is unavailable, data in the other LUNs may become invalid. Consistent splitting can resolve this problem. Figure 1-5 illustrates the implementation processes and results of splitting and consistent splitting in a scenario where multiple pairs are used.
Figure 1-5 Splitting and consistent splitting

4. Configuration Process

That's all, thanks!

