CEPH: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) (→Links) |
Thomas (Diskussion | Beiträge) |
||
Zeile 85: | Zeile 85: | ||
=Installieren eines MDS auf bay= | =Installieren eines MDS auf bay= | ||
*cephadmin@kekistan:~/my-first-ceph-cluster$ ceph-deploy mds create bay | *cephadmin@kekistan:~/my-first-ceph-cluster$ ceph-deploy mds create bay | ||
+ | |||
+ | =Auf Bay= | ||
+ | =Als root= | ||
+ | *chmod +r /etc/ceph/ceph.client.admin.keyring | ||
+ | =Als cephadmin= | ||
+ | *ceph osd pool create cephfs_data 128 | ||
+ | * ceph osd pool create cephfs_metadata 128 | ||
+ | *ceph fs new cephfs cephfs_metadata cephfs_data | ||
+ | *ceph fs ls | ||
+ | * ceph mds stat | ||
=Links= | =Links= |
Version vom 18. Mai 2017, 19:49 Uhr
Aufbau
Storage-Node
- omar
- nelson
- bay
Admin-Node
- kekistan
Vorbreitung
Installation von ssh und ntp
Auf allen Nodes
- sudo apt -y install ntp ssh
- wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
- echo deb http://download.ceph.com/debian-luminous/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list
- apt-get update
ssh-key auf allen nodes
ssh-keygen
- root@kekistand:~# ssh-keygen
ssh-copy-id
- root@kekistand:~# ssh-copy-id nelson
- root@kekistand:~# ssh-copy-id bay
- root@kekistand:~# ssh-copy-id omar
Hilfskript
- cat /usr/local/sbin/root-all-nodes
#!/bin/bash echo localhost $* LIST="bay omar nelson" for k in $LIST do echo $k ssh k $* done
Anlegen des Users cephadmin und keyhandling
- root-all-nodes useradd -s /bin/bash -m cephadmin
- sudo -u cephadmin ssh-keygen -q
- root-all-nodes mkdir /home/cephadmin/.ssh
- root-all-nodes chown cephadmin.cephadmin /home/cephadmin/.ssh
- root-all-nodes chmod 700 /home/cephadmin/.ssh
- scp /home/cephadmin/.ssh/id_rsa.pub /tmp
- scp /home/cephadmin/.ssh/id_rsa.pub bay:/tmp
- scp /home/cephadmin/.ssh/id_rsa.pub nelson:/tmp
- scp /home/cephadmin/.ssh/id_rsa.pub omar:/tmp
- root-all-nodes cat /tmp/id_rsa.pub > /home/cephadmin/.ssh/authorized_keys"
Install
- apt install ceph-deploy
- su - cephadmin
- mkdir my-first-ceph-cluster
- cd my-first-ceph-cluster
- ceph-deploy new bay nelson omar
- echo "public network 10.0.0.0/8 >> ceph.conf
- echo "osd pool default size = 2" >> ceph.conf
- ceph-deploy install kekistan bay nelson omar
- ceph-deploy mon create-initial
Vorbereiten der Storages
- ceph-deploy osd prepare bay:/dev/vdb
- ceph-deploy osd prepare nelson:/dev/vda
- ceph-deploy osd prepare omar:/dev/sdb
Aktivieren der Storages
- ceph-deploy osd activate bay:/dev/vdb1
- ceph-deploy osd activate nelson:/dev/vda1
- ceph-deploy osd activate omar:/dev/sdb1
Kopieren der Admin-keyrings
- sudo chmod 644 /etc/ceph/ceph.client.admin.keyring
- ceph-deploy admin kekistan bay nelson oma
Status check
- ceph osd tree
ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY -1 1.44955 root default -2 0.48318 host bay 0 0.48318 osd.0 up 1.00000 1.00000 -3 0.48318 host nelson 1 0.48318 osd.1 up 1.00000 1.00000 -4 0.48318 host omar 2 0.48318 osd.2 up 1.00000 1.00000
- ceph health
HEALTH_OK
Installieren eines MDS auf bay
- cephadmin@kekistan:~/my-first-ceph-cluster$ ceph-deploy mds create bay
Auf Bay
Als root
- chmod +r /etc/ceph/ceph.client.admin.keyring
Als cephadmin
*ceph osd pool create cephfs_data 128 * ceph osd pool create cephfs_metadata 128 *ceph fs new cephfs cephfs_metadata cephfs_data *ceph fs ls * ceph mds stat