Crm: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 114: | Zeile 114: | ||
ERROR: error: unpack_location_tags: Constraint 'cli-prefer-drbd_res': Invalid reference to 'drbd_res' | ERROR: error: unpack_location_tags: Constraint 'cli-prefer-drbd_res': Invalid reference to 'drbd_res' | ||
Errors found during check: config not valid | Errors found during check: config not valid | ||
+ | </source> | ||
+ | |||
+ | =corosync= | ||
+ | ==show== | ||
+ | *zeigt die corosync-Konfiguration an | ||
+ | <source lang=bash> | ||
+ | totem { | ||
+ | version: 2 | ||
+ | cluster_name: debian | ||
+ | secauth: off | ||
+ | transport:udpu | ||
+ | interface { | ||
+ | ringnumber: 0 | ||
+ | bindnetaddr: 10.144.144.0 | ||
+ | broadcast: yes | ||
+ | mcastport: 5405 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | nodelist { | ||
+ | node { | ||
+ | ring0_addr: 10.144.144.2 | ||
+ | name: tic | ||
+ | nodeid: 1 | ||
+ | |||
+ | } | ||
+ | node { | ||
+ | ring0_addr: 10.144.144.1 | ||
+ | name: tuc | ||
+ | nodeid: 2 | ||
+ | } | ||
+ | } | ||
+ | |||
+ | quorum { | ||
+ | provider: corosync_votequorum | ||
+ | two_node: 1 | ||
+ | wait_for_all: 1 | ||
+ | last_man_standing: 1 | ||
+ | auto_tie_breaker: 0 | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | ==edit== | ||
+ | *öffnet die Datei, die sich mit "show" anzeigen lässt, in vi | ||
+ | |||
+ | ==status== | ||
+ | *zeigt den status von corosync an | ||
+ | <source lang=bash> | ||
+ | crm(live)corosync# status | ||
+ | Printing ring status. | ||
+ | Local node ID 1 | ||
+ | RING ID 0 | ||
+ | id = 10.144.144.2 | ||
+ | status = ring 0 active with no faults | ||
+ | Quorum information | ||
+ | ------------------ | ||
+ | Date: Thu Oct 20 14:58:41 2016 | ||
+ | Quorum provider: corosync_votequorum | ||
+ | Nodes: 2 | ||
+ | Node ID: 1 | ||
+ | Ring ID: 64 | ||
+ | Quorate: Yes | ||
+ | |||
+ | Votequorum information | ||
+ | ---------------------- | ||
+ | Expected votes: 2 | ||
+ | Highest expected: 2 | ||
+ | Total votes: 2 | ||
+ | Quorum: 1 | ||
+ | Flags: 2Node Quorate WaitForAll LastManStanding | ||
+ | |||
+ | Membership information | ||
+ | ---------------------- | ||
+ | Nodeid Votes Name | ||
+ | 2 1 10.144.144.1 | ||
+ | 1 1 10.144.144.2 (local) | ||
</source> | </source> |
Version vom 20. Oktober 2016, 12:59 Uhr
configure
show
Anzeigen der Konfiguration
root@worf:~# crm configure show
node 1: worf
node 2: kurn
primitive res-ip IPaddr2 \
params ip=192.168.255.100 nic=eth0 \
op monitor interval=10
primitive res-ipsec lsb:ipsec \
op monitor interval=30s
primitive res-iptables lsb:iptables \
op monitor interval=30s
primitive res-pppoe lsb:pppoe \
op monitor interval=30s
group gr-vpn-gw res-pppoe res-ip res-iptables res-ipsec \
meta target-role=Started
location cli-prefer-gr-vpn-gw gr-vpn-gw role=Started inf: worf
property cib-bootstrap-options: \
have-watchdog=false \
dc-version=1.1.14-70404b0 \
cluster-infrastructure=corosync \
cluster-name=debian \
stonith-enabled=false \
no-quorum-policy=ignore
save
Sichern der Konfiguration in eine Datei
root@worf:~# crm configure save vpn-gw.conf
load
Sichern der Konfiguration in eine Datei
root@worf:~# crm configure load update vpn-gw.conf
root@worf:~# crm configure load replace vpn-gw.conf
edit
Interaktiver Modus
root@worf:~# crm configure edit
comit
- Änderungen übernehmen
crm(live)# configure comit
INFO: apparently there is nothing to commit
INFO: try changing something first
monitor
- monitor resourcen-namen (intervall der checks in minuten):(timeout des monitor befehls)
monitor fs_res 6:10
delete
- löschen einer resource
crm(live)# configure delete <res-apache2>
INFO: hanging location:cli-prefer-res-apache2 deleted
INFO: constraint colocation:fs_drbd_colo updated
erase
- erase kann die nodes aus der Konfiguration löschen
crm(live)# configure erase nodes
node
- node hinzufügen
crm(live)# configure node 1: tic
rename
- umbenen eines cib objects
crm(live)configure# rename virtual-ip virtual-ipv4
INFO: modified colocation:fs_drbd_colo from virtual-ip to virtual-ipv4
validate_all
- überprüfen eines cib objects
crm(live)configure# validate_all virtual-ipv4
INFO: Using calculated netmask for 192.168.244.80: 255.255.248.0
rctest
- testet die resource auf beiden seiten
parallax ssh muss installiern sein
https://github.com/krig/parallax
rsctest virtual-ip-2
Probing resources .Warning: could not find an executable path for askpass because
Parallax SSH was not installed correctly. Password prompts will not
work.
testing on tic: virtual-ip-2
testing on tuc: virtual-ip-2
verify
- Überprüft die Konfiguration auf Fehler (bei korrekter Konfiguraton erscheint keine Meldung)
crm(live)configure# verify
ERROR: error: unpack_location_tags: Constraint 'cli-prefer-drbd_res': Invalid reference to 'drbd_res'
Errors found during check: config not valid
corosync
show
- zeigt die corosync-Konfiguration an
totem {
version: 2
cluster_name: debian
secauth: off
transport:udpu
interface {
ringnumber: 0
bindnetaddr: 10.144.144.0
broadcast: yes
mcastport: 5405
}
}
nodelist {
node {
ring0_addr: 10.144.144.2
name: tic
nodeid: 1
}
node {
ring0_addr: 10.144.144.1
name: tuc
nodeid: 2
}
}
quorum {
provider: corosync_votequorum
two_node: 1
wait_for_all: 1
last_man_standing: 1
auto_tie_breaker: 0
}
edit
- öffnet die Datei, die sich mit "show" anzeigen lässt, in vi
status
- zeigt den status von corosync an
crm(live)corosync# status
Printing ring status.
Local node ID 1
RING ID 0
id = 10.144.144.2
status = ring 0 active with no faults
Quorum information
------------------
Date: Thu Oct 20 14:58:41 2016
Quorum provider: corosync_votequorum
Nodes: 2
Node ID: 1
Ring ID: 64
Quorate: Yes
Votequorum information
----------------------
Expected votes: 2
Highest expected: 2
Total votes: 2
Quorum: 1
Flags: 2Node Quorate WaitForAll LastManStanding
Membership information
----------------------
Nodeid Votes Name
2 1 10.144.144.1
1 1 10.144.144.2 (local)