11.3.3. 현재 구성된 리소스 기본값 표시


pcs resource defaults [config] 명령은 사용자가 지정한 규칙을 포함하여 리소스 옵션에 대해 현재 구성된 기본값 목록을 표시합니다. Red Hat Enterprise Linux 9.5 이상에서는 이 명령의 출력을 텍스트, JSON 및 명령 형식으로 표시할 수 있습니다.

  • --output-format=text 를 지정하면 구성된 리소스 기본값을 일반 텍스트 형식으로 표시합니다. 이 옵션의 기본값입니다.
  • --output-format=cmd 를 지정하면 현재 클러스터 기본값 구성에서 생성된 pcs 리소스 defaults 명령이 표시됩니다. 이러한 명령을 사용하여 다른 시스템에서 구성된 리소스 기본값을 다시 생성할 수 있습니다.
  • --output-format=json 을 지정하면 구성된 리소스 기본값이 JSON 형식으로 표시됩니다. 이 기본값은 머신 구문 분석에 적합합니다.

다음 예제에서는 다음 예제 명령을 사용하여 ocf:pacemaker:pgsql 리소스의 기본값 뒤에 pcs resource defaults config 명령의 세 가지 출력 형식을 보여줍니다.

# pcs resource defaults set create id=set-1 score=100 meta resource-stickiness=10 rule resource ocf:pacemaker:pgsql

이 예제에서는 구성된 리소스 기본값을 일반 텍스트로 표시합니다.

# pcs resource defaults config
Meta Attrs: build-resource-defaults
  resource-stickiness=1
Meta Attrs: set-1 score=100
  resource-stickiness=10
  Rule: boolean-op=and score=INFINITY
    Expression: resource ocf:pacemaker:pgsql

이 예제에서는 현재 클러스터 기본값 구성에서 생성된 pcs 리소스 defaults 명령을 표시합니다.

# pcs resource defaults config --output-format=cmd
pcs -- resource defaults set create id=build-resource-defaults \
  meta resource-stickiness=1;
pcs -- resource defaults set create id=set-1 score=100 \
  meta resource-stickiness=10 \
  rule 'resource ocf:pacemaker:pgsql'

이 예제에서는 구성된 리소스 기본값을 JSON 형식으로 표시합니다.

# pcs resource defaults config --output-format=json
{"instance_attributes": [], "meta_attributes": [{"id": "build-resource-defaults", "options": {}, "rule": null, "nvpairs": [{"id": "build-resource-stickiness", "name": "resource-stickiness", "value": "1"}]}, {"id": "set-1", "options": {"score": "100"}, "rule": {"id": "set-1-rule", "type": "RULE", "in_effect": "UNKNOWN", "options": {"boolean-op": "and", "score": "INFINITY"}, "date_spec": null, "duration": null, "expressions": [{"id": "set-1-rule-rsc-ocf-pacemaker-pgsql", "type": "RSC_EXPRESSION", "in_effect": "UNKNOWN", "options": {"class": "ocf", "provider": "pacemaker", "type": "pgsql"}, "date_spec": null, "duration": null, "expressions": [], "as_string": "resource ocf:pacemaker:pgsql"}], "as_string": "resource ocf:pacemaker:pgsql"}, "nvpairs": [{"id": "set-1-resource-stickiness", "name": "resource-stickiness", "value": "10"}]}]}
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동