Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hhk7734 committed Dec 30, 2024
1 parent 5a7da15 commit 13dce33
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 24 deletions.
11 changes: 7 additions & 4 deletions docs/mlops/storage/ceph/cephfs.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
id: cephfs
title: Ceph File System(CephFS)
sidebar_label: File System
description: Ceph File System(CephFS)
title: Ceph Shared File System(CephFS)
sidebar_label: Shared File System
description: Ceph Shared File System(CephFS)
keywords:
- ceph
- cephfs
---

:::warning
Ceph File System을 사용하면 클라이언트는 메타데이터 관리를 위해 MDS(Metadata Server)와 통신해야하므로 Ceph Rados Block Device(RBD)를 사용하는 것에 비해 성능이 떨어집니다.
Ceph Shared File System을 사용하면 클라이언트는 메타데이터 관리를 위해 MDS(Metadata Server)와 통신해야하므로 Ceph Rados Block Device(RBD)를 사용하는 것에 비해 성능이 떨어집니다.
:::

## 생성
Expand Down Expand Up @@ -72,12 +72,14 @@ spec:
- `metadataPool`
- `failureDomain: <crushType|osd>`
- 기본 값은 `host`입니다.
- `deviceClass: <deviceClass>`
- `replicated`
- `size: <size>`
- `dataPools: []`
- `name: <name>`
- `failureDomain: <crushType|osd>`
- 기본 값은 `host`입니다.
- `deviceClass: <deviceClass>`
- `replicated`
- `size: <size>`
- `metadataServer`
Expand All @@ -88,6 +90,7 @@ spec:
- standby MDS를 standby_replay MDS로 설정할지 여부입니다.
- standby_replay는 warm 캐시를 유지하므로 더 빠른 failover를 제공합니다.
- `resources`
- `limits.memory`설정은 `mds_cache_memory_limit`설정에 반영됩니다.
- `placement`
- `nodeAffinity`
- `podAffinity`
Expand Down
36 changes: 31 additions & 5 deletions docs/mlops/storage/ceph/cluster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ spec:
memory: 2Gi
requests:
memory: 1Gi
osd:
limits:
memory: 4Gi
requests:
memory: 4Gi
prepareosd:
requests:
memory: 50Mi
Expand All @@ -120,6 +115,37 @@ spec:
useAllNodes: false
```
### cephConfig
:::info[Reference]
- [Rook / CephCluster CRD # Ceph Config](https://rook.io/docs/rook/latest-release/CRDs/Cluster/ceph-cluster-crd/#ceph-config)
- [Rook / Configuring Ceph](https://docs.ceph.com/en/reef/rados/configuration/ceph-conf/)
:::
```yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
spec:
cephConfig:
<section>:
<key>: <value>
```
`cephConfig`는 MON이 실행된 후 적용됩니다.

- `<section>`
- `global`, `mon`, `mgr`, `osd`, `mds`, `client` 등
- `osd.<osdID>`, `mon.<monName>` 등 특정 Daemon을 지정할 수 있습니다.
- 옵션이 중복되는 경우 범위가 좁은 것이 적용됩니다. 예를 들어 `global`, `osd`, `osd.1`에 중복 옵션이 있는 경우 `osd.1`이 적용됩니다.

<br />

- `kubectl rook-ceph ceph config dump`: MON 설정 DB를 출력합니다.
- `kubectl rook-ceph ceph config get <section> [<option>]`: MON 설정 DB나 컴파일 시 결정된 기본 값을 출력합니다.
- `kubectl rook-ceph ceph config show <section>`: 실행 중인 데몬의 설정을 출력합니다.

## CephCluster 삭제

:::info[Reference]
Expand Down
47 changes: 32 additions & 15 deletions docs/mlops/storage/ceph/osd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,19 @@ kubectl rook-ceph ceph osd tree

## OSD 추가하기

- https://rook.io/docs/rook/latest/CRDs/Cluster/ceph-cluster-crd
- https://rook.io/docs/rook/v1.12/CRDs/specification/#ceph.rook.io/v1.StorageScopeSpec
:::info[Reference]

- [Rook / CephCluster CRD](https://rook.io/docs/rook/latest/CRDs/Cluster/ceph-cluster-crd)
- [Rook / Speicification # StorageScopeSpec](https://rook.io/docs/rook/latest/CRDs/specification/#ceph.rook.io/v1.StorageScopeSpec)

:::

```yaml
apiVersion: ceph.rook.io/v1
kind: CephCluster
spec:
resources:
osd: {}
placement:
all: {}
osd: {}
Expand All @@ -75,6 +81,17 @@ spec:
useAllDevices: false
```
:::warning
동일한 설정이 있는 경우 범위가 좁은 것이 적용됩니다. 예를 들어 `storage.config`와 `storage.nodes.config`가 있고 해당 장치가 속한 Node에 config가 있는 경우 `storage.nodes.config`가 적용됩니다.

:::

- `resources`
- `osd: {}`
- `osd-<deviceClass>: {}`
- `<deviceClass>`에는 `hdd`, `ssd`, `nvme` 등이 올 수 있습니다.
- 메모리 설정은 자동으로 `osd_memory_target` 설정에 적용됩니다.
- `placement`
- `all`
- `osd`
Expand All @@ -84,26 +101,24 @@ spec:
- `tolerations`
- `topologySpreadConstraints`
- `storage`
- `useAllNodes: <bool>`: 모든 노드에서 장치를 감지할지 여부입니다.
- `nodes: []`
- `name: <nodeName>`
- `resources: {}`: OSD의 resources 설정입니다.
- deviceSelection
- 임베딩 되어있습니다.
- deviceSelection
- 임베딩 되어있습니다.
- nodes.deviceSelection이 우선순위가 더 높습니다.
- `config: <config>`
- 전체 장치에 적용될 설정입니다.
- devices.config가 우선순위가 더 높습니다.
- **deviceSelection**\(임베딩\)
- `storageClassDeviceSets: []`
- `onlyApplyOSDPlacement: <bool>`
- PV가 아닌 장치를 사용하는 경우 `.spec.placement.osd`와 `.spec.placement.all`의 병합 여부입니다.
- PV 장치를 사용하는 경우 `storageClassDeviceSets`에 정의된 placement와 `.spec.placement.all`의 병합 여부입니다.
- `useAllNodes: <bool>`: 모든 노드에서 장치를 감지할지 여부입니다.
- `nodes: []`
- `name: <nodeName>`
- `config: <config>`
- 노드에 있는 모든 장치에 적용될 설정입니다.
- **deviceSelection**\(임베딩\)
- `resources: {}`
- 메모리 설정은 자동으로 `osd_memory_target` 설정에 적용됩니다.

<br />

- deviceSelection
- **deviceSelection**
- `useAllDevices: <bool>`
- `deviceFilter: <deviceRegex>`
- https://pkg.go.dev/regexp/syntax
Expand All @@ -116,5 +131,7 @@ spec:

<br />

- config
- `<config>`
- https://rook.io/docs/rook/latest/CRDs/Cluster/ceph-cluster-crd/#osd-configuration-settings

resources에 memory 설정을 하는 경우 `osd_memory_target` 설정에 반영됩니다. 스토리지만을 위한 Node의 경우 `osd_memory_target_autotune`와 `autotune_memory_target_ratio`을 활용하는 것이 좋습니다.

0 comments on commit 13dce33

Please sign in to comment.