Sunday, 31 July 2016

7MTT 3.0 CLI End to End Transition Commands for CBT

Continuing from the previous post, here’s a demonstration via an example of how to use 7MTT 3.0 CLI and PowerShell to transition from 7-Mode to cDOT (lab versions are 8.2.3 and 8.3.2).

In the demonstration, we just transition a standalone volume. To make it more interesting though and to test out some features, we add to the mix vFilers and IPSpaces.

Note: The colour coding has Clustershell ::> green, 7-Mode’s Nodeshell > grey, and PowerShell PS> blue.

Some Initial cDOT Setup

We create an IPSpace for the - to be - transitioned vFiler, with Intercluster LIFs in the IPSpace on each node for SnapMirror replication:


ipspace create -ipspace VF01-IPSPACE

broadcast-domain remove-ports -broadcast-domain Default -ports clu1n1:e0d,clu1n1:e0f,clu1n2:e0d,clu1n2:e0f

broadcast-domain create -broadcast-domain VF01 -ipspace VF01-IPSPACE -mtu 1500 -port clu1n1:e0d,clu1n1:e0f,clu1n2:e0d,clu1n2:e0f

net int create -vserver VF01-IPSPACE -lif vf01-n1-icl -role intercluster -home-node clu1n1 -home-port e0d -address 10.1.5.63 -netmask 255.0.0.0

net int create -vserver VF01-IPSPACE -lif vf01-n2-icl -role intercluster -home-node clu1n2 -home-port e0d -address 10.1.5.64 -netmask 255.0.0.0


Some Initial 7-Mode Setup

We allow snapmirror and create a vFiler VF01 with one volume and a test share:


options snapmirror.access host=10.1.5.63,10.1.5.64

options licensed_feature.multistore.enable on
vol create VF01_VOL0 -s none aggr0 10g
vfiler create VF01 -n -s default-ipspace -i 10.1.7.51 /vol/VF01_VOL0

wrfile -a /etc/hosts 10.1.7.51 VF01 FAS101-e0b
wrfile -a /etc/hosts 10.1.7.61 FAS101-e0c
wrfile -a /etc/hosts 10.1.7.62 FAS101-e0d
ifconfig e0b `hostname`-e0b mediatype auto flowcontrol none mtusize 1500
ifconfig e0c `hostname`-e0c mediatype auto flowcontrol none mtusize 1500
ifconfig e0d `hostname`-e0d mediatype auto flowcontrol none mtusize 1500
wrfile -a /etc/rc ifconfig e0b `hostname`-e0b mediatype auto flowcontrol none mtusize 1500
wrfile -a /etc/rc ifconfig e0c `hostname`-e0c mediatype auto flowcontrol none mtusize 1500
wrfile -a /etc/rc ifconfig e0d `hostname`-e0d mediatype auto flowcontrol none mtusize 1500

vol create VF01_VOL1 -s none aggr0 10g
vfiler add VF01 /vol/VF01_VOL1
vfiler disallow VF01 proto=nfs proto=iscsi proto=rsh proto=ftp

vfiler run VF01 options security.passwd.rules.history 0
vfiler run VF01 setup
vfiler run VF01 cifs setup
vfiler run VF01 cifs shares -add VF01_VOL1 /vol/VF01_VOL1


Image: Test share
Variables That We* Will Use in 7MTT 3.0 CLI for the Transition
*Not all are necessary for the most basic of transitions


$PG_NAME        # Project Group Name
$PG_DESCRIPTION # Project Group Description

$7M_HOST       # 7-Mode Host Name or Mgmt IP
$7M_ADMIN_USER # 7-Mode Administrative User Name
$CM_HOST       # C-Mode Cluster Name or Mgmt IP
$CM_ADMIN_USER # C-Mode Administrative User Name

$PROJECT      # Project Name
$PROJ_TYPE    # Project Type (primary, secondary, or standalone)
$7M_COPY_IP   # 7-Mode Data Copy IP
$7M_COPY_IP2  # 7-Mode Multipathing IP Address
$7M_VFILER    # 7-Mode vFiler
$CM_SVM       # C-Mode Destination SVM Name
$CM_SVM_RAGGR # C-Mode SVM's Root Aggr
$CM_IPSPACE   # C-Mode IPSpace of Target SVM


$LIF_IP       # Data LIF IP      
$LIF_NETMASK  # Data LIF Netmask 
$LIF_GATEWAY  # Data LIF Gateway 
$LIF_HOMEPORT # Data LIF Home port
$LIF_NODE     # Data LIF Home node

$7M_VOLUME # 7-Mode Volume Name
$CM_VOLUME # C-Mode Volume Name
$CM_AGGR   # C-Mode Destination Aggregate

$SCHEDULE          # Schedule Name
$SCHED_DAYS        # Days to run
$SCHED_START       # Start Time
$SCHED_DURATION    # Duration
$SCHED_AVAIL_TRANS # Available transfers percent
$SCHED_CONC_TRANS  # Maximum concurrent transfers
$SCHED_THROTTLE    # Project SnapMirror Throttle (MBps)
$SCHED_UPDATE      # Update Frequency

