搜索

C.2. 主​​​​​​​机​​​​​​​标​​​​​​​签​​​​​​​

download PDF
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.
对​​​​​​​于​​​​​​​每​​​​​​​个​​​​​​​主​​​​​​​机​​​​​​​标​​​​​​​签​​​​​​​,如​​​​​​​果​​​​​​​存​​​​​​​在​​​​​​​额​​​​​​​外​​​​​​​的​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​ lvm_hosttag.conf,就​​​​​​​会​​​​​​​读​​​​​​​取​​​​​​​它​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​那​​​​​​​个​​​​​​​文​​​​​​​件​​​​​​​定​​​​​​​义​​​​​​​了​​​​​​​新​​​​​​​的​​​​​​​标​​​​​​​签​​​​​​​,那​​​​​​​么​​​​​​​会​​​​​​​在​​​​​​​要​​​​​​​读​​​​​​​取​​​​​​​的​​​​​​​文​​​​​​​件​​​​​​​列​​​​​​​表​​​​​​​中​​​​​​​添​​​​​​​加​​​​​​​进​​​​​​​一​​​​​​​步​​​​​​​的​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​。​​​​​​​
例​​​​​​​如​​​​​​​:下​​​​​​​面​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​中​​​​​​​的​​​​​​​条​​​​​​​目​​​​​​​总​​​​​​​是​​​​​​​定​​​​​​​义​​​​​​​ tag1,且​​​​​​​在​​​​​​​主​​​​​​​机​​​​​​​名​​​​​​​为​​​​​​​ host1 定​​​​​​​义​​​​​​​ tag2。​​​​​​​
tags { tag1 { }  tag2 { host_list = ["host1"] } }
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.