Working Principles
SmartMigration synchronizes and splits service data to migrate all data from the source LUN to the target LUN. This section provides concepts related to SmartMigration and describes the working principles.
Concepts
- Data organization
The storage system uses a virtualization 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 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.
- Running Status of migration includes Normal, Interrupted, Paused, Faulty, Migrating, and Migrated, as explained in the following table.
Table 1-2 Running status of migration
Status
Explanation
Normal
Data is consistent on the source and target LUNs. Service data is being written to the source and target LUNs at the same time.
Interrupted
Migration is interrupted due to migration I/O errors. Migration can be automatically resumed.
Paused
Migration is manually suspended.
Faulty
A fault is reported when deleting, creating, or splitting a migration task failed.
Migrating
Data is being copied from the source LUN to the target LUN in the background.
Migrated
Migration and splitting operations have been completed.
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 comprises initial synchronization and data change synchronization, which 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:
- Data change synchronization
During the synchronization, host services do not need to be interrupted. 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 the 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 receiving 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.
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.
- 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.
- Pair splitting
Pair splitting means that the data migration relationship between the source LUN and target LUN is removed 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 simultaneously and splits all pairs after the information 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 differences in processes and results between splitting and consistent splitting in a scenario where multiple pairs are used.
Differences Between Two Types of Service Data Migration
SmartMigration enables service data to be migrated within a storage system and between heterogeneous storage systems. However, the two types of service data migration have some differences, as described in Table 1-3.
Service Migration Type |
Difference |
---|---|
Service data migration within a storage system |
Before the migration, the target LUN does not need to be hosted and host services can be running. |
Service migration between heterogeneous storage systems |
The LUN takeover function of SmartVirtualization is used to map LUNs from the heterogeneous storage system to the local storage system first, and then data migration is performed in the local storage system online. SmartVirtualization can take over external LUNs offline or online. The online method does not interrupt host services, however the offline takeover causes short service interruption. NOTE:
|