|
|
| (41 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt) |
| Zeile 1: |
Zeile 1: |
| =Aufbau=
| | *[[CEPH Einführung]] |
| ==Storage-Node==
| | *[[CEPH Grundlagen]] |
| *omar
| | *[[CEPH Manuell]] |
| *nelson
| | *[[CEPH Promox Schaubild]] |
| *bay
| | *[[CEPH Promox]] |
| ==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
| |
| <pre>
| |
| #!/bin/bash
| |
| echo localhost
| |
| $*
| |
| LIST="bay omar nelson"
| |
| for k in $LIST
| |
| do
| |
| echo $k
| |
| ssh k $*
| |
| done
| |
| </pre>
| |
| ===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
| |
| *root-all-nodes 'echo "cephadmin ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ceph'
| |
| *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
| |
| | |
| =Links=
| |
| *http://docs.ceph.com/docs/master/start/ | |
| *https://linoxide.com/ubuntu-how-to/create-ceph-cluster-ubuntu-16-04/ | |
| *https://www.howtoforge.com/tutorial/how-to-install-a-ceph-cluster-on-ubuntu-16-04/ | |
| *https://www.howtoforge.com/tutorial/how-to-mount-cephfs-on-centos-7/ | |
| *http://www.admin-magazin.de/Das-Heft/2014/04/Die-verteilten-Speichersysteme-GlusterFS-und-Ceph-im-Vergleich/(offset)/12 | |