Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
C.2. 主機標籤(Host Tags)
In a cluster configuration, you can define host tags in the configuration files. If you set
hosttags = 1
in the tags
section, a host tag is automatically defined using the machine's hostname. This allow you to use a common configuration file which can be replicated on all your machines so they hold identical copies of the file, but the behavior can differ between machines according to the hostname.
For information on the configuration files, see 附錄 B, LVM 配置檔案.
針對於各個主機標籤,會有個額外的配置檔案被讀取(若它存在的話):lvm_hosttag.conf。若該檔案定義了新的標籤的話,那麼額外的配置檔案便會被附加至需要被讀取的檔案清單中。
比方說,每當主機名稱為
host1
時,下列配置檔案中的項目就會定義 tag1
以及 tag2
。
tags { tag1 { } tag2 { host_list = ["host1"] } }