일반적으로 자원 등록 정보는 RTR 파일에서 자원 유형 등록 정보 뒤에 선언됩니다. 자원 등록 정보는 Sun Cluster 소프트웨어가 제공하는 시스템 정의 등록 정보와 개발자가 정의하는 확장 등록 정보를 포함합니다. 어떠한 유형이든 최소값, 최대값 및 기본값과 같이 Sun Cluster 소프트웨어가 제공하는 여러 등록 정보 속성을 지정할 수 있습니다.
다음 목록은 샘플 RTR 파일의 시스템 정의 등록 정보를 보여줍니다.
# A list of bracketed resource property declarations follows the # resource type declarations. The property-name declaration must be # the first attribute after the open curly bracket of each entry. # The <method>_timeout properties set the value in seconds after which # the RGM concludes invocation of the method has failed. # The MIN value for all method timeouts is set to 60 seconds. This # prevents administrators from setting shorter timeouts, which do not # improve switchover/failover performance, and can lead to undesired # RGM actions (false failovers, node reboot, or moving the resource group # to ERROR_STOP_FAILED state, requiring operator intervention). Setting # too-short method timeouts leads to a *decrease* in overall availability # of the data service. { PROPERTY = Start_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Stop_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Validate_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Update_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Monitor_Start_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Monitor_Stop_timeout; MIN=60; DEFAULT=300; } { PROPERTY = Thorough_Probe_Interval; MIN=1; MAX=3600; DEFAULT=60; TUNABLE = ANYTIME; } # The number of retries to be done within a certain period before concluding # that the application cannot be successfully started on this node. { PROPERTY = Retry_count; MIN=0; MAX=10; DEFAULT=2; TUNABLE = ANYTIME; } # Set Retry_interval as a multiple of 60 since it is converted from seconds # to minutes, rounding up. For example, a value of 50 (seconds) # is converted to 1 minute. Use this property to time the number of # retries (Retry_count). { PROPERTY = Retry_interval; MIN=60; MAX=3600; DEFAULT=300; TUNABLE = ANYTIME; } { PROPERTY = Network_resources_used; TUNABLE = AT_CREATION; DEFAULT = ““; }
Sun Cluster 소프트웨어가 시스템 정의 등록 정보를 제공하기는 하지만 자원 등록 정보 속성을 사용하여 다른 기본값을 설정할 수 있습니다. 자원 등록 정보에 적용할 수 있는 전체 속성 목록은 자원 등록 정보 속성을 참조하십시오.
샘플 RTR 파일의 시스템 정의 자원 등록 정보에 대한 다음 사항에 주의하십시오.
Sun Cluster는 모든 시간 초과에 대해 최소값(1초) 및 기본값(3600초, 즉 1시간)을 제공합니다. 샘플 RTR 파일은 최소 시간 초과값을 60초로, 기본값을 300초로 변경합니다. 클러스터 관리자는 이 기본값을 적용하거나 시간 초과값을 60초 이상의 다른 값으로 변경할 수 있습니다. Sun Cluster의 경우 최대값에는 제한이 없습니다.
Thorough_probe_interval, Retry_count 및 Retry_interval의 TUNABLE 속성은 ANYTIME으로 설정됩니다. 이 설정은 데이터 서비스가 실행 중인 경우에도 클러스터 관리자가 이러한 등록 정보의 값을 변경할 수 있다는 것을 의미합니다. 이러한 등록 정보는 샘플 데이터 서비스에 의해 구현되는 오류 모니터에서 사용합니다. 관리 작업에 의해 이러한 자원 등록 정보나 다른 자원 등록 정보가 변경되면 샘플 데이터 서비스는 Update 메소드를 구현하여 오류 모니터를 중지했다가 다시 시작합니다. Update 메소드 작동 방식을 참조하십시오.
자원 등록 정보는 다음과 같이 분류됩니다.
필수적. 클러스터 관리자가 자원을 만들 때 반드시 값을 지정해야 합니다.
선택적. 클러스터 관리자가 값을 지정하지 않을 경우 시스템에서 기본값을 제공합니다.
조건적. 등록 정보가 RTR 파일에 선언된 경우에만 RGM에서 등록 정보를 만듭니다.
샘플 데이터 서비스의 오류 모니터에서 Thorough_probe_interval, Retry_count, Retry_interval 및 Network_resources_used 조건적 등록 정보를 사용하기 때문에 개발자는 RTR 파일에서 이러한 등록 정보를 선언해야 합니다. 등록 정보 분류 방법에 대한 자세한 내용은 r_properties(5) man page or 자원 등록 정보를 참조하십시오.
샘플 RTR 파일의 끝에는 다음과 같은 확장 등록 정보가 있습니다.
# Extension Properties # The cluster administrator must set the value of this property to point to the # directory that contains the configuration files used by the application. # For this application, DNS, specify the path of the DNS configuration file on # PXFS (typically named.conf). { PROPERTY = Confdir; EXTENSION; STRING; TUNABLE = AT_CREATION; DESCRIPTION = “The Configuration Directory Path”; } # Time out value in seconds before declaring the probe as failed. { PROPERTY = Probe_timeout; EXTENSION; INT; DEFAULT = 120; TUNABLE = ANYTIME; DESCRIPTION = “Time out value for the probe (seconds)”; }
샘플 RTR 파일은 두 개의 확장 등록 정보인 Confdir 및 Probe_timeout을 정의합니다. Confdir 등록 정보는 DNS 구성 디렉토리의 경로를 지정합니다. 이 디렉토리는 DNS가 성공적으로 작동하는 데 필요한 in.named 파일을 포함합니다. 샘플 데이터 서비스의 Start 및 Validate 메소드는 DNS를 시작하기 전에 이 등록 정보를 사용하여 구성 디렉토리와 in.named 파일에 액세스할 수 있는지 확인합니다.
데이터 서비스가 구성되면 Validate 메소드는 새 디렉토리에 액세스할 수 있는지 확인합니다.
샘플 데이터 서비스의 PROBE 메소드는 Sun Cluster 콜백 메소드가 아니라 사용자 정의 메소드입니다. 따라서 Sun Cluster는 이 메소드에 대한 Probe_timeout 등록 정보를 제공하지 않습니다. 개발자는 클러스터 관리자가 Probe_timeout 값을 구성할 수 있도록 RTR 파일에 확장 등록 정보를 정의해야 합니다.