kb:linux:donnees:single_node_ceph
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
kb:linux:donnees:single_node_ceph [2018/01/09 20:13] – beu | kb:linux:donnees:single_node_ceph [2018/01/10 15:03] (Version actuelle) – beu | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Nécessite une bonne configuration du nom d' | 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 | # apt update && apt install ceph-deploy | ||
</ | </ | ||
+ | |||
+ | Et créer un dossier de cluster, qui stoquera les informations du cluster. | ||
< | < | ||
- | # ssh-keygen | + | # mkdir CLUSTER-DIR && |
</ | </ | ||
+ | |||
+ | On créer le cluster: | ||
< | < | ||
- | # mkdir CLUSTER-DIR && cd CLUSTER-DIR | + | # ceph-deploy new st01: |
</ | </ | ||
+ | |||
+ | On installe ceph sur le dit noeud | ||
< | < | ||
- | # ceph-deploy | + | # ceph-deploy |
</ | </ | ||
+ | |||
+ | Puis on le configure en monitor: | ||
< | < | ||
- | osd pool default size = 2 | + | # ceph-deploy mon create-initial |
- | osd crush chooseleaf type = 0 | + | |
</ | </ | ||
- | Default | + | 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 | ||
+ | # 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: | ||
< | < | ||
- | ceph-deploy install | + | # crushtool |
+ | # ceph osd setcrushmap | ||
</ | </ | ||
kb/linux/donnees/single_node_ceph.1515528814.txt.gz · Dernière modification : de beu