1.4. 질문 및 답변
1.4.1. 정보 얻기
이 섹션에서는 Ceph API를 사용하여 스토리지 클러스터, Ceph 모니터, OSD, 풀 및 호스트에 대한 정보를 확인하는 방법을 설명합니다.
1.4.1.1. 모든 클러스터 구성 옵션을 보려면 어떻게 해야 합니까?
이 섹션에서는 RESTful 플러그인을 사용하여 클러스터 구성 옵션 및 해당 값을 보는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:CEPH_MANAGER_PORT/api/cluster_conf'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
TCP 포트 번호를 사용하는
CEPH_MANAGER_PORT
. 기본 TCP 포트 번호는 8443입니다.
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/cluster_conf'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/cluster_conf', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/cluster_conf', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/cluster_conf
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
추가 리소스
- Red Hat Ceph Storage 6 구성 가이드
1.4.1.2. 부분적인 클러스터 설정 옵션을 보려면 어떻게 해야 합니까?
이 섹션에서는 특정 클러스터 옵션 및 해당 값을 보는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/cluster_conf/ARGUMENT'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
보려는 설정 옵션을 사용한
ARGUMENT
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/cluster_conf/ARGUMENT'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/cluster_conf/ARGUMENT', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
보려는 설정 옵션을 사용한
ARGUMENT
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/cluster_conf/ARGUMENT', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/cluster_conf/ARGUMENT
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
보려는 설정 옵션을 사용한
ARGUMENT
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
추가 리소스
- Red Hat Ceph Storage 6 구성 가이드
1.4.1.3. OSD의 모든 구성 옵션을 보려면 어떻게 해야 합니까?
이 섹션에서는 모든 구성 옵션과 OSD의 값을 보는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/flags'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/flags'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/flags', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/flags', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/osd/flags
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
추가 리소스
- Red Hat Ceph Storage 6 구성 가이드
1.4.1.4. 어떻게 규칙을 볼 수 있습니까?
이 섹션에서는 규칙을 보는 방법에 대해 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/crush_rule'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/crush_rule'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/crush_rule', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/crush_rule', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/crush_rule
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
추가 리소스
- Red Hat Ceph Storage 6 관리 가이드에 있는 FlexVolume 규칙 섹션.
1.4.1.5. 모니터에 대한 정보는 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 특정 Monitor에 대한 정보를 보는 방법에 대해 설명합니다.
- IP 주소
- 이름
- 쿼럼 상태
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/monitor'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/monitor'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/monitor', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/monitor', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/monitor
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.6. 파트 모니터에 대한 정보는 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 특정 Monitor에 대한 정보를 보는 방법에 대해 설명합니다.
- IP 주소
- 이름
- 쿼럼 상태
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/monitor/NAME'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
모니터의 짧은 호스트 이름으로
NAME
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/monitor/NAME'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/monitor/NAME', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
모니터의 짧은 호스트 이름으로
NAME
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/monitor/NAME', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/monitor/NAME
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
모니터의 짧은 호스트 이름으로
NAME
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.7. OSD에 대한 정보를 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 OSD에 대한 정보를 보는 방법을 설명합니다.
- IP 주소
- 해당 풀
- 유사성
- 가중치
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/osd'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/osd
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.8. 파트 OSD에 대한 정보를 보려면 어떻게 해야 합니까?
이 섹션에서는 다음과 같은 특정 OSD에 대한 정보를 보는 방법을 설명합니다.
- IP 주소
- 해당 풀
- 유사성
- 가중치
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/ID', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/ID', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/osd/ID
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.9. OSD에서 일정할 수 있는 프로세스를 어떻게 결정할 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 scrubbing 또는 deep scrubbing과 같은 프로세스를 OSD에서 예약할 수 있는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/ID/command'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/ID/command'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/ID/command', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/osd/ID/command', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/osd/ID/command
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.10. 풀에 대한 정보를 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 풀에 대한 정보를 보는 방법을 설명합니다.
- 플래그
- 크기
- 배치 그룹 수
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/pool'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/pool'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/pool', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/pool', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/pool
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.11. 파트 풀에 대한 정보는 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 특정 풀에 대한 정보를 보는 방법을 설명합니다.
- 플래그
- 크기
- 배치 그룹 수
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/pool/ID', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/pool/ID', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/pool/ID
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.12. 호스트에 대한 정보를 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 호스트에 대한 정보를 보는 방법을 설명합니다.
- 호스트 이름
- Ceph 데몬 및 해당 ID
- Ceph 버전
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/host'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/host'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/host', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/host', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/host
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.1.13. 파트 호스트에 대한 정보는 어떻게 볼 수 있습니까?
이 섹션에서는 다음과 같은 특정 호스트에 대한 정보를 보는 방법을 설명합니다.
- 호스트 이름
- Ceph 데몬 및 해당 ID
- Ceph 버전
curl
명령
명령줄에서 다음을 사용합니다.
curl --silent --user USER 'https://CEPH_MANAGER:8080/api/host/HOST_NAME'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
hostname
필드에 나열된 호스트의 호스트 이름을 사용하는HOST_NAME
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/host/HOST_NAME'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/host/HOST_NAME', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
hostname
필드에 나열된 호스트의 호스트 이름을 사용하는HOST_NAME
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.get('https://CEPH_MANAGER:8080/api/host/HOST_NAME', auth=("USER", "PASSWORD"), verify=False) >> print result.json()
WebECDHE
웹 브라우저에서 다음을 입력합니다.
https://CEPH_MANAGER:8080/api/host/HOST_NAME
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
hostname
필드에 나열된 호스트의 호스트 이름을 사용하는HOST_NAME
메시지가 표시되면 사용자 이름과 암호를 입력합니다.
1.4.2. 설정 변경
이 섹션에서는 Ceph API를 사용하여 OSD 구성 옵션, OSD 상태, 풀에 대한 정보를 변경하는 방법을 설명합니다.
1.4.2.1. OSD 설정 옵션을 어떻게 변경할 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 OSD 구성 옵션을 변경하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"OPTION": VALUE}' | curl --request PATCH --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/flags'
교체:
-
수정할 옵션과 함께,
일시 정지
,
, noin ,nodown
,no
outnoin
,nobackfill
,norecover
,noscrub
,nodeep-scrub
-
true
또는false
를 사용하는VALUE
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"OPTION": VALUE}' | curl --request PATCH --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/flags'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/osd/flags', json={"OPTION": VALUE}, auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
수정할 옵션과 함께,
일시 정지
,
, noin ,nodown
,no
outnoin
,nobackfill
,norecover
,noscrub
,nodeep-scrub
-
True
또는False
를 사용하는VALUE
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/osd/flags', json={"OPTION": VALUE}, auth=("USER", "PASSWORD"), verify=False) >> print result.json()
1.4.2.2. OSD 상태를 어떻게 변경할 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 OSD 상태를 변경하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"STATE": VALUE}' | curl --request PATCH --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
교체:
-
상태에 대한
STATE
(in
또는up
) -
true
또는false
를 사용하는VALUE
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"STATE": VALUE}' | curl --request PATCH --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/osd/ID', json={"STATE": VALUE}, auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID -
상태에 대한
STATE
(in
또는up
) -
True
또는False
를 사용하는VALUE
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/osd/ID', json={"STATE": VALUE}, auth=("USER", "PASSWORD"), verify=False) >> print result.json()
1.4.2.3. OSD를 어떻게 복구할 수 있습니까?
이 섹션에서는 OSD의 가중치를 변경하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"reweight": VALUE}' | curl --request PATCH --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
교체:
-
새로운 가중치와 함께
VALUE
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"reweight": VALUE}' | curl --request PATCH --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/osd/ID', json={"reweight": VALUE}, auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID -
새로운 가중치와 함께
VALUE
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/osd/ID', json={"reweight": VALUE}, auth=("USER", "PASSWORD"), verify=False) >> print result.json()
1.4.2.4. 풀에 대한 정보는 어떻게 변경할 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 특정 풀에 대한 정보를 변경하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"OPTION": VALUE}' | curl --request PATCH --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
교체:
-
수정할 옵션이 있는 경우
-
옵션의 새 값과 함께
VALUE
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"OPTION": VALUE}' | curl --request PATCH --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/pool/ID', json={"OPTION": VALUE}, auth=("USER, "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID -
수정할 옵션이 있는 경우
-
옵션의 새 값과 함께
VALUE
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.patch('https://CEPH_MANAGER:8080/api/pool/ID', json={"OPTION": VALUE}, auth=("USER, "PASSWORD"), verify=False) >> print result.json()
1.4.3. 클러스터
이 섹션에서는 Ceph API를 사용하여 OSD에서 스크럽 또는 딥 스크럽을 초기화하거나 풀을 생성하거나 풀에서 데이터를 제거하거나 요청을 제거하는 방법을 설명합니다.
1.4.3.1. OSD에서 예약된 프로세스를 실행하려면 어떻게 해야 합니까?
이 섹션에서는 RESTful API를 사용하여 OSD에서 scrubbing 또는 deep scrubbing과 같은 예약된 프로세스를 실행하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"command": "COMMAND"}' | curl --request POST --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/osd/ID/command'
교체:
-
시작하기
를 원하는 프로세스(scrub
,deep-scrub
또는repair
)를 사용한 ResticMAND. OSD에서 프로세스가 지원되는지 확인합니다. 자세한 내용은 1.4.1.9절. “OSD에서 일정할 수 있는 프로세스를 어떻게 결정할 수 있습니까?” 을 참조하십시오. -
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"command": "COMMAND"}' | curl --request POST --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/osd/ID/command'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.post('https://CEPH_MANAGER:8080/api/osd/ID/command', json={"command": "COMMAND"}, auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
osd
필드에 나열된 OSD의ID
가 있는 ID -
시작하기
를 원하는 프로세스(scrub
,deep-scrub
또는repair
)를 사용한 ResticMAND. OSD에서 프로세스가 지원되는지 확인합니다. 자세한 내용은 1.4.1.9절. “OSD에서 일정할 수 있는 프로세스를 어떻게 결정할 수 있습니까?” 을 참조하십시오. -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.post('https://CEPH_MANAGER:8080/api/osd/ID/command', json={"command": "COMMAND"}, auth=("USER", "PASSWORD"), verify=False) >> print result.json()
1.4.3.2. 새 풀을 어떻게 만들 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 새 풀을 생성하는 방법을 설명합니다.
curl
명령
명령줄에서 다음을 사용합니다.
echo -En '{"name": "NAME", "pg_num": NUMBER}' | curl --request POST --data @- --silent --user USER 'https://CEPH_MANAGER:8080/api/pool'
교체:
-
새 풀의 이름으로
NAME
-
배치 그룹 수와 함께
NUMBER
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
echo -En '{"name": "NAME", "pg_num": NUMBER}' | curl --request POST --data @- --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/pool'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.post('https://CEPH_MANAGER:8080/api/pool', json={"name": "NAME", "pg_num": NUMBER}, auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
새 풀의 이름으로
NAME
-
배치 그룹 수와 함께
NUMBER
-
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.post('https://CEPH_MANAGER:8080/api/pool', json={"name": "NAME", "pg_num": NUMBER}, auth=("USER", "PASSWORD"), verify=False) >> print result.json()
1.4.3.3. 풀을 어떻게 제거할 수 있습니까?
이 섹션에서는 RESTful 플러그인을 사용하여 풀을 제거하는 방법을 설명합니다.
이 요청은 기본적으로 허용되지 않습니다. 이를 허용하려면 Ceph 구성 가이드에 다음 매개 변수를 추가합니다.
mon_allow_pool_delete = true
curl
명령
명령줄에서 다음을 사용합니다.
curl --request DELETE --silent --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
교체:
-
사용자 이름을 사용하는
USER
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID
메시지가 표시되면 사용자 암호를 입력합니다.
자체 서명된 인증서를 사용한 경우 --insecure
옵션을 사용합니다.
curl --request DELETE --silent --insecure --user USER 'https://CEPH_MANAGER:8080/api/pool/ID'
Python
Python 인터프리터에서 다음을 입력합니다.
$ python >> import requests >> result = requests.delete('https://CEPH_MANAGER:8080/api/pool/ID', auth=("USER", "PASSWORD")) >> print result.json()
교체:
-
CEPH_MANAGER
with the IP address or short host name of the node with the activeceph-mgr
instance -
pool
필드에 나열된 풀의ID
가 있는 ID -
사용자 이름을 사용하는
USER
-
사용자
암호
를 사용한 암호
자체 서명된 인증서를 사용한 경우 verify=False
옵션을 사용합니다.
$ python >> import requests >> result = requests.delete('https://CEPH_MANAGER:8080/api/pool/ID', auth=("USER", "PASSWORD"), verify=False) >> print result.json()