Go to main content

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x

Exit Print View

Updated: September 2017
 
 

Cloning a Replication Package (CLI)

A clone of a replication package is based on the most recently received replication snapshot.

When creating a cloned project, avoid naming conflicts by following these guidelines:

  • The cloned project must have a unique name that does not conflict with any of the existing projects within the same pool.

  • The mountpoint and SMB resource name for any of the shares of the cloned project must not conflict with any existing mountpoint or SMB resource names.

  • For shares that inherit project properties, resolve conflicts by overriding the project-level mountpoint and/or SMB resource name.

  • For shares that do not inherit properties from the project, set a suffix that will be appended to the mountpoint and/or SMB resource names to resolve conflicts, or override the mountpoint and/or SMB resource name individually for each share.

Use the following procedure to clone a replication package.

  1. From the replication target, navigate to shares replication packages and list the packages.
    target:> shares replication packages
    target:shares replication packages> list
    
    ID          STATE DATA TIMESTAMP      SOURCE       DATASET
    package-002 idle  2015-10-02 19:26:37 hostsource   berries
    package-001 idle  2015-10-02 19:26:10 hostsource   berries
    package-004 idle  2015-10-02 20:53:51 hostsource   berries/blackberry
    package-003 recv  2015-10-02 20:59:52 hostsource   cherries/maraschino

    Entries are sorted by source, dataset, and data timestamp respectively. The most recent replica snapshot is indicated by data timestamp.

  2. Select the replication package you want to clone.
    target:shares replication packages> select package-001
  3. Enter clone to create a new clone project.
    target:shares replication package-001> clone
    target:shares replication package-001 clone> 
  4. Set target_project to the project name.

    The project name must be unique, or the clone operation will fail.

    A project name must consist of 1 to 64 characters, but not include spaces or begin with a period. Allowable characters are: alphanumeric and special characters _ - . :

    target:shares replication package-001 clone> set target_project=clone
    		target_project = clone
  5. Enter conflicts to check for conflicts.

    If conflicts exist, a message similar to the following appears.

    target:shares replication package-001 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 
    share1         /export/share1                  share1 
    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
    
    target:shares replication packages package-001 clone>

    Note -  The conflicts command can be used at any point in this procedure to check for mountpoint or naming conflicts.
  6. (Optional) Set project-level properties to resolve conflicts for shares that inherit properties from a project.

    Use the get command to view the properties of the clone.

    target:shares replication package-001 clone> get
                   target_project = clone2
                    rename_suffix =
              original_mountpoint = /export
                       mountpoint = /export/clone
       original_smb_resource_name = off
                smb_resource_name = off

    The property mountpoint shows the current mountpoint. The property smb_resource_name shows the current resource name.

    1. Enter a unique project-level mountpoint for the clone.

      This setting applies to shares that inherit a mountpoint from a project. Use set mountpoint to specify a unique mountpoint for the clone.

      target:shares replication package-001 clone> set mountpoint=/export/clone
                              mountpoint = /export/clone
    2. Enter a unique project-level SMB resource name.

      This setting applies to shares that inherit the SMB resource name from a project. Set smb_resource_name to a unique SMB resource name.

      target:shares replication package-001 clone> set smb_resource_name=clone
                       smb_resource_name = clone
    3. Set rename_suffix to resolve remaining share conflicts.

      This property creates a suffix that is appended to a mountpoint and/or SMB resource names, if a conflict occurs.

      target:shares replication package-001 clone> set rename_suffix=-clone
                           rename_suffix = -clone

      Note -  This operation overrides inheritance. For example, if a share originally inherits its mountpoint from the project, but the mountpoint is renamed with a suffix during the clone operation, the share in the new cloned project no longer inherits its mountpoint, but instead uses the unique renamed mountpoint.
  7. (Optional) To set properties for an individual share:
    1. Select a share.
      target:shares replication package-001 clone> select share1
    2. Override its mountpoint and/or SMB resource name.

      The following example overrides the mountpoint for the share.

      target:shares replication package-001 clone share1> set mountpoint=/export/appliances-clone
      target:shares replication package-001 clone share1> set sharesmb=appliances-clone
  8. Enter confirm commit to initiate the clone operation.
    target:shares replication package-001 clone> confirm commit

    If name conflicts are detected, a message similar to the following appears:

    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 
    share1         /export/share1                  share1 
    clothes        /export/clothes  (inherited)    clothes  (inherited)
    electronics    /export/electronics             electronics 
    furniture      /export/furniture  (inherited)  furniture  (inherited)
    
    target:shares replication package-001 clone>
  9. (Optional) Resolve any remaining name conflicts and confirm the cloning.

    Repeat steps 6 and 7, as appropriate, until no conflicts remain, and then enter commit.

Related Topics