Pcsd: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
Zeile 33: Zeile 33:
  
 
*root@adin:~# pcs cluster start --all
 
*root@adin:~# pcs cluster start --all
 +
 +
=Die Installation verifizieren=
 +
*root@adin:~# corosync-cfgtool -s
 +
<source lang=bash>
 +
Printing ring status.
 +
Local node ID 1
 +
RING ID 0
 +
id = 192.168.50.51
 +
status = ring 0 active with no faults
 +
</source>
 +
 +
*root@adin:~# corosync-cmapctl  | grep members
 +
<source lang=bash>
 +
runtime.totem.pg.mrp.srp.members.1.config_version (u64) = 0
 +
runtime.totem.pg.mrp.srp.members.1.ip (str) = r(0) ip(192.168.50.51)
 +
runtime.totem.pg.mrp.srp.members.1.join_count (u32) = 1
 +
runtime.totem.pg.mrp.srp.members.1.status (str) = joined
 +
runtime.totem.pg.mrp.srp.members.2.config_version (u64) = 0
 +
runtime.totem.pg.mrp.srp.members.2.ip (str) = r(0) ip(192.168.50.52)
 +
runtime.totem.pg.mrp.srp.members.2.join_count (u32) = 1
 +
runtime.totem.pg.mrp.srp.members.2.status (str) = joined
 +
</source>
  
 
=pcs hilfe anzeigen=
 
=pcs hilfe anzeigen=

Version vom 26. Oktober 2016, 07:53 Uhr

ubuntu 16.04

  • apt-get update
  • apt-get uograde
  • apt-get install pacemaker corosync pcs
  • gem install orderedhash
  • sed -i.bak -e "/Host.*=>/s/::/*/" -e "/BindAddress.*=>/s/::/nil/" /usr/share/pcsd/ssl.rb
  • /usr/lib/python2.7/dist-packages/pcs/cluster.py

Zeile 1699

 os.system("find /var/lib -path '/var/lib/lxcfs' -prune -o -name '"+name+"' -exec rm -f \{\} \;") [Unbedingt das Leerzeichen mit kopieren]
                 #os.system("find /var/lib -name '"+name+"' -exec rm -f \{\} \;")
  • mkdir -p 777 /var/log/cluster


  • systemctl enable pcsd
  • root@adin:~# passwd hacluster
  • root@keks:~# passwd hacluster


root@adin:~# pcs cluster auth adin keks
Username: hacluster
Password: 
keks: Authorized
adin: Authorized
  • root@adin:~# pcs cluster setup --name mycluster adin keks --force
  • root@adin:~# pcs cluster start --all

Die Installation verifizieren

  • root@adin:~# corosync-cfgtool -s
Printing ring status.
Local node ID 1
RING ID 0
	id	= 192.168.50.51
	status	= ring 0 active with no faults
  • root@adin:~# corosync-cmapctl | grep members
runtime.totem.pg.mrp.srp.members.1.config_version (u64) = 0
runtime.totem.pg.mrp.srp.members.1.ip (str) = r(0) ip(192.168.50.51) 
runtime.totem.pg.mrp.srp.members.1.join_count (u32) = 1
runtime.totem.pg.mrp.srp.members.1.status (str) = joined
runtime.totem.pg.mrp.srp.members.2.config_version (u64) = 0
runtime.totem.pg.mrp.srp.members.2.ip (str) = r(0) ip(192.168.50.52) 
runtime.totem.pg.mrp.srp.members.2.join_count (u32) = 1
runtime.totem.pg.mrp.srp.members.2.status (str) = joined

pcs hilfe anzeigen

  • root@adin:~# pcs
Usage: pcs [-f file] [-h] [commands]...
Control and configure pacemaker and corosync.

Options:
    -h, --help  Display usage and exit
    -f file     Perform actions on file instead of active CIB
    --debug     Print all network traffic and external commands run
    --version   Print pcs version information

Commands:
    cluster     Configure cluster options and nodes
    resource    Manage cluster resources
    stonith     Configure fence devices
    constraint  Set resource constraints
    property    Set pacemaker properties
    acl         Set pacemaker access control lists
    status      View cluster status
    config      View and manage cluster configuration
    pcsd        Manage pcs daemon
    node        Manage cluster nodes
  • root@adin:~# pcs status help
Usage: pcs status [commands]...
View current cluster and resource status
Commands:
    [status] [--full | --hide-inactive]
        View all information about the cluster and resources (--full provides
        more details, --hide-inactive hides inactive resources)

    resources
        View current status of cluster resources

    groups
        View currently configured groups and their resources

    cluster
        View current cluster status

    corosync
        View current membership information as seen by corosync

    nodes [corosync|both|config]
        View current status of nodes from pacemaker. If 'corosync' is
        specified, print nodes currently configured in corosync, if 'both'
        is specified, print nodes from both corosync & pacemaker.  If 'config'
        is specified, print nodes from corosync & pacemaker configuration.

    pcsd [<node>] ...
        Show the current status of pcsd on the specified nodes.
        When no nodes are specified, status of all nodes is displayed.

    xml
        View xml version of status (output from crm_mon -r -1 -X)

Links