基于最近收到的复制快照克隆复制数据包。
在创建克隆的项目时,通过遵循以下准则以避免命名冲突:
克隆的项目必须具有不会与同一个池中任何现有项目冲突的唯一名称。
克隆项目的任何共享资源的挂载点和 SMB 资源名称不得与任何现有挂载点或 SMB 资源名称发生冲突。
对于继承项目属性的共享资源,可以通过覆盖项目级挂载点和/或 SMB 资源名称来解决冲突。
对于不从项目继承属性的共享资源,可以设置一个将附加到挂载点和/或 SMB 资源名称末尾的后缀来解决冲突,或者分别为每个共享资源覆盖挂载点和/或 SMB 资源名称。
使用以下过程克隆复制数据包。
在 CLI 中,您也可以通过单独覆盖每个共享资源的属性来解决冲突。
hostname:shares replication sources> select source-000 hostname:share replication sources source-000>
hostname:shares replication source-000> select package-004 hostname:shares replication source-000 package-004>
您可以使用 list 命令查看该源中可用的所有复制数据包。
hostname:shares replication source-000> list PROJECT STATE LAST UPDATE package-000 p3 idle Tue Apr 21 2015 19:50:43 GMT+0000 (UTC) package-001 p2 idle Mon Apr 27 2015 17:05:16 GMT+0000 (UTC) package-002 p1 idle Mon Apr 27 2015 17:00:25 GMT+0000 (UTC) package-003 p4 idle Tue Apr 21 2015 21:37:16 GMT+0000 (UTC) package-004 store idle Mon Apr 27 2015 16:40:26 GMT+0000 (UTC) hostname:shares replication source-000>
hostname:shares replication source-000 package-004> clone hostname:shares replication source-000 package-004 clone>
项目名称必须唯一,否则克隆操作将失败。
项目名称必须包含 1 到 64 个字符,但是不能包含空格或以句点开头。允许的字符为:字母数字和特殊字符 _ - . :
hostname:shares replication source-000 package-004 clone> set target_project=clone target_project = clone
如果存在冲突,将显示类似以下内容的消息。
hostname:shares replication source-000 package-004 clone> conflicts Cloning cannot proceed because the following shares have mountpoints or SMB resource names that are invalid or conflict with those of other shares (either on the system or also being failed over). Please specify valid mountpoints or SMB resource names for these shares: SHARE MOUNTPOINT SHARESMB appliances /export/appliances appliances clothes /export/clothes (inherited) clothes (inherited) electronics /export/electronics electronics furniture /export/furniture (inherited) furniture (inherited) groceries /export/groceries (inherited) groceries (inherited) health /export/health (inherited) health (inherited) toys /export/toys toys hostname:shares replication source-000 package-004 clone>
在此过程中,可以随时使用此命令来检查是否存在冲突。
使用 get 命令来查看克隆的属性。
hostname:shares replication source-000 package-004 clone> get target_project = (unset) rename_suffix = original_mountpoint = /export mountpoint = /export original_smb_resource_name = share smb_resource_name = share
属性 original_mountpoint 显示了当前挂载点。属性 original_smb_resource_name 显示当前资源名称。
此设置将应用于从项目继承挂载点的共享资源。将 original_mountpoint 设置为 true。使用 set mountpoint 指定克隆的唯一挂载点。
hostname:shares replication source-000 package-004 clone> set original_mountpoint=true hostname:shares replication source-000 package-004 clone> set mountpoint=/export/clone hostname:shares replication source-000 package-004 clone>
此设置将应用于从项目继承 SMB 资源名称的共享资源。将 original_smb_resource_name 设置为 true。将 smb_resource_name 设置为唯一的 SMB 资源名称。
hostname:shares replication source-000 package-004 clone> set original_smb_resource_name=true hostname:shares replication source-000 package-004 clone> set smb_resource_name=clone-share smb_resource_name = clone-sharesmb
如果发生冲突,此属性会创建附加到挂载点和/或 SMB 资源名称的后缀。
hostname:shares replication source-000 package-004 clone> set rename_suffix=-clone
hostname:shares replication source-000 package-004 clone> select appliances
以下示例将覆盖共享资源的挂载点。
hostname:shares replication source-000 package-004 clone appliances> set original_mountpoint=/export hostname:shares replication source-000 package-004 clone appliances> set mountpoint=/export/clone
hostname:shares replication source-000 package-004 clone> confirm commit
如果检测到名称冲突,将显示类似以下内容的消息:
Cloning cannot proceed because the following shares have mountpoints or SMB resource names that are invalid or conflict with those of other shares (either on the system or also being failed over). Please specify valid mountpoints or SMB resource names for these shares: SHARE MOUNTPOINT SHARESMB appliances /export/appliances appliances clothes /export/clothes (inherited) clothes (inherited) electronics /export/electronics electronics furniture /export/furniture (inherited) furniture (inherited) hostname:shares replication source-000 package-004 clone>
重复步骤 6 和 7,直到冲突全部解决为止。