-
Notifications
You must be signed in to change notification settings - Fork 1
RGWDedup User Guide
RGWDedup은 RadosGateway (RGW) 계층에서 접근 가능한 데이터에 대해 중복된 데이터를 선택적으로 제거함으로써 디스크 사용량을 줄일 수 있도록 도와주는 RGW 내부 기능이다.
RGWDedup은 RGW가 저장한 RGW object를 탐색/분석한 후, RADOS layer에 object dedup op를 요청한다.
또한, Scrub과 Visualization 같은 기능들을 지원하여 편리하게 Dedup 기능을 이용할 수 있다.
RGWDedup 기능이 포함된 코드는 https://github.com/samsungceph/ceph/tree/release 에서 제공한다. 현재 이 브랜치는 v17.2 Quincy 버전을 base로 하고 있고, 필요가 있을 시 Ceph main 브랜치 코드를 rebase한다.
추가된 RGWDedup 기능을 이용하기 위해서는 Github으로부터 받아 온 Ceph 프로젝트를 빌드하여 컨테이너 이미지를 만든 후, Cephadm을 이용하여 Ceph를 실행하여야 한다.
그러기 위해서는 배포할 Docker 이미지를 저장할 Private Registry(Docker registry v2, harbor, ...)가 필요하고, Ceph가 올라갈 모든 노드에서 해당 Registry로 자유로운 접근이 가능해야 한다.
*notice: samsungceph 공식 이미지 배포에 대한 내용은 아니다. 실제 환경에서는 Ceph upstream에서 빌드된 debian package는 그대로 사용하되, samsungceph 레포지토리로 부터 빌드한 radosgw package만 변경한 컨테이너 이미지를 사용하여야 한다.
해당 내용은 Ubuntu 22.04를 기준으로 작성되었다. 다른 버전의 Ubuntu(20, 18)도 크게 다르지 않으며, 만약 CentOS에서 컨테이너 이미지를 빌드한다면 ceph-container를 사용하여야 한다.
git clone https://github.com/samsungceph/ceph
cd ceph
git checkout release
./install-deps.sh
apt install docker.io
git tag -a v17.2.99
./make-debs.sh
cp -r /tmp/release/Ubuntu/pool/main/c/ceph .
공식 Ceph image와 다르게 컨테이너 base image를 ubuntu로 사용한다.
Dockerfile
# CEPH DAEMON BASE IMAGE
FROM ubuntu:jammy
ADD ./ceph/ /root/debs
ENV I_AM_IN_A_CONTAINER 1
# Who is the maintainer ?
LABEL maintainer=""
# Is a ceph container ?
LABEL ceph="True"
# What is the actual release ? If not defined, this equals the git branch name
LABEL RELEASE="main"
# What was the url of the git repository
LABEL GIT_REPO="https://github.com/canonical/ceph-container.git"
# What was the git branch used to build this container
LABEL GIT_BRANCH="main"
# What was the commit ID of the current HEAD
ARG GIT_COMMIT=unspecified
LABEL git_commit=$GIT_COMMIT
# Was the repository clean when building ?
LABEL GIT_CLEAN="True"
# What CEPH_POINT_RELEASE has been used ?
LABEL CEPH_POINT_RELEASE="-17.2.0"
ENV CEPH_VERSION quincy
ENV CEPH_POINT_RELEASE "-17.2.0"
ENV CEPH_DEVEL false
ENV CEPH_REF quincy
ENV OSD_FLAVOR default
# Additional custom .deb repo
ARG CUSTOM_APT_REPO=""
#======================================================
# Install ceph and dependencies, and clean up
#======================================================
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes --no-install-recommends \
gnupg curl apt-transport-https ca-certificates
# Optionally inject custom apt repo
RUN if [ -n "${CUSTOM_APT_REPO}" ] ; then \
DEBIAN_FRONTEND=noninteractive apt-get install -yy --no-install-recommends gpg-agent software-properties-common ; \
DEBIAN_FRONTEND=noninteractive add-apt-repository -y "${CUSTOM_APT_REPO}" ; \
fi
# Escape char after immediately after RUN allows comment in first line
RUN \
# Install all components for the image, whether from packages or web downloads.
# Typical workflow: add new repos; refresh repos; install packages; package-manager clean;
# download and install packages from web, cleaning any files as you go.
# Installs should support install of ganesha for luminous
# add the necessary repos
echo "" > /etc/apt/sources.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-backports main" \
>> /etc/apt/sources.list.d/erp.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe multiverse" \
>> /etc/apt/sources.list.d/jammy.list && \
echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe multiverse" \
>> /etc/apt/sources.list.d/jammy.list && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes /root/debs/*.deb && \
DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes --no-install-recommends \
\
vim bash-completion wget curl nmap \
ca-certificates \
e2fsprogs \
ceph-common \
ceph-mon \
ceph-osd \
ceph-mds \
rbd-mirror \
ceph-mgr \
ceph-mgr-cephadm \
ceph-mgr-dashboard \
ceph-mgr-diskprediction-local \
ceph-mgr-k8sevents \
ceph-mgr-rook\
ceph-grafana-dashboards \
kmod \
lvm2 \
gdisk \
smartmontools \
nvme-cli \
radosgw \
nfs-ganesha nfs-ganesha-ceph \
ceph-iscsi targetcli-fb \
attr \
ceph-fuse \
rbd-nbd \
cephfs-mirror \
&& \
# Clean container, starting with record of current size (strip / from end)
INITIAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" && \
#
#
# Perform any final cleanup actions like package manager cleaning, etc.
echo 'Postinstall cleanup' && \
# ( echo "apt clean" && DEBIAN_FRONTEND=noninteractive apt-get clean && \
# echo "apt autoclean" && DEBIAN_FRONTEND=noninteractive apt-get autoclean ) || \
# ( retval=$? && cat /var/log/apt/history.log && exit $retval ) && \
# echo 'remove unneeded apt, deb, dpkg data' && \
# rm -rf /var/lib/apt/lists/* \
# /var/cache/debconf/* \
# /var/log/apt/ \
# /var/log/dpkg.log \
# /tmp/* && \
# /bin/true && \
# Tweak some configuration files on the container system
# disable sync with udev since the container can not contact udev
sed -i -e 's/udev_rules = 1/udev_rules = 0/' -e 's/udev_sync = 1/udev_sync = 0/' -e 's/obtain_device_list_from_udev = 1/obtain_device_list_from_udev = 0/' /etc/lvm/lvm.conf && \
# validate the sed command worked as expected
grep -sqo "udev_sync = 0" /etc/lvm/lvm.conf && \
grep -sqo "udev_rules = 0" /etc/lvm/lvm.conf && \
grep -sqo "obtain_device_list_from_udev = 0" /etc/lvm/lvm.conf && \
mkdir -p /var/run/ceph /var/run/ganesha && \
# Clean common files like /tmp, /var/lib, etc.
rm -rf \
/etc/{selinux,systemd,udev} \
/lib/{lsb,udev} \
/tmp/* \
/usr/lib{,64}/{locale,systemd,udev,dracut} \
/usr/share/{doc,info,locale,man} \
/var/log/* \
/var/tmp/* && \
find / -xdev -name "*.pyc" -o -name "*.pyo" -exec rm -f {} \; && \
# ceph-dencoder is only used for debugging, compressing it saves 10MB
# If needed it will be decompressed
# TODO: Is ceph-dencoder safe to remove as rook was trying to do?
# rm -f /usr/bin/ceph-dencoder && \
if [ -f /usr/bin/ceph-dencoder ]; then gzip -9 /usr/bin/ceph-dencoder; fi && \
# TODO: What other ceph stuff needs removed/stripped/zipped here?
# Photoshop files inside a container ?
rm -f /usr/lib/ceph/mgr/dashboard/static/AdminLTE-*/plugins/datatables/extensions/TableTools/images/psd/* && \
# Some logfiles are not empty, there is no need to keep them
find /var/log/ -type f -exec truncate -s 0 {} \; && \
#
#
# Report size savings (strip / from end)
FINAL_SIZE="$(bash -c 'sz="$(du -sm --exclude=/proc /)" ; echo "${sz%*/}"')" && \
REMOVED_SIZE=$((INITIAL_SIZE - FINAL_SIZE)) && \
echo "Cleaning process removed ${REMOVED_SIZE}MB" && \
echo "Dropped container size from ${INITIAL_SIZE}MB to ${FINAL_SIZE}MB" && \
#
# Verify that the packages installed haven't been accidentally cleaned
apt-cache show \
ca-certificates \
e2fsprogs \
ceph-common \
ceph-mon \
ceph-osd \
ceph-mds \
rbd-mirror \
ceph-mgr \
ceph-mgr-cephadm \
ceph-mgr-dashboard \
ceph-mgr-diskprediction-local \
ceph-mgr-k8sevents \
ceph-mgr-rook\
ceph-grafana-dashboards \
kmod \
lvm2 \
gdisk \
smartmontools \
nvme-cli \
radosgw \
nfs-ganesha nfs-ganesha-ceph \
ceph-iscsi targetcli-fb \
attr \
ceph-fuse \
rbd-nbd \
&& echo 'Packages verified successfully'
#======================================================
# Install ceph and dependencies, and clean up
#======================================================
# Escape char after immediately after RUN allows comment in first line
RUN \
# Install all components for the image, whether from packages or web downloads.
# Typical workflow: add new repos; refresh repos; install packages; package-manager clean;
# download and install packages from web, cleaning any files as you go.
echo 'Install packages' && \
DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget unzip uuid-runtime python-setuptools udev dmsetup ceph-volume python3-asyncssh python3-natsort && \
apt-get install -y --no-install-recommends --force-yes \
sharutils \
lsof \
\
\
etcd-client \
s3cmd
# Docker image tag는 Docker Registry 및 이름을 사용자가 임의로 지정
docker build . -t 10.10.40.35:5000/ydgtestimage
# 확인
root@dskbd015:~/ydg/ceph-containers# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
10.10.40.35:5000/ydgtestiamge latest bc7c633bd6eb About an hour ago 2.64GB
# Docker image tag는 사용자가 임의로 지정
# Private registry 및 insecure일 경우에는 docker config 적용 후 docker 재시작 필요
docker push 10.10.40.35:5000/ydgtestimage
cephadm 파일을 배포할 노드에 받아두고, 권한 설정을 한다. → 파일은 별도로 전달
*특정(quincy) branch 혹은 main branch에서 cephadm을 wget 혹은 curl로 받는 것은 stable 하지 않기 때문에, 특정 시점의 cephadm에서 테스트해야 함. (cephadm과 ceph 버전이 일치하여 문제없이 돌아가는 것은 특정 tag만 보장됨)
chmod +x cephadm
사용할 모든 Ceph 노드에서 requirements를 만족하였으면, bootstrap을 시작하는 첫번째 노드에서 다음과 같은 명령어로 Ceph 클러스터를 시작할 수 있다.
./cephadm --image 10.10.40.35:5000/ydgtestimage bootstrap --mon-ip 10.10.40.35 --allow-mismatched-release --fsid 12341234-1234-1234-1234-123412341234 --initial-dashboard-password 12341234 --dashboard-password-noupdate
--image: 2.1. 에서 빌드한 이미지를 push한 registry 주소 및 이미지 tag --mon-ip: 현재 노드의 ip --fsid: 사용할 Ceph fsid(생략가능) Bootstrap을 수행하는 첫번째 노드에는 기본적으로 MON, MGR 데몬이 뜬다. 추후 데몬의 placement 조절은 cephadm shell 내에서 ceph orch 명령어 혹은 MGR dashboard frontend를 통해 가능하다.
./cephadm --image 10.10.40.35:5000 shell
이 명령어를 통해 Ceph cluster에 접근할 수 있는(ceph.conf 및 keyring 포함) 컨테이너 쉘이 생긴다. ctrl + p + q 를 통해 detach 할 수 있고, 추후 cephadm이 있는 노드에서 다시 attach하여 사용할 수 있다. 아예 exit 명령어로 컨테이너 쉘을 종료할 수도 있다.
RADOS 배포는 배포하고자 하는 환경(node 수, osd 수 등)에 따라 달라지기 때문에 환경에 따라 ceph orch 혹은 MGR dashboard frontend를 통해 적절히 배포한다.
기본적으로 만족하여야 하는 조건들은 다음과 같다.
- MON 수: 3개 이상의 MON을 다른 노드에 띄워 PAXOS quorum을 유지하여야 한다.
- OSD 수 및 failure domain: default crush rule은 failure domain이 node이고, default pool size가 3이기 때문에 3개의 노드에 각각 OSD가 존재하여야 한다.
*만약 해당 조건을 만족하지 못한다면, ceph config로 default crush rule, pool의 min_size default 값, 이미 존재하는 pool의 min_size와 crush_rule을 변경해야지 RGW 인스턴스가 생성되고 RGWDedup이 사용할 cold pool을 생성할 수 있다.
RGW 배포도 환경에 따라 달라지기 때문에 환경에 따라 RGW를 배포하면 된다. 마찬가지로 ceph orch 혹은 MGR dashboard frontend를 통해 적절히 배포한다. 만약 ceph orch를 통해 yaml 형태로 RGW 명세를 제공하거나 더욱 자세한 옵션들은 공식 docs를 참조한다.
# cephadm shell 내부에서 실행
ceph orch apply rgw ydgtestrgw --placement=1 --port=80 # 1개의 rgw를 80번 포트로 배포
RGW를 배포하면 자동으로 생성되는 S3 계정이 존재한다. 자동으로 만들어진 user의 정보를 보거나 새로운 user의 정보를 보기 위해서 공식 docs를 참조한다.
radosgw-admin user create --uid="1234" --display-name="1234" --access-key="1234" --secret-key="1234" # access-key 및 secret-key가 1234인 S3 user 등록
RGWDedup에서 사용되는 Parameter는 다음과 같다.
| Parameter | Description | Value Range | Default Value |
|---|---|---|---|
| rgw_enable_dedup_threads | RGWDedup 기능 동작 | bool(true | false) | false |
| rgw_dedup_chunk_algo | Object 데이터를 Chunk로 나누는 알고리즘 | string(fastcdc | fixed) | fastcdc |
| rgw_dedup_chunk_size | Chunk의 크기(Bytes) | int[4, 4194304] | 16384 |
| rgw_dedup_fp_algo | Chunk Data에 대응하는 Object ID 계산 알고리즘 | string(sha1 | sha256 | sha512) | sha1 |
| rgw_dedup_fpmanager_memory_limit | FPManager가 사용할 수 있는 memory 최대값(Bytes) | int[0, ∞] | 4294967296 |
| rgw_dedup_threshold | 중복 정도에 따른 Deduplication 기준 | int[1, 64] | 2 |
| rgw_dedup_num_workers | Dedup Worker Thread 수 | int[1, 64] | 3 |
| rgw_dedup_scrub_ratio | Dedup 100번 수행 당 Scrub 수행 횟수 | double[0, 100] | 5 |
| rgw_dedup_cold_pool_name(TODO) | Chunk / Cold object가 저장될 Ceph pool 이름 | string | default-cold-pool |
해당 configuration은 ceph configuration이며, ceph config set 혹은 Dashboard를 통해 설정할 수 있다.
RGWDedup에 관련한 ceph config를 설정한 후(Default value 권장), rgw_enable_dedup_threads 값을 true로 바꾼 후 RGW 인스턴스를 실행시키면 RGWDedup이 실행되며, RGW에 저장된 데이터에 대해 deduplication을 자동으로 시작한다.
이 때, "default-cold-pool"이라는 이름을 가진 pool이 생성되며, 만약 기존에 해당 이름의 pool이 존재하면 그 pool을 그대로 사용한다.
3.1. 에서 parameter 세팅을 완료하고 rgw_enable_dedup_thread를 true로 세팅한 상태로 RGW 인스턴스를 생성하면 RGWDedupWorker가 rgw_dedup_threshold 이상으로 중복된 chunk에 대해 deduplication을 수행한다.
Base pool(RGW Zone Placement에 따라 결정됨)에 있는 RADOS object(RGW object의 일부)를 chunk로 쪼갠 후, rgw_dedup_threshold 수 이상으로 중복되는 Chunk가 있는지 확인한다.
- 발견되면 cold pool에 chunk object를 생성하고, 기존 base pool의 RADOS object에서 set-chunk를 한 후 해당 데이터를 evict한다.
- 하나의 RADOS object 내에서 중복된 chunk가 발견되지 않았다면, cold pool에 통째로 그 RADOS object를 생성하고 set-chunk를 한 후 evict한다.
중복된 chunk data가 evict되면서 Ceph cluster에 저장되는 전체 data 용량이 줄어든다.
또, Worker는 주기적으로 scrub을 수행하여 혹시나 있을 수 있는 base pool과 cold pool의 chunk reference mismatch 정보를 바로잡는다.
더이상 중복된 데이터가 없다면, rgw_dedup_start를 false로 바꾸어 정지할 수 있다.
RGWDedup은 RGW 혹은 RADOS의 다른 기능이나 동작에 영향을 최소화하도록 설계되었기 때문에 기존 Ceph Pool을 운영하는 것과 동일한 전략으로 Pool을 운영할 수 있다.
Ceph Cluster 전체를 구성해 두고, RGWDedup을 운영하기 위해 다음과 같은 조건들을 고려해볼 수 있다.
- Max(Base Pool capacity) > RGW data 총용량
- Max(Cold Pool capacity) > RGW data 총용량
- Ceph Cluster capacity > RGW data 총용량
만약 이때 base pool과 cold pool이 동일한 디스크를 사용한다면, base pool과 cold pool의 용량을 먼저 구분지어 할당하지 않고 pool의 thin provision 기능을 이용하여 전체 Cluster capacity 내에서 데이터를 모두 적재할 수 있다.
- Pool이 가득 차면 I/O가 멈추고, 또 OSD가 nearfull이 나는 상황을 대비하여 Base pool과 cold pool는 최대 70~80% 내에서 사용하는 것을 권장한다.
이 챕터에서는 RGWDedup이 어떤 테스트를 수행하였는지 명시한다.
Unit test는 RGWDedup 내부 모듈 별로 역할에 따라 test scenario를 수행한다.
- 역할: fingerprint를 저장해 DedupWorker가 chunk의 중복을 판단하는데 참조한다.
- Test scenario
- FPMap entry stress test
- 지정된 FPMap의 memory limit 이상으로 fp value를 추가했을 때, FPManager가 entry eviction을 수행해 limit 이하의 memory 사용량을 유지하는지 확인
- Multi-threaded 환경 fpmanager test
- Multi-thread 환경에서 fpmanager에 fingerprint를 add, find 할 때 fp count의 atomicity를 확인한다.
- FPMap entry stress test
- 역할: Multi-RGWDedup 실행을 위한 RGW id 인식 및 DedupWorker와 ChunkScrubWorker가 주기적으로 실행되도록 관리한다.
- Test scenario
- Service dump parsing test
- service dump (Ceph cluster daemon info)에서 실행 중인 RGW daemon의 개수와 실행 중인 RGW의 id를 올바르게 추출할 수 있는지 확인한다.
- dedup scrub ratio test
- dedup_scrub_ratio에 맞게 dedup worker와 scrub worker가 실행 되는지 test한다.
- Service dump parsing test
- 역할: Object를 scan해 중복이 많은 chunk를 dedup 하거나 중복이 없는 object는 archiving 한다.
- Test scenario
- Dedup test
- 중복이 있는 chunk가 cold pool에 chunk dedup 되었고, 중복이 없는 데이터는 dedup이 되지 않았음을 확인한다.
- Archiving test
- 중복이 없는 데이터가 archiving 된 후 cold object의 reference 확인한다.
- Data consistency test
- Dedup 전 object와 dedup 후 chunk object들이 같은 content를 가지고 있음을 확인한다.
- Multiple placement policy test (multiple base-pool)
- 다수의 placement policy가 존재할 때 각 data pool의 object들이 cold pool로 dedup 또는 migration이 잘 되는지 확인한다. cold object의 reference를 확인해 base pool 정보를 확인하고, src object의 pool을 알 수 있다. 각 base pool에 생성된 데이터는 인위적으로 생성한 (dedup 동작이 예측 가능한) object이다.
- Chunk reference size test
- Dedup test
0-fill 파일을 만든 후, RGW object로 업로드 한다.
그 후, base pool과 cold pool에 object가 존재하는지 확인하고, base pool의 chunk들이 cold pool의 하나의 chunk object를 가리키는지 reference 확인하여 deduplication 동작을 확인한다.
random 파일을 만든 후, RGW object로 업로드 한다.
그 random 파일에는 중복된 chunk가 없기 때문에, 그 rados object가 통째로 base pool에서 cold pool로 evict 된 것을 확인한다.
False-positive 기반의 reference management를 하는 Ceph에서 metadata object와 chunk object간에 reference mismatch는 피할 수 없다. Ceph에서는 이 문제를 scrub 동작을 이용해서 해결한다.
본 test 에서는 RGWDedup이 metadata object와 chunk object 사이에 발생한 reference mismatch를 발견하고, 올바르게 수정할 수 있는지 확인한다.
Dedup을 하기 전 object의 content와 dedup을 하고 난 후 object가 분산 되었지만 동일한 content를 포함하고 있다는 것을 확인한다.
다수의 placement policy (bucket의 object가 저장될 data pool) 가 존재할 때 각 data pool에 있는 object들이 cold pool로 dedup 또는 migration이 잘 되는지 확인한다.
FPManager에 서로 다른 entry를 FPManager memory limit 이상으로 추가하였을 때, FPManager가 entry eviction 수행하여 균일한 memory 사용량을 유지하는지 확인한다.
Chunk object의 중복이 너무 많아지면 발생하는 문제에 잘 대응하는지 확인한다.
특정 chunk에 대해 중복이 MAX_CHUNK_REF_SIZE (10,000)개 이상 base pool에 저장이 되어 있는 상태에서 dedup을 시도한다.
chunk object의 reference 개수가 MAX_CHUNK_REF_SIZE가 되면 이 chunk에 대해서는 더 이상 dedup을 수행하지 못하게 한다.
결과적으로 해당 chunk의 reference 개수는 MAX_CHUNK_REF_SIZE는 이 이상 늘어나지 않는다.
본 챕터에서는 Cephadm가 배포한 Prometheus 및 Grafana를 통해 RGWDedup을 모니터링 할 때 필요한 단계에 대해 기술한다.
만약 Ceph MGR에서 별도로 연동한 Prometheus 및 Grafana가 있다면, Grafana에 7번 항목의 dashboard.json 항목을 import하여 새로운 dashboard를 만들거나, 기존 "RGW Overview" dashboard의 json에 override하면 된다.
#cephadm shell 안에서
root@dskbd015:/# ceph orch ls
NAME PORTS RUNNING REFRESHED AGE PLACEMENT
alertmanager ?:9093,9094 1/1 4m ago 8m count:1
crash 1/1 4m ago 8m *
grafana ?:3000 1/1 4m ago 8m count:1
mgr 1/2 4m ago 8m count:2
mon 1/5 4m ago 8m count:5
node-exporter ?:9100 1/1 4m ago 8m *
osd 3 4m ago - <unmanaged>
prometheus ?:9095 1/1 4m ago 8m count:1
rgw.ydgtestrgw ?:80 1/1 4m ago 6m count:1
root@dskbd015:/# ceph orch ps
NAME HOST PORTS STATUS REFRESHED AGE MEM USE MEM LIM VERSION IMAGE ID CONTAINER ID
alertmanager.dskbd015 dskbd015 *:9093,9094 running (13m) 9m ago 13m 15.4M - 0.23.0 ba2b418f427c 17e7585ede38
crash.dskbd015 dskbd015 running (13m) 9m ago 13m 6951k - 17.2.9999 5a0b41ab5c83 94127e6f29a3
grafana.dskbd015 dskbd015 *:3000 running (13m) 9m ago 13m 47.9M - 8.3.5 dad864ee21e9 31dd70aafc9d
mgr.dskbd015.ljpkzo dskbd015 *:9283 running (14m) 9m ago 14m 424M - 17.2.9999 5a0b41ab5c83 25d392e4aaec
mon.dskbd015 dskbd015 running (14m) 9m ago 14m 39.2M 2048M 17.2.9999 5a0b41ab5c83 e05b668867bd
node-exporter.dskbd015 dskbd015 *:9100 running (13m) 9m ago 13m 28.7M - 1.3.1 1dbe0e931976 00c43047cc48
osd.0 dskbd015 running (11m) 9m ago 11m 41.4M 114G 17.2.9999 5a0b41ab5c83 bb3c8b5321d9
osd.1 dskbd015 running (10m) 9m ago 10m 42.0M 114G 17.2.9999 5a0b41ab5c83 acad050cbbbf
osd.2 dskbd015 running (10m) 9m ago 10m 38.1M 114G 17.2.9999 5a0b41ab5c83 85a5dbf69f8c
prometheus.dskbd015 dskbd015 *:9095 running (13m) 9m ago 13m 61.1M - 2.33.4 514e6a882f6e 29c258153e17
rgw.ydgtestrgw.dskbd015.lsfwnf dskbd015 *:80 running (9m) 9m ago 9m 15.8M - 17.2.9999 5a0b41ab5c83 5c058dceb38a
root@dskbd015:/# ssh root@dskbd015
root@dskbd015:~/ydg/ceph/build# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5c058dceb38a 10.10.40.35:5000/ydgtestimage "/usr/bin/radosgw -n…" 14 minutes ago Up 14 minutes ceph-12341234-1234-1234-1234-123412341234-rgw-ydgtestrgw-dskbd015-lsfwnf
85a5dbf69f8c 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-osd -…" 14 minutes ago Up 14 minutes ceph-12341234-1234-1234-1234-123412341234-osd-2
acad050cbbbf 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-osd -…" 15 minutes ago Up 15 minutes ceph-12341234-1234-1234-1234-123412341234-osd-1
bb3c8b5321d9 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-osd -…" 15 minutes ago Up 15 minutes ceph-12341234-1234-1234-1234-123412341234-osd-0
31dd70aafc9d quay.io/ceph/ceph-grafana:8.3.5 "/bin/sh -c 'grafana…" 17 minutes ago Up 17 minutes ceph-12341234-1234-1234-1234-123412341234-grafana-dskbd015
17e7585ede38 quay.io/prometheus/alertmanager:v0.23.0 "/bin/alertmanager -…" 17 minutes ago Up 17 minutes ceph-12341234-1234-1234-1234-123412341234-alertmanager-dskbd015
29c258153e17 quay.io/prometheus/prometheus:v2.33.4 "/bin/prometheus --c…" 17 minutes ago Up 17 minutes ceph-12341234-1234-1234-1234-123412341234-prometheus-dskbd015
1f4b5bea370a 10.10.40.35:5000/ydgtestimage "bash" 18 minutes ago Up 18 minutes goofy_pare
00c43047cc48 quay.io/prometheus/node-exporter:v1.3.1 "/bin/node_exporter …" 18 minutes ago Up 18 minutes ceph-12341234-1234-1234-1234-123412341234-node-exporter-dskbd015
94127e6f29a3 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-crash…" 18 minutes ago Up 18 minutes ceph-12341234-1234-1234-1234-123412341234-crash-dskbd015
25d392e4aaec 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-mgr -…" 18 minutes ago Up 18 minutes ceph-12341234-1234-1234-1234-123412341234-mgr-dskbd015-ljpkzo
e05b668867bd 10.10.40.35:5000/ydgtestimage "/usr/bin/ceph-mon -…" 18 minutes ago Up 18 minutes ceph-12341234-1234-1234-1234-123412341234-mon-dskbd015
80a48edbabc8 registry "/entrypoint.sh /etc…" 28 hours ago Up 28 hours 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp ydgregistry
vi /var/lib/ceph/{Ceph fsid}/grafana.{Hostname}/etc/grafana/grafana.ini
(ex. vi /var/lib/ceph/12341234-1234-1234-1234-123412341234/grafana.dskbd015/etc/grafana/grafana.ini)
# This file is generated by cephadm.
[users]
default_theme = light
[auth.anonymous]
enabled = true
org_name = 'Main Org.'
org_role = 'Viewer'
[server]
domain = 'bootstrap.storage.lab'
protocol = https
cert_file = /etc/grafana/certs/cert_file
cert_key = /etc/grafana/certs/cert_key
http_port = 3000
http_addr =
[snapshots]
external_enabled = false
[security]
disable_initial_admin_creation = false # disable admin creation을 true에서 false로 변경
admin_password = 1234 # Grafana admin user의 password를 추가
cookie_secure = true
cookie_samesite = none
allow_embedding = true
# 변경 후 vi 저장 및 종료
root@dskbd015:~/ydg/ceph/build# systemctl restart ceph-12341234-1234-1234-1234-123412341234@grafana.dskbd015.service
URL: https://{Grafana_Host_IP}:3000/login
Username: admin
Password: 1234
dashboard.json → 파일은 별도로 전달
-
OSD(RADOS) layer에서의 bug: evict 된 데이터의 reference count 정보 (xattr)만 읽어도 data promote가 일어남 → 아직 Ceph upstream에 merge되지 않았지만, release 브랜치에는 fix 적용
-
Base pool에 너무 많은 중복되는 데이터가 cold pool의 한 chunk를 가리키고 있는 경우(극한의 예로 0-fill data), 일정 수 이상의 chunk를 가리키지 못하게 제한하고 있다. 이는 cold pool의 한 object에 너무 많은 reference manifest가 쌓여 manifest operation의 latency가 길어져 stuck되는것을 막기 위함이다.