SMcli Examples

SMcli Examples from the command line

\\ Create snapshot
SMcli <ip address> -c "set session password=\"<password>\" ; create snapshotVolume  basevolume=\"TEST_VOL_REPL\"  repositoryPercentOfBase=80  repositoryFullPolicy=failSnapShot ; "

\\ Delete snapshot/volume
SMcli <ip address> -c "set session password=\"<password>\" ; delete volume [\"TEST_VOL_REPL-1\"] ; "

\\ Create Remote Mirror (ON PRIMARY STORAGE)
SMcli <Primary IP address>  -c "set session password=\"<password>\" ; create remoteMirror primary=\"TEST_VOL\" secondary=\"TEST_VOL_REPL\" remotestorageArrayName=\"<Secondary ARRAY NAME>\" remotePassword=\"<password>\" syncPriority=medium writeOrder=preserved writeMode=synchronous;"

\\ Remove Remote Mirror
SMcli <ip address> -c "set session password=\"<password>\" ; remove remoteMirror localVolume [\"TEST_VOL_REPL\"] ;"

\\ Map LUN
SMcli <ip address> -c "set session password=\"<password>\" ; set volume [\"TEST_VOL_REPL\"] logicalUnitNumber=6 host=\"<HOST NAME>\"; "

\\ Un Mapp LUN
SMcli <ip address> -c "set session password=\"<password>\" ; remove volume [\"TEST_VOL_REPL\"] lunMapping host=\"<HOST NAME>\"; "

\\ View Lun Maps
SMcli <ip address> -c "set session password=\"<password>\" ; Show storageArray lunMappings host [\"<HOST NAME>\"];"

SMcli Examples from a SMcli Script File

// call by SMcli <ip address> -f <script name>

// Set Password
set session password="<password>" ;

// Print statement
show "Hello World" ;

// Create snapshot
create snapshotVolume  basevolume="TEST_VOL_REPL"  repositoryPercentOfBase=80  repositoryFullPolicy=failSnapShot ;

// Delete snapshot-volume
delete volume ["TEST_VOL_REPL-1"] ;

// Create Remote Mirror

create remoteMirror primary="TEST_VOL" secondary="TEST_VOL_REPL" remotestorageArrayName="<Secondary ARRAY NAME>" remotePassword="<password>" syncPriority=medium writeOrder=preserved writeMode=synchronous;

// Remove Remote Mirror
show "* Break Mirror for TEST_VOL_REPL" ;
remove remoteMirror localVolume ["TEST_VOL_REPL"] ;

// Map LUN to HOST
set volume ["TEST_VOL_REPL"] logicalUnitNumber=<LUN ID> host="<HOST NAME>";

// Un Mapp LUN
remove volume ["TEST_VOL_REPL"] lunMapping host="<HOST NAME>";

// view mappings
show storageArray lunMappings host ["<HOST NAME>"];


Popular posts from this blog

Solaris 11 Locale en_GB.UTF-8 / en_GB.ISO8859-1 / en_GB.ISO8859-15

ZFS Compression Vs Deduplication (dedup)