kb:linux:donnees:single_node_ceph
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| kb:linux:donnees:single_node_ceph [2018/01/09 19:28] – créée beu | kb:linux:donnees:single_node_ceph [2018/01/10 15:03] (Version actuelle) – beu | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ======Single Node CEPH====== | ======Single Node CEPH====== | ||
| + | |||
| + | Nécessite une bonne configuration du nom d' | ||
| + | |||
| + | On va commencer par créer la clé SSH pour le compte root. | ||
| < | < | ||
| - | # wget -q -O- ' | + | # ssh-keygen && cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys |
| </ | </ | ||
| + | |||
| + | |||
| + | Ajout du dépôt ceph | ||
| < | < | ||
| + | # wget -q -O- ' | ||
| # echo deb http:// | # echo deb http:// | ||
| </ | </ | ||
| + | |||
| + | Puis on installe l' | ||
| + | |||
| + | < | ||
| + | # apt update && apt install ceph-deploy | ||
| + | </ | ||
| + | |||
| + | Et créer un dossier de cluster, qui stoquera les informations du cluster. | ||
| + | |||
| + | < | ||
| + | # mkdir CLUSTER-DIR && cd CLUSTER-DIR | ||
| + | </ | ||
| + | |||
| + | On créer le cluster: | ||
| + | |||
| + | < | ||
| + | # ceph-deploy new st01: | ||
| + | </ | ||
| + | |||
| + | On installe ceph sur le dit noeud | ||
| + | |||
| + | < | ||
| + | # ceph-deploy install --release luminous st01 | ||
| + | </ | ||
| + | |||
| + | Puis on le configure en monitor: | ||
| + | |||
| + | < | ||
| + | # ceph-deploy mon create-initial | ||
| + | </ | ||
| + | |||
| + | ainsi que le manager : | ||
| + | |||
| + | < | ||
| + | # ceph-deploy mgr create st01 | ||
| + | </ | ||
| + | |||
| + | puis on y prépare les disques : | ||
| + | |||
| + | < | ||
| + | # ceph-deploy osd prepare --bluestore st01:/ | ||
| + | </ | ||
| + | |||
| + | puis on les activent : | ||
| + | |||
| + | < | ||
| + | # ceph-deploy osd activate st01:/ | ||
| + | </ | ||
| + | |||
| + | Puis on créer un pool de stockage : | ||
| + | |||
| + | < | ||
| + | # ceph osd pool create NOMDUPOOL PGNUM | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # ceph osd pool set NOMDUPOOL size 2 | ||
| + | # ceph osd pool set NOMDUPOOL min_size 1 | ||
| + | </ | ||
| + | |||
| + | On va ensuite définir où la répartition doit s' | ||
| + | |||
| + | < | ||
| + | # ceph osd getcrushmap -o crush_map_compressed | ||
| + | # crushtool -d crush_map_compressed -o crush_map_decompressed | ||
| + | </ | ||
| + | |||
| + | Puis modifier la ligne : | ||
| + | |||
| + | step chooseleaf firstn 0 type host | ||
| + | |||
| + | en | ||
| + | |||
| + | step chooseleaf firstn 0 type osd | ||
| + | | ||
| + | Puis il vous suffira de la re-injecter dans ceph: | ||
| + | |||
| + | < | ||
| + | # crushtool -c crush_map_decompressed -o new_crush_map_compressed | ||
| + | # ceph osd setcrushmap -i new_crush_map_compressed | ||
| + | </ | ||
| + | |||
| + | |||
kb/linux/donnees/single_node_ceph.1515526116.txt.gz · Dernière modification : de beu
