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:42] – beu | kb:linux:donnees:single_node_ceph [2018/01/10 15:03] (Version actuelle) – beu | ||
---|---|---|---|
Ligne 35: | Ligne 35: | ||
</ | </ | ||
- | On ajoute ces deux lignes dans le fichier **ceph.conf** | + | On installe |
< | < | ||
- | osd pool default size = 2 | + | # ceph-deploy install --release luminous st01 |
- | osd crush chooseleaf type = 0 | + | |
</ | </ | ||
- | Default pool size is how many replicas of our data we want (2). The chooseleaf setting is required to tell ceph we are only a single node and that it’s OK to store the same copy of data on the same physical node. Normally for safety, ceph distributes the copies and won’t leave all your eggs in the same basket (server). | + | Puis on le configure en monitor: |
< | < | ||
- | ceph-deploy | + | # ceph-deploy |
+ | </ | ||
+ | |||
+ | ainsi que le manager : | ||
+ | |||
+ | < | ||
+ | # ceph-deploy mgr create | ||
+ | </ | ||
+ | |||
+ | 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.1515530563.txt.gz · Dernière modification : de beu