Go to main content

Oracle® ZFS Storage Appliance 管理指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

反转脱机复制 (CLI)

按照下面的过程将脱机复制数据包移到一个新的本地项目(已配置为复制回源设备)。

开始之前

将脱机复制流从 NFS 服务器导入到复制目标,如从 NFS 服务器中导入复制流 (CLI)中所述。

  1. 从复制目标中,导航到复制的数据包并找到项目:
    target:> shares replication packages
    target: shares replication packages> select package-000
    target:shares replication package-000> ls
    Properties:
    
                                id = 1c0457eb-45bd-4f91-8e08-bc0dbacd40b7
                       source_name = bigfish78
                        source_asn = d1fce51d-b8a9-6cf8-d71e-fcd4fe42cd0e
                         source_ip = 10.000.000.000:216
                       target_pool = poolA
                        replica_of = proj1
                           enabled = true
                             state = idle
                 state_description = Idle (no update in progress)
                           offline = false
                       import_path =
                    data_timestamp = Thu Feb 16 2017 19:10:59 GMT+0000 (UTC)
                         last_sync = Fri Feb 17 2017 03:10:11 GMT+0000 (UTC)
                          last_try = Fri Feb 17 2017 03:10:11 GMT+0000 (UTC)
                       last_result = success
    
    
    Projects:
                             proj1
    
  2. 输入 pkgreverse
    target:shares replication package-000> pkgreverse
  3. (u53ef选) 使用以下命令设置新项目名称并启用操作:
    target:shares replication package-000 pkgreverse> set new_project_name=new-kmm3
                  new_project_name = new-kmm3
    target:shares replication package-000 pkgreverse> set enable_action_upon_reversal=true
       enable_action_upon_reversal = true
    

    注 -  项目名称在执行反转操作的设备上必须唯一。如果生产站点中的设备上存在相同名称的项目,反转操作将失败。
  4. 输入 show 以确认属性,然后输入 commit
    target:shares replication package-000 pkgreverse> show
    Properties:
                  new_project_name = new-kmm3
       enable_action_upon_reversal = true
    
    host-prod:shares replication package-000 pkgreverse> commit
    This action will move the contents of this package to a new local project
    configured to replicate back to the source. Any data or metadata changes made
    on the source since the last successful update will be lost when the new
    project is replicated back to the source. If replication actions on the source
    are not disabled, future updates to this package will fail.
    
  5. 导航到 shares replication actions
    target:shares replication packages> cd /
    target:> shares replication actions
  6. 使用前面的步骤中的数据包 ID 选择新创建的操作。

    使用数据包 ID 作为 origin_pkg_id 来选择操作。

    target:shares replication actions> select origin_pkg_id=
    1c0457eb-45bd-4f91-8e08-bc0dbacd40b7
    target:shares replication action-000> ls
    Properties:
                                id = 6a10ce61-cc87-4850-89dd-8673f7734d03
                     origin_pkg_id = 1c0457eb-45bd-4f91-8e08-bc0dbacd40b7
                            target = new_target
                       target_pool = p
                       source_pool = p
                    replication_of = dataset1
                           enabled = true
                        continuous = false
                     include_snaps = false
       retain_user_snaps_on_target = false
                             dedup = false
      include_clone_origin_as_data = false
                     max_bandwidth = unlimited
                        bytes_sent = 0
                    estimated_size = 0
               estimated_time_left = 00:00:00
                average_throughput = 0B/s
                           use_ssl = false
                       compression = on
                       export_path = 
                             state = idle
                 state_description = Idle (no update in progress)
                    export_pending = false
                           offline = false
                       next_update = Sync now
            replica_data_timestamp = Thu Feb 09 2017 16:17:25 GMT+0000 (UTC)
                         last_sync = <unknown>
                          last_try = <unknown>
                       last_result = <unknown>
                       replica_lag = 461:55:40
          recovery_point_objective =
         replica_lag_warning_alert =
           replica_lag_error_alert =
    replica_lag_over_warning_limit = false
      replica_lag_over_error_limit = false
  7. 要将反转后的第一个复制更新导出到 NFS 服务器,请输入 export_path 和 NFS 服务器的路径名。输入 commit,然后输入 sendupdate
    target:shares replication action-000> set export_path=nfs://nfs_server/export/init_repl
                       export_path = nfs://nfs_server/export/init_repl (uncommitted)
    target:shares replication action-000> commit
    target:shares replication action-000> sendupdate
    target:shares replication action-000> ls
    Properties:
                                id = 6a10ce61-cc87-4850-89dd-8673f7734d03
                     origin_pkg_id = 1c0457eb-45bd-4f91-8e08-bc0dbacd40b7
                            target = new_target
                       target_pool = p
                       source_pool = p
                    replication_of = dataset1
                           enabled = true
                        continuous = false
                     include_snaps = false
       retain_user_snaps_on_target = false
                             dedup = false
      include_clone_origin_as_data = false
                     max_bandwidth = unlimited
                        bytes_sent = 0
                    estimated_size = 0
               estimated_time_left = 00:00:00
                average_throughput = 0B/s
                           use_ssl = false
                       compression = on
                       export_path = nfs://nfs_server/export/init_repl
                             state = idle
                 state_description = Idle (no update in progress)
                    export_pending = false
                           offline = false
                       next_update = Sync now
            replica_data_timestamp = Thu Feb 09 2017 16:17:25 GMT+0000 (UTC)
                         last_sync = <unknown>
                          last_try = <unknown>
                       last_result = <unknown>
                       replica_lag = 461:55:40
          recovery_point_objective =
         replica_lag_warning_alert =
           replica_lag_error_alert =
    replica_lag_over_warning_limit = false
      replica_lag_over_error_limit = false
  8. 复制更新完成后,导航到新目标上新反转的数据包。状态描述应为 "Idle"(闲置),如下例所示:
    new_target:shares replication packages> ls
    Packages:
    
    ID          STATE DATA_TIMESTAMP      SOURCE     DATASET
    package-000 idle  unknown             target     <unknown>
  9. 选择数据包并输入 ls 以列出其属性。
    new_target:shares replication packages> select package-000
    new_target:shares replication package-000> ls
    
    Properties:
                                id = 6a10ce61-cc87-4850-89dd-8673f7734d03
                       source_name = target
                        source_asn = ddbd5d4e-daff-4f52-9417-cd6e893c694a
                         source_ip = 00.000.00.000:216
                       source_pool = poolA
                       target_pool = poolA
                        replica_of = <unknown>
                           enabled = true
                             state = idle
                 state_description = Idle (no update in progress)
                           offline = true
                       import_path =
                    data_timestamp = unknown
                         last_sync = unknown
                          last_try = unknown
                       last_result = unknown
  10. 从 NFS 服务器导入更新。
    new_target:shares replication package-000> set import_path=nfs://nfs_server/export/init_repl
                       import_path = nfs://nfs_server/export/init_repl (uncommitted)
  11. 输入 commit,然后列出数据包属性来确认更新是否已完成。

    属性 last_result 显示了 success

    new_target:shares replication package-000> commit
    new_target:shares replication package-000> ls
    Properties:
                                id = 6a10ce61-cc87-4850-89dd-8673f7734d03
                       source_name = target
                        source_asn = ddbd5d4e-daff-4f52-9417-cd6e893c694a
                         source_ip = 00.000.00.000:216
                       source_pool = poolA
                       target_pool = poolA
                        replica_of = <unknown>
                           enabled = true
                             state = idle
                 state_description = Idle (no update in progress)
                           offline = false
                       import_path =
                    data_timestamp = unknown
                         last_sync = Fri Jul 31 2015 22:11:32 GMT+0000 (UTC)
                          last_try = Fri Jul 31 2015 22:11:32 GMT+0000 (UTC)
                       last_result = success

    相关主题