Add-SmResource
Creates a custom plug-in resource or an Oracle plug-in application volume resource to be protected.
Syntax
Add-SmResource [-HostName] <String> [-PluginCode] <PluginCode> [-CredentialName] <String>
Detailed Description
Creates resource of a given ResourceType, where the resource types supported for a custom plug-in are specified as part of the plug-in description file or you can create an Oracle plug-in application volume resource.You can also use the cmdlet to associate storage of type Volume or Qtree or LUN with given resource. If required, you can also specify custom parameters specific to the resource along with a Run As account, which can be used by the plug-in to validate credentials to access the resource.
Parameters
Name | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|
HostName |
The name of the SnapCenter Custom Plug-in or Oracle Plug-in host. |
true |
true (ByPropertyName) |
|
PluginCode |
The name of the plug-in associated with the resource you are adding. Possible inputs include SCSQL, SCW, SCO, HANA and SCU. |
true |
true (ByPropertyName) |
|
CredentialName |
false |
true (ByPropertyName) |
||
ResourceType |
The type of application object. This parameter does not accept any special characters or spaces. For example, instance, database, or a SAP HANA SingleContainer or MultipleContainers. |
true |
true (ByPropertyName) |
|
ResourceName |
The name of the application object. |
true |
true (ByPropertyName) |
|
StorageFootPrint |
Specifies the storage footprint. You enter the storage footprint using the following format:-StorageFootPrint @(@{"VolumeName"="Volume";"StorageSystem"="server"}, @{"LunPath"="/vol/Volume/LunPath";"StorageSystem"="server"}, @{"QtreeName"="qtree";"VolumeName"="volume";"StorageSystem"="server"}) |
true |
true (ByPropertyName) |
|
MountPoints |
Specifies the mount point for the resource. |
false |
true (ByPropertyName) |
|
ResourceSettings |
Specifies the custom resource parameters. You enter ResourceSettings in a hastable using key-value pairs. For example:-ResourceSettings @{"Key1" = "Value1"; "Key2" = "Value2"} |
false |
true (ByPropertyName) |
|
DatabaseName |
SAP HANA Database name. |
true |
true (ByPropertyName) |
|
SID |
This is a SAP HANA database specific parameter. A SAP HANA system is identified by aunique 3 letter system ID (SID). For example, ABC. |
true |
true (ByPropertyName) |
|
UserStoreKeys |
Comma separated list of SAP HANA database UserStoreKeys. |
true |
true (ByPropertyName) |
|
FileBackupPath |
Location of the SAP HANA node on which the SAP HANA File-Based Backup is saved. This is required when EnableFileBackup parameter is set to ‘Y’. The path must start with a forward slash and it cannot contain * ? \ " < > | characters.If the path is not provided, SAP HANA will use the default path configured on the system. For example, /hana/shared/{SID}/HDB {INSTANCE_ID}/backup/data. |
false |
true (ByPropertyName) |
|
FileBackupPrefix |
Prefix added to the File-Based Backup name. This is required when EnableFileBackup parameter is set to ‘Y’. Use only letters, numbers, and underscores for the prefix of File-Based Backup name.If prefix is not provided, default value will be used. |
false |
true (ByPropertyName) |
|
OSDBUser |
true |
true (ByPropertyName) |
||
TenantDatabaseName |
This is a SAP HANA database specific parameter. It is the name of the tenant database for SAP HANA MultiTenant Database Containers resource type. |
false |
true (ByPropertyName) |
|
TenantType |
This is a SAP HANA database specific parameter. This specifies the tenant type of SAP HANA MultiTenant Database Containers. SingleTenant as tenant type is deprecated.SingleTenant as tenant type is deprecated |
true |
true (ByPropertyName) |
MultiTenant |
Examples
Example 1: Adding a resource with a single storage volume
Add-SmResource -HostName 'host.example.com' -PluginCode 'DB2' -ResourceName DB1-ResourceType Database -StorageFootPrint (@{"VolumeName"="autoVol1";"StorageSystem"="vserver_scauto_primary"}) -Instance db2inst3
This example syntax adds a Resource Type Database of Custom plug-in DB2. In this example, the resource parent type is Instance, which is mandatory as indicated by the plug-in descriptor file used during Upload-SmPluginPackage.
PluginName : DB2 Uid: db2inst3\DB1 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : LastBackupDate : LastBackupStatus : IsProtected: False Name : DB1 Type : Database Id : sccrheldb2.sccore.test.com\DB2\db2inst3\DB1 Host : sccrheldb2.sccore.test.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts :
Example 2: Adding a resource with ResourceType instance containing multiple Storage Type LUNs
Add-SmResource -HostName 'host.example.com' -PluginCode 'DB2' -ResourceName db2inst1 -ResourceType Instance -StorageFootPrint (@( @{"VolumeName"="DB2_NONRECDB";"LunName"="DB2_NONRECDB";"StorageSystem"="vserver_scauto_primary"}, @{"VolumeName"="DB2_NONREC1DB";"LunName"="DB2_NONREC1DB";"StorageSystem"="vserver_scauto_secondary"}, @{"VolumeName"="DB2_RECDB";"LunName"="DB2_RECDB";"StorageSystem"="vserver_scauto_primary"}))
This example syntax adds a resource with ResourceType for custom Plug-in DB2. ResourceType instance does not have parent Resource type.
The resource named db2inst1 is spread across 3 LUNs of different volumes of same storage system.
PluginName : DB2 Uid: db2inst1 ParentUid : SmAppFiles : SmAppFileStorageGroups : {, , } PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : LastBackupDate : LastBackupStatus : IsProtected: False Name : db2inst1 Type : Instance Id : sccrheldb2.sccore.test.com\DB2\db2inst1 Host : sccrheldb2.sccore.test.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts :
Example 3: Adding a resource with storage type qtree
Add-SmResource -HostName 'sccorelinux188.sccore.test.com' -PluginCode 'DB2' -ResourceName DominoAutoDatabase -ResourceType Database -StorageFootPrint (@{"QTREENAME "="inventory_qtree";"VolumeName"="inventory_vol";"StorageSystem"="vserver_scauto_primary"}) -Instance INST
This example syntax adds a resource type of Database for custom plug-in DB2, hosting data on qtree.
Cmdlet Output: Successfully added the following resource PluginName : DummyPlugin Uid: INST\DominoAutoDatabase ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : LastBackupDate : LastBackupStatus : IsProtected: False Name : DominoAutoDatabase Type : Database Id : sccorelinux188.sccore.test.com\DummyPlugin\INST\DominoA utoDatabase Host : sccorelinux188.sccore.test.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts :
Example 4: Adding a resource that includes a LUN inside a qtree
Add-SmResource -HostName "10.236.164.10" -PluginCode HANA -ResourceType instance -ResourceName mixedres -StorageFootPrint @(@{"storagesystem"="10.232.206.5";"volumename"="dummyvol"},@{"storagesystem"="10.232.206.5";"volumename"="dummyvol2";"lunname"="luninsidevol"},@{"storagesystem"="10.232.206.5";"volumename"="dummyvol3";"lunname"="qtreeforlun\luninsideqtree"},@{"storagesystem"="10.232.206.5";"volumename"="dummyvol4";"qtreename"="qtreeinsidevol"})
This example adds a resource with custom plug-in resource type that includes a LUN inside a qtree.
PluginName : hana Uid: A12 ParentUid : SmAppFiles : SmAppFileStorageGroups : {, , } PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : LastBackupDate : LastBackupStatus : IsProtected: False Name : mixedres Type : Instance Id : sccrheldb2.sccore.test.com\hana\A12 Host : sccrheldb2.sccore.test.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts :
Example 5: Adding a SAP HANA database of SingleContainer type
Add-SmResource -HostName 'mva-s63.gdl.englab.netapp.com' -PluginCode 'hana' -SID 'H14' -DatabaseName 'Manual_H14' -ResourceType SingleContainer -StorageFootPrint (@{"VolumeName"="R808267D015V1_NFS_H14_SC_DATA_10_229_37_43";"StorageSystem"="10.232.206.133"}) -UserStoreKeys 'KEY01' -OSDBUser 'SYSTEM'
This example syntax adds the SingleContainer resource type with specific SID and database name.
Successfully added the following resource PluginName : hana Uid: H14 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters AutoDiscovered : False IsSelectable : True IsAuthenticated: False IsProtected: False ReplicationEnabled : False LastBackupDate : LastBackupStatus : IsWindowsResource : False Name : Manual_H14 Type : SingleContainer Id : mva-s63.gdl.englab.netapp.com\hana\H14 Host : mva-s63.gdl.englab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 6: Adding a SAP HANA Multitenant Database Container resource type
Add-SmResource -HostName 'schana02.gdl.englab.netapp.com' -PluginCode 'hana' -DatabaseName MDC -ResourceType MultipleContainers -StorageFootPrint ( @{"VolumeName"="hana_data2";"StorageSystem"="storage_admin_1"}) -sid 'MT1' -tenanttype 'MultiTenant' -userstorekeys 'USKMT1' -tenantdatabasename 'MT1' -osdbuser 'root'
This example adds a HANA MultiTenant Database Container resource with MultiTenant tenant type. Tenant database names will be detected during backup operations.
WARNING: TenantDatabaseName parameter is now deprecated for MultiTenant database resource, the parameter will be ignored and auto discovered internally. Successfully added the following resource PluginName : hana Uid: MDC\MT1 ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters AutoDiscovered : False IsSelectable : True IsAuthenticated: False LastBackupDate : LastBackupStatus : IsProtected: False IsWindowsResource : False Name : MDC Type : MultipleContainers Id : schana02.gdl.englab.netapp.com\hana\MDC\MT1 Host : schana02.gdl.englab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 7: Adding an Oracle Application Volume Resource with a volume,lun and qtree
Add-SmResource -HostName 'R8092776CF4V1.HNK2.com' -PluginCode 'SCO' -ResourceName appVol -StorageFootPrint @(@{"VolumeName"="vol_test1";"StorageSystem"="10.232.206.165"},@{"VolumeName"="vol_test2";"LunName"="lun_test1";"StorageSystem"="10.232.206.165"},@{"QtreeName"="qtree_test1";"VolumeName"="vol_test3";"StorageSystem"="10.232.206.165"})
This example adds an Oracle Application Volume Resource which contains a volume, lun, and qtree.
Uid: appVol SmAppFileStorageGroups : {, , } IsProtected: False LastBackupDate : LastBackupStatus : Name : appVol Type : Application Volume Id : R8092776CF4V1.HNK2.com\appVol Host : R8092776CF4V1.HNK2.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 8: Adding an Oracle Application Volume Resource with a single lun
Add-SmResource -HostName 'R8092776CF4V1.HNK2.com' -PluginCode 'SCO' -ResourceName appVolLun -StorageFootPrint @{"VolumeName"="vol_test2";"LunName"="lun_test1";"StorageSystem"="10.232.206.165"}
This example adds an Oracle Application Volume Resource which contains a single lun
Uid: appVolLun SmAppFileStorageGroups : {, , } IsProtected: False LastBackupDate : LastBackupStatus : Name : appVolLun Type : Application Volume Id : R8092776CF4V1.HNK2.com\appVolLun Host : R8092776CF4V1.HNK2.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :
Example 9: Adding Azure NonDataVolume Resource
Add-SmResource -HostName 'scspa2921191001.rtp.openenglab.netapp.com' -PluginCode 'HANA' -ResourceType 'NonDataVolume' -ResourceName 'R71NDV' -SID 'R71' -StorageFootPrint @(@{"StorageConnectionId"=3;"CapacityPool"="manualqospool";"volumeName"="ravi-16-all"})
This example adds an Azure NetApp Volume as NonDataVolume resource
PluginName : hana Uid: NonDataVolume\R71\R71NDV ParentUid : SmAppFiles : SmAppFileStorageGroups : {} PluginParams : SMCoreContracts.SmKeyValueCollection MountPaths : pluginConfiguration: SMCoreContracts.SmSCSAPHANAResourceParameters AutoDiscovered : False IsSelectable : True IsAuthenticated: False IsProtected: False ReplicationEnabled : False SubType: LastBackupDate : LastBackupStatus : IsWindowsResource : False Name : R71NDV Type : NonDataVolume Id : scspa2921191001.rtp.openenglab.netapp.com\hana\NonDataVolume\R71\R71NDV Host : scspa2921191001.rtp.openenglab.netapp.com UserName : Passphrase : Deleted: False Auth : SMCoreContracts.SmAuth IsClone: False CloneLevel : 0 Hosts : StorageName: ResourceGroupNames : PolicyNames: Key: 0 NsmObjectID: 0 SizeOfSmObject :