8장. Ceph 오브젝트 문제 해결
스토리지 관리자는 ceph-objectstore-tool
유틸리티를 사용하여 수준 또는 하위 수준 오브젝트 작업을 수행할 수 있습니다. ceph-objectstore-tool
유틸리티를 사용하면 특정 OSD 또는 배치 그룹 내의 오브젝트 관련 문제를 해결할 수 있습니다.
개체를 조작하면 복구할 수 없는 데이터 손실이 발생할 수 있습니다. ceph-objectstore-tool
유틸리티를 사용하기 전에 Red Hat 지원에 문의하십시오.
사전 요구 사항
- 네트워크 관련 문제가 없는지 확인합니다.
8.1. 상위 수준 오브젝트 작업 문제 해결
스토리지 관리자는 ceph-objectstore-tool
유틸리티를 사용하여 고급 오브젝트 작업을 수행할 수 있습니다. ceph-objectstore-tool
유틸리티는 다음과 같은 상위 수준 오브젝트 작업을 지원합니다.
- 오브젝트 나열
- 손실된 오브젝트 나열
- 손실된 오브젝트 수정
개체를 조작하면 복구할 수 없는 데이터 손실이 발생할 수 있습니다. ceph-objectstore-tool
유틸리티를 사용하기 전에 Red Hat 지원에 문의하십시오.
사전 요구 사항
- Ceph OSD 노드에 대한 루트 수준 액세스.
8.1.1. 오브젝트 나열
OSD에는 많은 배치 그룹이 포함될 수 있으며 배치 그룹(PG) 내에 있는 많은 오브젝트에 0이 포함될 수 있습니다. ceph-objectstore-tool
유틸리티를 사용하면 OSD 내에 저장된 오브젝트를 나열할 수 있습니다.
사전 요구 사항
- Ceph OSD 노드에 대한 루트 수준 액세스.
-
ceph-osd
데몬 중지.
절차
적절한 OSD가 다운되었는지 확인합니다.
구문
systemctl status ceph-FSID@osd.OSD_ID
예제
[root@host01 ~]# systemctl status ceph-b404c440-9e4c-11ec-a28a-001a4a0001df@osd.0.service
OSD 컨테이너에 로그인합니다.
구문
cephadm shell --name osd.OSD_ID
예제
[root@host01 ~]# cephadm shell --name osd.0
배치 그룹에 관계없이 OSD 내의 모든 오브젝트를 식별합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --op list
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list
배치 그룹 내의 모든 오브젝트를 식별합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op list
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op list
오브젝트가 속하는 PG를 식별합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --op list OBJECT_ID
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op list default.region
8.1.2. 손실된 오브젝트 수정
ceph-objectstore-tool
유틸리티를 사용하여 Ceph OSD에 저장된 손실된 오브젝트와 unfound objects를 나열하고 수정할 수 있습니다. 이 절차는 기존 오브젝트에만 적용됩니다.
사전 요구 사항
- Ceph OSD 노드에 대한 루트 수준 액세스.
-
ceph-osd
데몬 중지.
절차
적절한 OSD가 다운되었는지 확인합니다.
구문
systemctl status ceph-FSID@osd.OSD_ID
예제
[root@host01 ~]# systemctl status ceph-b404c440-9e4c-11ec-a28a-001a4a0001df@osd.0.service
OSD 컨테이너에 로그인합니다.
구문
cephadm shell --name osd.OSD_ID
예제
[root@host01 ~]# cephadm shell --name osd.0
손실된 레거시 오브젝트를 모두 나열하려면 다음을 수행합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost --dry-run
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost --dry-run
ceph-objectstore-tool
유틸리티를 사용하여 손실되거나 검색되지 않은 오브젝트를 수정합니다. 적절한 기능을 선택합니다.손실된 모든 개체를 수정하려면 다음을 수행합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost
배치 그룹 내에서 손실된 모든 개체를 수정하려면 다음을 수행합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --pgid PG_ID --op fix-lost
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --pgid 0.1c --op fix-lost
식별자로 손실된 개체를 수정하려면 다음을 수행합니다.
구문
ceph-objectstore-tool --data-path PATH_TO_OSD --op fix-lost OBJECT_ID
예제
[ceph: root@host01 /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-0 --op fix-lost default.region