• Use case for CLI

    PDF

    Use case for CLI

    Replication configuration use case

    This section describes the use cases for configuring replication for block or file storage resources.

    Before you begin

    Before you proceed with configuring replication, ensure that you complete the following:

    • Create identical storage resources on the source and destination systems.
    • Configure replication interfaces for each SP on the source and destination systems.
    • On the destination system, the relevant storage resources and NAS servers are individually created with the -replDest attribute set to yes.
    • For file replication, ensure the following:
      • Start with creating identical NAS servers on both the systems, and then create identical file systems.
      • Configure the NAS server on the destination system with a name other than the NAS server name on the source system.
      • Configure file systems on the destination system with the same name as the file systems on the source system.

    Configure local replication

    Replication interfaces and connections do not apply to local replication. Once you create the identical source and destination storage resources or NAS servers on the storage system, you can proceed to configure a replication session. Note the following:

    • For a disaster recovery scenario, it is recommended that the destination storage resource and NAS server are configured on a storage pool other than the pool used for the source storage resource and NAS server.
    • For a migration scenario, which means migrating the source storage resource and NAS server to a destination storage resource and NAS server on the same pool, use the CLI to configure local replication. The Unisphere GUI does not allow local replication between storage resources and NAS servers on the same pool.

    Configure asynchronous replication

    Complete the following steps:
    Procedure
    1. Configure the replication interfaces on each SP of the source and destination systems.
    2. Configure a replication connection using the Asynchronous connection mode.
    3. For file storage, create a replication session for the NAS server associated with the file storage.
      Storage resources included in a NAS server automatically get replicated when a replication session is first configured for the NAS server. The replication session for the storage resources will inherit the same attributes as the associated replication session of the associated NAS server. For the storage resources you do not want participating in replication, you can choose to remove the associated replication sessions manually.
    4. Create a remote replication session for the storage resource.
      You only need to configure replication interfaces and connections for the first replication session between two systems. The same connection can be used again for subsequent replication sessions between the same systems.

    Configure synchronous replication

    Synchronous replication is only supported for block storage.

    Complete the following steps:

    Procedure
    1. Identify the Synchronous Replication Fibre Channel (FC) ports on each system.
      To determine the FC port used for synchronous replication, in the CLI console, run the command /remote/sys show -detail. Port information, similar to the following example, will appear in the output:
                                    Synchronous FC ports = spb_fc4, spa_fc4
                                  

      For more information, see the Unisphere CLI User Guide.

    2. Zone the Synchronous Replication FC ports between the systems.
      If the source and destination systems are co-located, instead of zoning, you can choose to use direct-connected FC cables between the SPs.
    3. Configure the replication interfaces on each SP of the source and destination systems based on the connection mode you want:
      • For synchronous replication support (Synchronous connection mode), use the Synchronous Replication Management Ports on each SP of both the systems.
      • For asynchronous and synchronous replication support (Both connection mode), in addition to the replication interfaces for Synchronous Replication Management Ports, configure additional interfaces using the Ethernet Ports on each SP of the source and destination systems.
    4. Configure the replication connection between source and destination systems from the source system only.
      • For synchronous replication support, specify the Synchronous connection mode.
      • For asynchronous and synchronous replication support, specify the Both connection mode.
    5. Create the synchronous replication session.
      You only need to configure replication interfaces and connections for the first replication session between two systems. The same connection can be used again for subsequent replication sessions between the same systems.

    Create a replication interface

    Before you begin

    Obtain the following information for each Storage Processor (SP):

    • IP address associated with the replication interface. Although you can specify an IPv4 or IPv6-based address, ensure that you specify the same type of address for both SPs.
    • IP address mask or prefix length that identifies the associated subnet.
    • Gateway IP address associated with the interface.
    • If applicable, the VLAN ID (between 1 and 4095) you want to associate the replication interface with.
      For the network to continue functioning properly, ensure that you set the VLAN ID only when you have configured the network switch port to support VLAN tagging of multiple VLAN IDs.

    Ensure that you create replication interfaces on each SP.

    Procedure
    1. Run the following command to create the interface on SP A:
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /net/if create -type replication -port eth1_spa -addr 10.0.1.1 -netmask 255.255.255.0 -gateway 10.0.1.0
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = IF_1
      Operation completed successfully.
                                  
    2. Run the following command to create the interface on SP B:
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /net/if create -type replication -port eth1_spb -addr 10.0.1.2 -netmask 255.255.255.0 -gateway 10.0.1.0
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = IF_2
      Operation completed successfully.
                                  

    View interfaces

    uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /net/if show
                                  Storage system address: 10.0.0.1
    Storage system port: 443
    HTTPS connection
    
    1:     ID                      = IF_0
           Type                    = iscsi
           Port                    = eth0_spa
           VLAN ID                 = 0
           IP address              = 3ffe:80c0:22c:4e:a:0:2:7f/64
           Subnet mask             = 
           Gateway                 = fe80::20a8bff:fe5a:967c
           SP                      = spa
    
    2:     ID                      = IF_1
           Type                    = replication
           Port                    = eth1_spa
           VLAN ID                 = 1
           IP address              = 10.0.1.1
           Subnet mask             = 255.255.255.0
           Gateway                 = 10.0.1.0
           SP                      = spa
    
    3:     ID                      = IF_2
           Type                    = replication
           Port                    = eth1_spb
           VLAN ID                 =
           IP address              = 10.0.1.2
           Subnet mask             = 255.255.248.0
           Gateway                 = 10.0.1.0
           SP                      = spb
    
    
                                

    Create a replication connection

    Before you begin

    Ensure that you have set up relevant replication interface pairs, one on each SP, on the source and destination systems. Obtain the following information:

    • For remote replication, the IP address and associated user authentication credentials to connect to the remote system.
    • For local replication, the password associated with your user account.
    • The connection mode you want to use for the replication-Asynchronous, Synchronous, or Both. File-based storage resources only support Asynchronous connection mode.
    Consider that you want to create an asynchronous replication connection to the remote system with the IP address 10.1.1.1.
    • Run the following command:
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /remote/sys create –addr 10.1.1.1 –srcUsername admin1 -srcPassword Password456! –dstUsername admin2 –dstPassword Password986! -connectionType async
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = RS_1
      Operation completed successfully.
                                  

    View settings for remote storage systems

    uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /remote/sys show -detail
                                  Storage system address: 10.0.0.1
    Storage system port: 443
    HTTPS connection
    
    1:     ID                   = RS_1
           Name                 = MyTargetSystem
           Address              = 10.1.1.1
           Model                = Unity 300
           Serial number        = FCNCH01234567A90
           Connection type      = async
           Source interfaces    = N/A
           Local interfaces     = N/A
           Remote interfaces    = N/A
           Operational status   = OK (0x2)
           Health state         = OK (5)
           Health details       = "Communication with the replication
                                   host is established. No action is 
                                   required."
           Synchronous FC ports = spb_fc4, spa_fc4
    
    
                                

    Create a replication session for block storage

    Before you begin

    Complete the following:

    • For remote replication:
      • Identify the remote system that will act as the replication destination.
      • Create relevant replication interfaces, replication connection, and a storage resource on the remote system that will act as the destination.
    • For local replication, create a storage resource that will act as the destination.
    • Determine the replication synchronization mode you want. You can specify asynchronous (async), synchronous (sync), or manual synchronization (manual).
      The synchronous replication mode is available only for block-based storage resource.
    • For asynchronous replication, determine the Recovery Point Objective (RPO) for the replication session.
    • Run the following command to create a synchronous replication session between the LUN "LUN_1" on the source system and the LUN "LUN_2" located on the remote system "RS_2":
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /prot/rep/session create -name REP1 -srcRes LUN_1 –dstType remote -dstSys RS_2 –dstRes LUN_2 –syncType auto –rpo 0
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = 81604378625_FCNCH097274B3A_0000_81604378627_FCNCH097274B37_0000
      Operation completed successfully.
                                  

    Create a replication session for file storage

    Before you begin

    Complete the following:

    • For remote replication:
      • Identify the remote system that will act as the replication destination.
      • Create relevant replication interfaces, replication connection, and a storage resource on the remote system that will act as the destination. The storage resource on the destination system must have the same size
    • For local replication, create a storage resource that will act as the destination.
    • For file replication, create a replication session on the NAS server associated with the file storage.
    • Determine the replication synchronization mode you want. You can specify asynchronous (async), synchronous (sync), or manual synchronization (manual).
      The synchronous replication mode is available only for block-based storage resource.
    • For asynchronous replication, determine the Recovery Point Objective (RPO) for the replication session.
    Configure an asynchronous replication session between the NAS servers associated with the file storage, with an RPO set to 2 hours 30 minutes and automatic synchronization. On the source system, the file system "FS_1" is associated with NAS server "NAS_1". And, the file system "FS_2" is associated with NAS server "NAS_2" on the remote system.
    Procedure
    1. Run the following command to create an asynchronous replication session between the NAS servers:
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /prot/rep/session create -name REP2 -srcRes FS_1 –dstType remote -dstSys RS_2 –dstRes FS_2
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = 81604378635_FCNCH097274B3A_0000_81604378637_FCNCH097274B37_0000
      Operation completed successfully.
                                  
    2. Run the following command to create an asynchronous replication session between the file system "FS_1" on the source system and the file system "FS_2" located on the remote system "RS_2", with an RPO set to 2 hours 30 minutes and automatic synchronization:
      uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /prot/rep/session create -name REP2 -srcRes FS_1 –dstType remote -dstSys RS_2 –dstRes FS_2 –syncType auto –rpo 02h30m
                                    Storage system address: 10.0.0.1
      Storage system port: 443
      HTTPS connection
      
      ID = 81604378635_FCNCH097274B3A_0000_81604378637_FCNCH097274B37_0000
      Operation completed successfully.
                                  

    View replication sessions

    uemcli -d 10.0.0.1 -u Local/joe -p MyPassword456! /prot/rep/session show
                              Storage system address: 10.0.0.1
    Storage system port: 443
    HTTPS connection
    
    1:    ID                   = 81604378635_FCNCH097274B3A_0000_81604378637_FCNCH097274B37_0000
          Name                 = REP2
          Session type         = nas server 
          Synchronization type = auto 
          Resource type        = NAS Server 
          Destination type     = remote