[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] dlm-pcmk-3.0.17-1.fc14.x86_64 and gfs-pcmk-3.0.17-1.fc14.x86_64 woes



On 03/10/2011 01:14 AM, Andrew Beekhof wrote:
On Wed, Mar 9, 2011 at 7:03 PM, Gregory Bartholomew
<gregory lee bartholomew gmail com>  wrote:
Never mind, I figured it out ... I needed to install the gfs2-cluster
package and start its service and I also had a different name for my cluster
in /etc/cluster/cluster.conf than what I was using in my mkfs.gfs2 command.

It's all working now.  Thanks to those who helped me get this going,

So you're still using Pacemaker to mount/unmount the filesystem and
other services?
If so, were there any discrepancies in the documentation describing
how to configure this?

Good morning,

This is what I did to get the file system going:

-----

yum install -y httpd gfs2-cluster gfs2-utils
chkconfig gfs2-cluster on
service gfs2-cluster start

mkfs.gfs2 -p lock_dlm -j 2 -t siue-cs:iscsi /dev/sda1

cat <<-END | crm
configure primitive gfs ocf:heartbeat:Filesystem params device="/dev/sda1" directory="/var/www/html" fstype="gfs2" op start interval="0" timeout="60s" op stop interval="0" timeout="60s"
configure clone dual-gfs gfs
END

-----

I think this sed command was also missing from the guide:

sed -i '/^#<Location \/server-status>/,/#<\/Location>/{s/^#//;s/Allow from .example.com/Allow from 127.0.0.1/}' /etc/httpd/conf/httpd.conf

I've attached the full record of all the commands that I used to set up my nodes to this email. It has, at the end, the final result of "crm configure show".

gb
----- PRE-CONFIGURATION

sed -i 's/timeout=0/timeout=3/' /boot/grub/grub.conf
sed -i '/^#\|splashimage\|hiddenmenu/d' /boot/grub/grub.conf
sed -i 's/ rhgb quiet//' /boot/grub/grub.conf
sed -i '/^\s\+kernel/s|$| selinux=0 audit=0|' /boot/grub/grub.conf

sed -i '/^::/d' /etc/hosts
sed -i 's/ localhost4.*//' /etc/hosts
sed -i 's/\s\+/ /' /etc/hosts

cat <<-END >> /etc/hosts
146.163.150.56 eb2024-56.cs.siue.edu eb2024-56
146.163.150.57 eb2024-57.cs.siue.edu eb2024-57
146.163.150.58 eb2024-58.cs.siue.edu eb2024-58
146.163.150.59 eb2024-59.cs.siue.edu eb2024-59
END

sed -i 's/^NM_CONTROLLED="yes"/NM_CONTROLLED="no"/' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
sed -i 's/^ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty1/' /etc/sysconfig/init
sed -i 's/^exec \/sbin\/mingetty /exec \/sbin\/mingetty --noclear --autologin root /' /etc/init/tty.conf

cat <<-END > /etc/modprobe.d/ipv6.conf
install ipv6 /bin/true
END

cat <<-END >> /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT="no"
IPV6_AUTOCONF="no"
END

cat <<-END >> /etc/sysconfig/network-scripts/ifcfg-lo
IPV6INIT="no"
IPV6_AUTOCONF="no"
END

cat <<-END >> /etc/sysconfig/network
NOZEROCONF=1
END

chkconfig ip6tables off
chkconfig auditd off
chkconfig network on

sed -i 's/ -m tcp -p tcp --dport 22/ -s 146.163.150.0\/24/' /etc/sysconfig/iptables

----- DO: REBOOT

yum -y install ntp ntpdate
ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
ntpdate ntp.siue.edu
hwclock --utc --systohc

sed -i '/^restrict -6/d' /etc/ntp.conf
sed -i '/^server/d' /etc/ntp.conf

cat <<-END >> /etc/ntp.conf
server ntp.siue.edu
END

chkconfig ntpd on
service ntpd start

----- ISCSI

yum -y install iscsi-initiator-utils

iscsiadm -m discovery -t st -p eb2024-56.cs.siue.edu
iscsiadm -m node
iscsiadm -m node --targetname "iqn.2011-03.edu.siue.cs:eb2024-56.1" --portal "146.163.150.56:3260" --login

----- DO: SHUTDOWN, BACKUP, STARTUP

yum -y install openssh-clients

ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ""
cp .ssh/id_dsa.pub .ssh/authorized_keys
scp -r .ssh eb2024-59.cs.siue.edu:~

----- CLUSTER MANAGER

yum install -y cman pacemaker corosync

export ais_port=4000
export ais_mcast=239.255.0.0
export ais_addr=`ip addr | grep "inet " | tail -n 1 | awk '{print $4}' | sed s/255/0/`

