Last active
March 5, 2019 14:16
-
-
Save jclaret/b9a76db27796beb71c25245b67773bee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pcs resource | |
pcs resource --help | |
pcs resource list | |
pcs resource describe Filesystem | |
pcs resource create myfs Filesystem device=/dev/vg_cluster/lv_cluster_data01 directory=/data fstype=xfs options=ro --group mygroup | |
pcs resource show | |
pcs resource show myfs | |
pcs resource update myfs directory=/data | |
pcs resource delete myfs | |
pcs resource create webip IPaddr2 ip=192.1.1.1 cidr_netmask=24 --group myweb | |
pcs resource create webfs Filesystem \ | |
> device=nfs_server:/exports/www \ | |
> directory=/var/www \ | |
> fstype=nfs \ | |
> options=ro \ | |
> --group myweb | |
pcs resource create webserver apache \ | |
> configfile="/etc/httpd/conf/httpd.conf" \ | |
> statusurl="http://127.0.0.1/server-status" --group myweb | |
pcs resource create webserver apache \ | |
> configfile="/etc/httpd/conf/httpd.conf" \ | |
> statusurl="http://127.0.0.1/server-status" --group myweb \ | |
> op monitor interval=20s timeout=30s | |
To influence the ordering, the options --before resourceid and | |
--after resourceid can be added to pcs resource create and pcs resource group add | |
to influence the ordering in which resources will be started. | |
pcs resource op remove webserver monitor | |
pcs resource op add webserver monitor interval=10s timeout=15s on-fail=fence | |
pcs resource group add mygroup myresource | |
pcs resource group remove mygroup myresource | |
pcs resource failcount show | |
APACHE | |
====== | |
yum -y install httpd | |
setsebool -P httpd_use_nfs 1 | |
pcs resource create firstwebip IPaddr2 \ | |
> ip=192.168.1.204 \ | |
> cidr_netmask=24 \ | |
> --group=firstweb | |
pcs resource create firstwebfs Filesystem device=/dev/vg_cluster/lv_cluster_data01 directory=/data fstype=xfs options=ro --group firstweb | |
pcs resource create firstwebserver apache --group=firstweb | |
firewall-cmd --permanent --add-service=http | |
firewall-cmd --reload | |
sudo yum -y install elinks | |
elinks -dump http://192.168.1.204 | |
pcs status | |
firewall-cmd --remove-service=high-availability | |
pcs resource disable firstweb | |
pcs resource enable firstweb | |
pcs resource ban firstweb clu01.local.net | |
pcs status | |
pcs resource move firstweb clu01.local.net | |
pcs resource move firstweb | |
pcs constraint list | |
pcs resource clear firstweb | |
pcs resource clear firstweb clu01.local.net | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment