Professional Documents
Culture Documents
1
Native Migration (Transformation)
Vasily Pantyukhin
http://oldhenhut.com
Contents
• Check JCenteraVerify logs
**************************************************************
************** Start of JCenteraVerify log ******************
**************************************************************
--------------------- General information -----------------------
Time: Tue Jun 07 16:10:03 CEST 2016
Tool Version: 3.2.23
SDK Version: 3.2.607
--------------------- User configuration ------------------------
TOOL SETTINGS
Number Of Files: 3
FileSize (KB): 1, 10, 100
Working Dir: .\Temp
Restore Dir: .\Temp\Retrieve
Log File: .\JCenteraVerify.log
Delete temp Files: true
Delete restore Files: true
SDK SETTINGS
Number of Retries: -1
Retry Sleep: -1
----------------- JCenteraVerify test results -------------------
ACCESS NODE CONNECTIVITY CHECK
192.168.0.6?C:\zz_business_temp\NASforapp_T1.pea is available.
CLUSTER INFORMATION
ClusterId: 4abb97ce-1dd2-11b2-97bc-955cedfd9a8d
CentraStar: 4.2.2-4682-2-0
Available Capacity: 23,240 GB
Total Free Capacity: 26,82 GB
Replica Address: 192.168.0.28
CAPABILITIES
Read allowed: true
Write allowed: true
Delete allowed: true
Exists allowed: true
Purge allowed: false
Monitor allowed: false
Query allowed: true
PrivDelete allowed: false
Writing the file 1
1 File(s) written successfully. CA: 1V2115AP198S2e01GENR0VQFVS1
Reading the file 1. CA: 1V2115AP198S2e01GENR0VQFVS1
1 File(s) read successfully
Deleting the file 1. CA: 1V2115AP198S2e01GENR0VQFVS1
1 File(s) deleted successfully
Writing the file 2
2 File(s) written successfully. CA: DDI527S7SB9L5eF51GSNOKM4UIO
Reading the file 2. CA: DDI527S7SB9L5eF51GSNOKM4UIO
2 File(s) read successfully
Deleting the file 2. CA: DDI527S7SB9L5eF51GSNOKM4UIO
2 File(s) deleted successfully
Writing the file 3
3 File(s) written successfully. CA: 10M3R9KL1OS96eAEJ1LA10VPFVC
Reading the file 3. CA: 10M3R9KL1OS96eAEJ1LA10VPFVC
3 File(s) read successfully
Deleting the file 3. CA: 10M3R9KL1OS96eAEJ1LA10VPFVC
3 File(s) deleted successfully
**************************************************************
***************** End of JCenteraVerify log ****************
**************************************************************
• We are going to use the RG distributed across 2x VDCs
A Profile Mapping defines a mapping between a pair of data instances defined as a Centera Pool and
Profile mapped to a to a pair of data instances defined as an ECS bucket and an ECS user.
Auto-calculated Profile Mappings are less authoritative than manually created ones. If a target_user or
target_bucket of an auto-calculated Profile Mapping matches an already existing ECS user or ECS bucket,
ECS marks that auto-calculated Profile Mapping as a conflicting one. You cannot start a transformation
if conflicting Profile Mappings exist. You can over-ride a conflicting auto-calculated Profile Mapping by
setting a manual Profile Mapping entry for Centera source profile.
• List of currently available Profile Mapping entries.
admin@host:/tmp> curl -k -XGET ${HEADERS} ${TRANSFORMATION_BASE_URI}/profile/mapping |
xmllint --format –
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile_mappings>
…
<mappings>
<centera_profile>
<mask>rdqe-cw-</mask>
<pool>NASforapp_T2</pool>
<profile>replication</profile>
<source_id>NASforapp_T2/replication</source_id>
</centera_profile>
<profile_mapping>
<source_id>NASforapp_T2/replication</source_id>
<target_bucket>NASforapp_T2</target_bucket>
<target_namespace>centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d</target_namespace>
<target_user>replication</target_user>
</profile_mapping>
<conflict>
<conflict_type>userExists</conflict_type>
</conflict>
</mappings>
<mappings>
<centera_profile>
<mask>rdqe-cw-</mask>
<pool>NASforapp_T2</pool>
<profile>NASforapp_T2</profile>
<source_id>NASforapp_T2/NASforapp_T2</source_id>
</centera_profile>
<profile_mapping>
<source_id>NASforapp_T2/NASforapp_T2</source_id>
<target_bucket>NASforapp_T2</target_bucket>
<target_namespace>centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d</target_namespace>
<target_user>nasforapp_t2</target_user>
</profile_mapping>
</mappings>
</profile_mappings>
10
Manual naming assignment and pre-check conflicts must be resolved manually by setting Profile
Mappings.
• Specify how source Centera Pool:Profile should be mapped to ECS user and backet in the .json file.
admin@host:/tmp> vi mapping-modif.json
{
"mappings": [
{
"source_id": "NASforapp_T2/replication",
"target_user": "replication3",
"target_bucket": "NASforapp_T2",
"target_namespace": "centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d"
},
{
"source_id": "NASforapp_T3/replication",
"target_user": "replication4",
"target_bucket": "NASforapp_T3",
"target_namespace": "centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d"
}
]
}
• Change the Accept:application header from xml to json
• Assign the customized mapping
admin@host:/tmp> export HEADERS="-H X-SDS-AUTH-TOKEN:$(cat /tmp/token) -H
Accept:application/json -H Content-Type:application/json"
admin@host:/tmp> curl -s -k -XPOST ${HEADERS} -d @mapping-modif.json
${TRANSFORMATION_BASE_URI}/profile/mapping
• For better xml structure readability change the Accept:application header from json back to xml
• Checke the modified mapping
admin@host:/tmp> export HEADERS="-H X-SDS-AUTH-TOKEN:$(cat /tmp/token) -H
Accept:application/xml -H Content-Type:application/json"
admin@host:/tmp> curl -k -XGET ${HEADERS} ${TRANSFORMATION_BASE_URI}/profile/mapping |
xmllint --format –
…
<profile_mapping>
<source_id>NASforapp_T2/replication</source_id>
<target_bucket>NASforapp_T2</target_bucket>
<target_namespace>centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d</target_namespace>
<target_user>replication3</target_user>
</profile_mapping>
</mappings>
<profile_mapping>
<source_id>NASforapp_T3/replication</source_id>
<target_bucket>NASforapp_T3</target_bucket>
<target_namespace>centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d</target_namespace>
<target_user>replication4</target_user>
</profile_mapping>
11
ECS need to have one or several CAS pools to be selected for Transformation. Selection is made by
supplying a list of Centera profile source_id values via Set Transformation Sources REST API. Only one
Centera profile per pool can be selected as a source. Selected source profile should have Read and Query
capabilities
• Specify the Centera Pool to be transformed in the .json file
admin@host:/tmp> vi transformationsources.json
{
"source_ids" : [
"NASforapp_T2/NASforapp_T2",
"NASforapp_T3/NASforapp_T3"
]
}
• Assign transformation sources
admin@host:/tmp> curl -s -k -XPOST ${HEADERS} -d @transformationsources.json
${TRANSFORMATION_BASE_URI}/transformationSources | xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<transformation>
<transformation_id>urn:Transformation:Centera:4abb97ce-1dd2-11b2-97bc-
955cedfd9a8d</transformation_id>
</transformation>
• Check the assigned transformation sources
admin@host:/tmp> curl -s -k ${HEADERS} ${TRANSFORMATION_BASE_URI} | xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<transformation>
<namespace>centera_4abb97ce-1dd2-11b2-97bc-955cedfd9a8d</namespace>
<replication_group>urn:storageos:ReplicationGroupInfo:f3fdeb40-0b14-4896-bdda-
2af1710227ec:global</replication_group>
<source_ids>NASforapp_T2/NASforapp_T2</source_ids>
<source_ids>NASforapp_T3/NASforapp_T3</source_ids>
<transformation_id>urn:Transformation:Centera:4abb97ce-1dd2-11b2-97bc-
955cedfd9a8d</transformation_id>
</transformation>
During the pre-check phase, ECS will make sure the data from these pools can be migrated and will
create the different components (namespace, buckets, users).
The result of the pre-check must be read carefully to ensure the migration can be performed
12
13
<message/>
<name>HW_VERSION_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>UPGRADE_STATUS_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>SW_VERSION_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>COMPLIANCE_MODE_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>ADVANCED_RETENTION_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>PROFILE_MAPPING_CONFLICTS_RESOLVED_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>RECONCILIATION_USERS_SETUP_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>SOURCE_PROFILES_ARE_CONFIGURED</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>SOURCE_PROFILES_AUTH_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>NAMESPACE_CREATED_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>BUCKETS_CREATED_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
14
<message/>
<name>USERS_CREATED_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>RETENTION_CLASSES_IMPORT_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>COMPLIANCE_MODE_PERSISTED_CHECK</name>
<status>OK</status>
</prechecks>
<prechecks>
<message/>
<name>RECONCILIATION_USERS_CREATED_CHECK</name>
<status>OK</status>
</prechecks>
</precheck_report>
3.4.1. Namespace
15
• Quotas and Access During Outage are disabled for the Namespace
3.4.2. Users
• Object users for data access and reconciliation are automatically created
16
• CAS access is not configured for this user
• Object user for every Pool / Bucket
• That kind of users always configured to get an object access
• Password and corresponding .pea file are generated
• Transformation MetaInfo attribute is specified
17
• Separate reconciliation user is used to check data consistency on the final step of the of data
migration
18
• We are not going to use the user which corresponds to the 2nd Centera Profile for the data access
• Despite on that, the corresponding user is created following the mapping rules
19
3.4.3. Buckets
• Bucket owner is root cause an authorization is configured via ACL
• Soft Quota is assigned according to the Centera’s Pool Quota Alert parameter
20
• The main object use which corresponds to the source Centera Profile has Full Control ACL rights
• Additional user which corresponds the 2nd Centera profile has Read / Write and Delete rights
• Reconciliation user can read data only
21
Issues must be resolved and prechecks to be retried, however, in certain scenarios Error status can be
ignored
• Warning – Transformation is started. It is safe to perform the Application switch over to ECS. ECS has
discovered a minor problem which can be resolved afterwards
• Ok - Transformation is started without discovering any problem
Possible pre-check conflicts are:
Check Description
userExists automatically calculated ECS user name matches already existing ECS user
bucketExists automatically calculated ECS bucket name matches already existing ECS bucket
userOverlaps several automatically calculated ECS user names equals to each other
• Example of the possible pre-check conflict
<message>Unresolved ProfileMappings found: [NASforapp_T2/replication, ...]</message>
<name>PROFILE_MAPPING_CONFLICTS_RESOLVED_CHECK</name>
<status>VETO</status>
The most common reason for pre-check conflicts is the mapping conflicts. Is can be resolve as described
in the corresponding section above.
4. Run Enumeration
Important: Don’t start the enumeration before the application has been configured to communicate with
ECS instead of the Centera. Otherwise, new objects created after enumeration is started will not be
migrated.
At the Enumeration stage ECS creates a list of Centera content
o Centera Query is used to list clips
o ECS uses write time of the first written clip as a lower bound
o Current time as upper bound for the query
o ECS chops initially detected time interval into smaller pieces to parallelize processing
22
o Tasks to enumerate resulting time frames are spread across the ECS nodes randomly to
parallelize processing
o Enumeration of different time frames is performed without strict ordering
o Knowledge on how densely clips are located on a time line is not available for ECS – some
enumeration task may get more work than others
• Start Enumeration job
admin@host:/tmp> curl -s -k -XPOST ${HEADERS} ${TRANSFORMATION_BASE_URI}/enumeration |
xmllint --format –
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<transformation>
<transformation_id>urn:Transformation:Centera:4abb97ce-1dd2-11b2-97bc-
955cedfd9a8d</transformation_id>
</transformation>
• Check the status of the pre-checks
admin@host:/tmp> curl -s -k -XGET ${HEADERS} ${TRANSFORMATION_BASE_URI}/enumeration |
xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enumeration_report>
<pool_result source_id="NASforapp_T2/NASforapp_T2">
<entry_count>5</entry_count>
</pool_result>
<processing_speed>4.9E-324</processing_speed>
<processing_speed_for_last_day>4.9E-324</processing_speed_for_last_day>
<processing_speed_for_last_hour>0.0</processing_speed_for_last_hour>
<progress>100.0</progress>
<start_time>2016-06-09T11:53:24.380</start_time>
<status>Succeeded</status>
</enumeration_report>
• Call this request, ideally in a timed loop, until the API returns both "status": "Succeeded" and
"progress": 100.0.
During the Data Indexing phase, ECS will get all the metadata from Centera
o At this stage ECS processes the previously created list of clips/blobs and builds internal indexes
of Centera content
o Once Centera object is indexed it becomes native ECS object
o Indexed objects become available globally through all ECS VDCs in replication group
23
o Indexing also prepares for upcoming Migration planning how objects will be packed in chunks
• Run Indexing job
admin@host:/tmp> curl -s -k -XPOST ${HEADERS} ${TRANSFORMATION_BASE_URI}/indexing | xmllint
--format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<transformation>
<transformation_id>urn:Transformation:Centera:4abb97ce-1dd2-11b2-97bc-
955cedfd9a8d</transformation_id>
</transformation>
• Get Indexing status
admin@host:/tmp> curl -s -k -XGET ${HEADERS} ${TRANSFORMATION_BASE_URI}/indexing | xmllint -
-format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<indexing_report>
<processing_speed>4.9E-324</processing_speed>
<processing_speed_for_last_day>4.9E-324</processing_speed_for_last_day>
<processing_speed_for_last_hour>0.0</processing_speed_for_last_hour>
<progress>100.0</progress>
<start_time>2016-06-09T13:08:52.717</start_time>
<status>Succeeded</status>
<processed_bytes>18172960</processed_bytes>
<processed_objects>5</processed_objects>
</indexing_report>
• Call this request, ideally in a timed loop, until it returns both "status": "Succeeded" and "progress":
100.0.
Note: Quota is checked during Indexing for the quota enabled Namespace/Bucket
o May cause Indexing to fail if hard quota for Namespace/Bucket is exceeded
o No storage space pre allocated for objects content during indexing
In case any issue is detected, the list of C-clips that haven’t been migrated successfully can be obtained.
Any mismatched clips will not automatically retry, but require manual intervention to retry migration.
o Migration phase goes through all chunks created at indexing phase and fulfills it with objects
content Migration process includes erasure coding of migrated content on the fly
o Migration is preformed by all ECS nodes
o Several chunks are migrated at the same time without strict ordering
24
o Due to concurrent and orderless nature of migration some objects may be partially migrated at
particular point in time
Note: You must already have succeeded at the Data Indexing phase to begin the Data Migration phase.
• Run Migration job
admin@host:/tmp> curl -s -k -XPOST ${HEADERS} ${TRANSFORMATION_BASE_URI}/migration |
xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<transformation>
<transformation_id>urn:Transformation:Centera:4abb97ce-1dd2-11b2-97bc-
955cedfd9a8d</transformation_id>
</transformation>
• Get Migration status
admin@host:/tmp> curl -s -k -XGET ${HEADERS} ${TRANSFORMATION_BASE_URI}/migration |
xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<migration_report>
<processing_speed>0.0</processing_speed>
<processing_speed_for_last_day>0.0</processing_speed_for_last_day>
<processing_speed_for_last_hour>0.0</processing_speed_for_last_hour>
<progress>100.0</progress>
<start_time>2016-06-10T11:21:18.775</start_time>
<status>Succeeded</status>
</migration_report>
• Call this request, ideally in a timed loop, until it returns both "status": "Succeeded" and "progress":
100.0.
o During Reconciliation ECS goes through the list of objects collected during Enumeration phase
and verifies that those are readable from ECS
o As the result Reconciliation phase produces a list of objects which are not readable from ECS or
their checksum does not match
o Reconciliation uses special ECS data users which has no mapping to Centera profiles which
ensures that ECS logic won’t fallback to Centera during reading objects
25
26
27
9. Appendix
9.1. Centera to ECS mappings
• Centera Access Masks are collapsed into Effective Access Mask by following formula
• Effective Access Mask mapped to appropriate ECS Bucket Access rights for particular user
• ECS Bucket Access rights are automatically copied into Object Access Rights for each object
transformed
28