Product SiteDocumentation Site

4.3. Descrierea unui Nod de Cluster

Beyond the basic definition of a node the administrator can also describe the node’s attributes, such as how much RAM, disk, what OS or kernel version it has, perhaps even its physical location. This information can then be used by the cluster when deciding where to place resources. For more information on the use of node attributes, see Chapter 8, Rules.
Node attributes can be specified ahead of time or populated later, when the cluster is running, using crm_attribute.
Below is what the node’s definition would look like if the admin ran the command:

Exemplu 4.3. Rezultatul folosirii crm_attribute pentru a specifica pe ce kernel rulează pcmk-1

# crm_attribute --type nodes --node-uname pcmk-1 --attr-name kernel --attr-value `uname -r`
<node uname="pcmk-1" type="normal" id="101">
   <instance_attributes id="nodes-101">
     <nvpair id="kernel-101" name="kernel" value=""/>

A simpler way to determine the current value of an attribute is to use crm_attribute command again:
# crm_attribute --type nodes --node-uname pcmk-1 --attr-name kernel --get-value
By specifying --type nodes the admin tells the cluster that this attribute is persistent. There are also transient attributes which are kept in the status section which are "forgotten" whenever the node rejoins the cluster. The cluster uses this area to store a record of how many times a resource has failed on that node but administrators can also read and write to this section by specifying --type status.