Site Tools


Sidebar

snippets:linux_quickshotsetups:rhcluster_rhel6

rhel6 cluster setup

# all nodes
yum -y install ricci
service ricci start; chkconfig ricci on
passwd ricci

# management server
yum -y install luci

fedora 22 kvm fencing

# on fedora15 host
dnf -y install fence-virt fence-virtd \
  fence-virtd-multicast fence-virtd-libvirt
mkdir -p /etc/cluster
dd if=/dev/urandom of=/etc/cluster/fence_xvm.key bs=4k count=1

# copy the files to all cluster virtualmachines
scp /etc/cluster/fence_xvm.key rhel6u1a:/etc/cluster/fence_xvm.key
scp /etc/cluster/fence_xvm.key rhel6u1b:/etc/cluster/fence_xvm.key

# configure fencing daemon:
fence_virtd -c
# accept multicast as default
# accept default multicast address
# accept default multicast port
# set interface to virbr0
# accept default fence_xvm.key path
# set backend module to libvirt
# accept default URI
# y to write config

systemctl fence_virtd start; systemctl enable fence_virtd

# now on one of the nodes you can fence a different node, rhel6u1b is the name of the virtual
# machine as known to 'virsh' on the host system
fence_xvm -o reboot -H rhel6u1b

# if this works add fencing via luci:
#  add a fence device of type 'Fence virt (Multicast mode)', for name use i.e. 'kvmhost'
#  in the nodes settings 'add fence method', name 'rhel6u1a-fencer'.
#  'add fence instance', select the kvm host fencing, as domain use the name 
#  of the virtual machine as seen in virsh on the host

fedora 15/16/17/18 iscsi target

  • On fedora 16 actually also the new LIO target should be usable
yum -y install scsi-target-utils

systemctl start tgtd.service
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2009-11.com.example:storage.disk1
tgtadm --lld iscsi --op show --mode target

# dd if=/dev/zero of=lun0 bs=1 count=1 seek=10G
# dd if=/dev/zero of=lun1 bs=1 count=1 seek=10G
DEV0=$(losetup --show -f lun0 2>/dev/null)
DEV1=$(losetup --show -f lun1 2>/dev/null)
echo "$DEV0 $DEV1"
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b $DEV0
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 -b $DEV1

# now lets accept access from everywhere
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL

rhel iscsi initiator

yum install -y iscsi-initiator-utils
iscsiadm --mode discoverydb --type sendtargets --portal 192.168.4.1 --discover
iscsiadm --mode node --targetname iqn.2009-11.com.example:storage.disk1 --portal 192.168.4.1:3260 --login
chkconfig iscsi on
snippets/linux_quickshotsetups/rhcluster_rhel6.txt ยท Last modified: 2022/11/13 12:06 by 127.0.0.1