관리 메뉴

Sysops Notepad

ceph osd pool 생성하기 본문

업무/sys

ceph osd pool 생성하기

sysops 2018. 11. 2. 17:15
728x90

1.  pg_num 정보 보기

# ceph pg dump | awk '

BEGIN { IGNORECASE = 1 }

 /^PG_STAT/ { col=1; while($col!="UP") {col++}; col++ }

 /^[0-9a-f]+\.[0-9a-f]+/ { match($0,/^[0-9a-f]+/); pool=substr($0, RSTART, RLENGTH); poollist[pool]=0;

 up=$col; i=0; RSTART=0; RLENGTH=0; delete osds; while(match(up,/[0-9]+/)>0) { osds[++i]=substr(up,RSTART,RLENGTH); up = substr(up, RSTART+RLENGTH) }

 for(i in osds) {array[osds[i],pool]++; osdlist[osds[i]];}

}

END {

 printf("\n");

 printf("pool :\t"); for (i in poollist) printf("%s\t",i); printf("| SUM \n");

 for (i in poollist) printf("--------"); printf("----------------\n");

 for (i in osdlist) { printf("osd.%i\t", i); sum=0;

   for (j in poollist) { printf("%i\t", array[i,j]); sum+=array[i,j]; sumpool[j]+=array[i,j] }; printf("| %i\n",sum) }

 for (i in poollist) printf("--------"); printf("----------------\n");

 printf("SUM :\t"); for (i in poollist) printf("%s\t",sumpool[i]); printf("|\n");

}'



2. osd pool 생성/삭제 하기

# ceph osd pool create <my-new-pool> <pg_num>

# rados cppool <my-old-pool> <my-new-pool>

# ceph osd pool delete <my-old-pool>

# ceph osd pool rename <my-new-pool> <my-old-pool>



3. 상태 정보 보기

# ceph -s

# ceph df detail

# ceph health



pool has many more objects per pg than average error 

728x90
Comments