$PRECUT_MODE # Precutover operation mode: 'no_test', 'ro_test', or 'rw_test'

$CUTOVER_OFFLINE_SRC # Offline source volumes 'true' or 'false'


Variables with their Values


$PG_NAME = "VF01_Project_Group"
$PG_DESCRIPTION = "VF01 Project Group"

$7M_HOST = "10.1.7.50"
$7M_ADMIN_USER = "root"
$CM_HOST = "10.1.5.50"
$CM_ADMIN_USER = "admin"

$PROJECT = "VF01_VOL1"
$PROJ_TYPE = "standalone"
$7M_COPY_IP = "10.1.7.61"
$7M_COPY_IP2 = "10.1.7.62"
$7M_VFILER = "VF01"
$CM_SVM = "VF01"
$CM_SVM_RAGGR = "clu1n1_sata_aggr1"
$CM_IPSPACE = "VF01-IPSPACE"

$LIF_IP       = "10.1.7.51"
$LIF_NETMASK  = "255.0.0.0"
$LIF_GATEWAY  = "10.0.0.1"
$LIF_HOMEPORT = "e0f"
$LIF_NODE     = "clu1n1"

$7M_VOLUME = "VF01_VOL1"
$CM_VOLUME = "VF01_VOL1"
$CM_AGGR = "clu1n1_sata_aggr1"

$SCHEDULE = "Schedule_01"
$SCH_DAYS = "0-6"
$SCH_START = "0:0"  
$SCH_DURATION = "24:0"
$SCH_AVAIL_TRANS = "25"
$SCH_CONC_TRANS = "4"
$SCH_THROTTLE = "100"
$SCH_UPDATE = "5:0"

$PRECUT_MODE = "ro_test"

$OFFLINE_SRC_VOLS = "true"


Step-by-Step Transitioning a Standalone Volume to cDOT with 7MTT 3.0 CLI*
*and a little bit of Clustershell

Note that some of the stuff used below is optional, such as: could have used the default project group; could have pre-created the SVM with management LIF, CIFS server, and CIFS test LIF (my preference); totally optional was the downing the transitioned CIFS server to give it the old AD machine account and NETBIOS name...


transition projectgroup create -g $PG_NAME -d $PG_DESCRIPTION

transition credentials add -h $7M_HOST -u $7M_ADMIN_USER
transition credentials add -h $CM_HOST -u $CM_ADMIN_USER

transition cbt create -p $PROJECT -t $PROJ_TYPE -n $7M_HOST -c $7M_COPY_IP -m $7M_COPY_IP2 -f $7M_VFILER -h $CM_HOST -v $CM_SVM -r $CM_SVM_RAGGR -i $CM_IPSPACE -g $PG_NAME

transition cbt lif add -p $PROJECT -i $LIF_IP -m $LIF_NETMASK -g $LIF_GATEWAY -u $LIF_HOMEPORT -n $LIF_NODE

transition cbt volumepair add -p $PROJECT -v $7M_VOLUME -c $CM_VOLUME -g $CM_AGGR

transition cbt schedule add -p $PROJECT -n $SCHEDULE -d $SCH_DAYS -b $SCH_START -e $SCH_DURATION -t $SCH_AVAIL_TRANS -c $SCH_CONC_TRANS -x $SCH_THROTTLE -u $SCH_UPDATE

transition cbt show -p $PROJECT -r no

transition cbt precheck -p $PROJECT -r no

transition cbt start -p $PROJECT -n -r no

transition cbt update -p $PROJECT -t $SCH_AVAIL_TRANS -c $SCH_CONC_TRANS -x $SCH_THROTTLE -r no



net int create -vserver VF01 -lif VF01 -data-protocol cifs -address 10.1.7.52 -netmask 255.0.0.0 -home-port e0f -home-node clu1n1
vserver services dns create -vserver VF01 -domains lab.priv -name-servers 10.0.1.10
vserver cifs create -vserver VF01 -cifs-server VF01_B -domain lab.priv



transition cbt precutover -p $PROJECT -m $PRECUT_MODE -r no
transition cbt cutover -p $PROJECT -o $OFFLINE_SRC_VOLS -r no



set d
cifs server modify -vserver VF01 -status-admin down
cifs server modify -vserver VF01 -cifs-server VF01



transition cbt delete -p $PROJECT


Taking it Forward

Further investigations:

- Investigate transitioning primary and secondary 7-Mode volumes
- Create a spreadsheet that allows easy management of multiple projects, and automatic generation of 7MTT CLI commands
- See if my June 2016 7MTT Multiple Job Parser still works with 7MTT 3.0

2 comments:

  1. Interesting blog. Do you know if 7MTT tool or CLI can copy without migrating CIFs ACLs security permissions?

    Thx

    ReplyDelete
    Replies
    1. Hello Unknown,
      Yes 7MTT can exclude the CIFS Shares and Share ACLs - check out: http://www.cosonok.com/2016/09/customizing-7mtt-transitions-with-7mtt.html
      NT ACLs are part of the filesystem and included by the SnapMirror.
      Cheers,
      VC

      Delete