Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

VCS : How to define local attribute in types file?

Updated: 13 Dec 2010 | 4 comments
Antony Pavlenko's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hello.

I'd like to write my own agent to VCS. I did it before and it is really easy.

But now I need local attribute and I couldn't find any way to define attribute as local in type.cf file. How can i do this?

Or i need to do 

hares -local <resource> <attribute>

in online script and this is  a good way to set local attributes?

Discussion Filed Under:

Comments

Gaurav Sangamnerkar's picture
12
Dec
2010
2 Votes +2
Login to vote

Hello Antony, can you update

Hello Antony,

can you update the OS & VCS version ?

Assuming that its a solaris & taking example of VCS 5.0, Looking at VCS users guide:

 

Defining attributes as local

Localizing an attribute means that the attribute has a per-system value for each
system listed in the group’s SystemList. These attributes are localized on a
per-resource basis.

For example, to localize the attribute attribute_name for
resource only, type:

# hares -local resource attribute_name

Note that global attributes cannot be modified with the hares -local
command. The following table lists the commands to be used to localize
attributes depending on their dimension.

To have a detail look on table, visit VCS users guide located at:

http://sfdoccentral.symantec.com/Storage_Foundatio...

 

So what you are doing is correct. To my knowledge Localizing an attribute won't be altered to types.cf rather changes would go in main.cf . For e.g sometimes while defining NIC cards, resource attribute is localized per system in main.cf:

MultiNICB gnic_n (

Device @north = { ce0, ce4 }
Device @south = { qfe0, qfe4 }

NetworkHosts = { "192.1.0.1" }
)

Hope this helps..

 

Gaurav

PS: If you are happy with the answer provided, please mark the post as solution. You can do so by clicking link "Mark as Solution" below the answer provided.
 

Antony Pavlenko's picture
13
Dec
2010
0 Votes 0
Login to vote

Hello Gaurav. I have read

Hello Gaurav.

I have read this documentation and it looks strange for me that ttribute couldn't be predefined as local in types.cf file.

Anyway, thank you for your opinion.

Wally_Heim's picture
13
Dec
2010
0 Votes 0
Login to vote

Hi Antony,   You have to keep

Hi Antony,

 

You have to keep in mind that the types.cf file is not aware of any nodes in the cluster.  It is intended to be cluster unaware and as such you can define default attribute values that will be used globally unless otherwise overriden by being defined in the main.cf.  In the main.cf, the override value can be either global or local.

 

You can check the Agent Developers guide for the specific version of the product that you are using to see if it lists something different.  But the basic agent framework is the same between all platforms.

 

Thanks,

Wally

Antony Pavlenko's picture
13
Dec
2010
0 Votes 0
Login to vote

Ok, thank you very much for

Ok, thank you very much for clear explanation.