'데이터 엔지니어'로 성장하기

정리하는 걸 좋아하고, 남이 읽으면 더 좋아함

Storage/Ceph

Ceph) 기타 설정_memory, mgr replication, osd 지정

MightyTedKim 2022. 12. 23. 08:10
728x90
반응형

1. OSD memory 설정

OSD pod의 memory request값과 limit값을 설정하는 방법

request: pod생성시 메모리 최소 필요량
limit: 메모리가 해당 값 도달시 pod 재시작

cluster.yaml 수정

[manager@master:rook/deploy/examples]$ vi cluster.yaml

osd:
  limits:
    cpu: "1000m" 
    memory: "3Gi" 
  requests:
    cpu: "500m" 
    memory: "1025Mi" 
 

2. MGR Replication 설정

MGR의 Deployments 자체를 2개 생성하는 방법이므로
Replicaset의 replica factor를 2로 설정하는 방법과 비교 테스트 후 운영 서버 적용 필요

cluster.yaml 수정

[manager@master:rook/deploy/examples]$ vi cluster.yaml

 mgr:
   # When higher availability of the mgr is needed, increase the count to 2.
   # In that case, one mgr will be active and one in standby. When Ceph updates which
   # mgr is active, Rook will update the mgr services to match the active mgr.
   count: 2
 

3. Storage 수동 설정

자동으로 사용가능한 Disk를 OSD로 생성해주는 방법 대신
OSD로 사용할 Disk를 직접 지정하는 방식

cluster.yaml 수정

[manager@master:rook/deploy/examples]$ vi cluster.yaml

 storage: # cluster level storage configuration and selection
   #useAllNodes 및 useAllDevices값을 false로 수정한다.
   useAllNodes: false
   useAllDevices: false
   #deviceFilter:
   config:
     # crushRoot: "custom-root" # specify a non-default root label for the CRUSH map
    # metadataDevice: "md0" # specify a non-rotational storage so ceph-volume will use it as block db device of bluestore.
    # databaseSizeMB: "1024" # uncomment if the disks are smaller than 100 GB
    # journalSizeMB: "1024"  # uncomment if the disks are 20 GB or smaller
    # osdsPerDevice: "1" # this value can be overridden at the node or device level
    # encryptedDevice: "true" # the default value for this option is "false" 
Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named
nodes below will be used as storage resources.  Each node's 'name' field should match their 'kubernetes.io/hostname' label.
    # 아래에 지정할 node 및 device명을 입력한다.
   nodes:
   - name: "k8s02" 
     devices:
     - name: "xvdb" 
     - name: "xvdc" 
   - name: "k8s03" 
     devices:
     - name: "xvdb" 
     - name: "xvdc" 
     - name: "xvde" 
     - name: "xvdf" 
     - name: "xvdg" 
   - name: "k8s04" 
     devices:
     - name: "xvdb" 

 

 

 

 

728x90
반응형