cp /etc/corosync/corosync.conf.example /etc/corosync/corosync.conf
sed -i.bak "s/mcastaddr:.*/mcastaddr:\ $ais_mcast/g" /etc/corosync/corosync.conf
sed -i.bak "s/mcastport:.*/mcastport:\ $ais_port/g" /etc/corosync/corosync.conf
sed -i.bak "s/bindnetaddr:.*/bindnetaddr:\ $ais_addr/g" /etc/corosync/corosync.conf

cat <<-END >> /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="1" name="siue-cs">
  <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
  <clusternodes>
    <clusternode name="eb2024-58.cs.siue.edu" nodeid="1">
      <fence/>
    </clusternode>
    <clusternode name="eb2024-59.cs.siue.edu" nodeid="2">
      <fence/>
    </clusternode>
  </clusternodes>
  <cman/>
  <fencedevices/>
  <rm/>
</cluster>
END

chkconfig cman on
service cman start
chkconfig pacemaker on
service pacemaker start

cat <<-END | crm
configure property stonith-enabled="false"
configure property no-quorum-policy="ignore"
configure rsc_defaults resource-stickiness="100"
END

----- GFS

yum install -y httpd gfs2-cluster gfs2-utils
chkconfig gfs2-cluster on
service gfs2-cluster start

mkfs.gfs2 -p lock_dlm -j 2 -t siue-cs:iscsi /dev/sda1

cat <<-END | crm
configure primitive gfs ocf:heartbeat:Filesystem params device="/dev/sda1" directory="/var/www/html" fstype="gfs2" op start interval="0" timeout="60s" op stop interval="0" timeout="60s"
configure clone dual-gfs gfs
END

----- IP

cat <<-END | crm
configure primitive ip ocf:heartbeat:IPaddr2 params ip="146.163.150.57" cidr_netmask="32" clusterip_hash="sourceip" op monitor interval="30s"
configure clone dual-ip ip meta globally-unique="true" clone-max="2" clone-node-max="2"
END

----- APACHE

yum install -y wget

cat <<-END > /var/www/html/index.html
<html>
<body>My Test Site - GFS2</body>
</html>
END

sed -i '/^#<Location \/server-status>/,/#<\/Location>/{s/^#//;s/Allow from .example.com/Allow from 127.0.0.1/}' /etc/httpd/conf/httpd.conf

cat <<-END | crm
configure primitive apache ocf:heartbeat:apache params configfile="/etc/httpd/conf/httpd.conf" op start interval="0" timeout="40s" op stop interval="0" timeout="60s" op monitor interval="1min"
configure clone dual-apache apache
configure colocation apache-gfs inf: dual-apache dual-gfs
configure colocation apache-ip inf: dual-apache dual-ip
configure order gfs-apache inf: dual-gfs dual-apache
configure order ip-apache inf: dual-ip dual-apache
END

-----

cat <<-END | crm
configure primitive stonith stonith:null params hostlist="eb2024-58.cs.siue.edu eb2024-59.cs.siue.edu"
configure clone dual-stonith stonith
configure property stonith-enabled="true"
END

-----

node eb2024-58.cs.siue.edu
node eb2024-59.cs.siue.edu
primitive apache ocf:heartbeat:apache \
	params configfile="/etc/httpd/conf/httpd.conf" \
	op start interval="0" timeout="40s" \
	op stop interval="0" timeout="60s" \
	op monitor interval="1min"
primitive gfs ocf:heartbeat:Filesystem \
	params device="/dev/sda1" directory="/var/www/html" fstype="gfs2" \
	op start interval="0" timeout="60s" \
	op stop interval="0" timeout="60s"
primitive ip ocf:heartbeat:IPaddr2 \
	params ip="146.163.150.57" cidr_netmask="32" clusterip_hash="sourceip" \
	op monitor interval="30s"
primitive stonith stonith:null \
	params hostlist="eb2024-58.cs.siue.edu eb2024-59.cs.siue.edu"
clone dual-apache apache
clone dual-gfs gfs
clone dual-ip ip \
	meta globally-unique="true" clone-max="2" clone-node-max="2"
clone dual-stonith stonith
colocation apache-gfs inf: dual-apache dual-gfs
colocation apache-ip inf: dual-apache dual-ip
order gfs-apache inf: dual-gfs dual-apache
order ip-apache inf: dual-ip dual-apache
property $id="cib-bootstrap-options" \
	dc-version="1.1.4-ac608e3491c7dfc3b3e3c36d966ae9b016f77065" \
	cluster-infrastructure="cman" \
	stonith-enabled="true" \
	no-quorum-policy="ignore"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]