Corosync/Pacemaker in Centos 7 con LCMC

Pacchetti da installare

yum install perl
yum install perl-Digest-MD5
yum install epel-release
rpm -ivh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
yum update
yum install kmod-drbd90 drbd90-utils
yum install acpid
yum install open-vm-tools

/etc/corosync/corosync.conf

logging {
        fileline: off
        to_logfile: yes
        logfile: /var/log/cluster/corosync.log
        to_stderr: no
        debug: off
        timestamp: on
        to_syslog: yes
        logger_subsys {
                subsys: QUORUM
                debug: off
        }
}
totem {
        version: 2
        token: 3000
        secauth: on
        rrp_mode: active
        transport: udpu
}
nodelist {
  node {
        ring0_addr: 172.21.8.131
        nodeid: 1
       }
  node {
        ring0_addr: 172.21.8.132
        nodeid: 2
       }
}
quorum {
        provider: corosync_votequorum
        two_node: 1
        expected_votes: 2
}

systemctl enable corosync
systemctl enable pacemaker
reboot

andrea

tema vim

.vimrc

#execute pathogen#infect()
syntax on
filetype plugin indent on
set nowrap
set t_Co=256
set background=dark
colorscheme PaperColor

Tema PaperColor
PaperColor-Dark

Wget in /.vim/colors/

wget https://raw.githubusercontent.com/NLKNguyen/papercolor-theme/master/colors/PaperColor.vim

andrea

Esperimenti con multipath e SAN

http://www-01.ibm.com/support/docview.wss?uid=isg3T1011985
http://www.sysadminshare.com/2013/06/multipath-config-status-check-in-linux.html
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html-single/DM_Multipath/index.html#config_file_multipath

Multipath: Active/Passive, Dual Active, and Active/Active


https://serverfault.com/questions/288087/linux-multipath-not-using-all-paths-and-wont-use-queue-length-path-selector/355151
https://h50146.www5.hpe.com/products/software/oe/linux/mainstream/support/doc/option/fibre/pdfs/c02020121.pdf

grep mpt /sys/class/scsi_host/host?/proc_name

rescan-scsi-bus.sh

echo “- – -” > /sys/class/scsi_host/host1/scan
multipath -l

multipathd -k”fail path sdb”
multipathd -k”del path sdb”
multipathd -k”reinstate path sdb”
multipathd -k”show paths”

dmsetup remove /dev/mapper/MSA_BELLNET
dmsetup ls

echo 1 > /sys/block/sde/device/delete
echo 1 > /sys/block/sda/device/rescan

service multipath-tools restart

partprobe /dev/sdb
sfdisk -R /dev/sdb
partx -u /dev/sdb
blockdev –rereadpt /dev/mapper/MSA_BELLNET
partprobe -s

pvcreate –uuid “DMD39I-rIMF-vVUc-6KaY-li2N-SF4n-v38O5m” –restorefile /root/VG-BELL.vg /dev/disk/by-id/scsi-MSA_BELLNET
vgcfgbackup -f VG-BELL.vg VG-BELL
vgcfgrestore -f VG-BELL.vg VG-BELL

multipath.conf

defaults {
        polling_interval        15
        path_selector           "round-robin 0"
        path_grouping_policy    multibus
        prio                    const
        path_checker            directio
        rr_min_io               100
        flush_on_last_del       no
        max_fds                 8192
        rr_weight               priorities
        failback                immediate
        no_path_retry           fail
        queue_without_daemon    no
        user_friendly_names     yes
        mode                    644
        uid                     0
        gid                     disk
}
blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^hd[a-z]"
        devnode "^sda"
        devnode "^sda[0-9]"
        wwid    "3600508b1001c1f5b93df16da7e7ab72e"
        wwid    "3600508b1001c81da7e4515d6a1c3a693"
        wwid    "OCZ-VELO_DRIVE_OCZ-938561J47139J405"
        wwid    "OCZ-VELO_DRIVE_OCZ-ADU3LJ4GZL225676"
        wwid    "OCZ-VELO_DRIVE_OCZ-V98FXMA0Q041W67U"
#       wwid 3600c0ff0001432f020c55c5901000000
        device {
                vendor HP
                product "P410i|LOGICAL"
        }
}
devices {
        device {
                vendor                  "HP"
                product                 "P2000 G3*"
                path_grouping_policy    "group_by_prio"
#               uid_attribute           "ID_SERIAL"
                path_checker            "tur"
                path_selector           "round-robin 0"
                features                "0"
                hardware_handler        "0"
                prio                    "alua"
                rr_weight               "uniform"
                failback                "immediate"
                no_path_retry           18
                rr_min_io               100
        }
}
multipaths {
        multipath {
                wwid 3600c0ff00014e4ed9724235801000000
                alias MSA_NETLITE
        }
        multipath {
                wwid 3600c0ff00014e4edfa37695801000000
                alias MSA_NETLITE_BACKUP
        }
        multipath {
#               path_grouping_policy    multibus
                wwid 3600c0ff0001432f020c55c5901000000
                alias MSA_BELLNET
        }
        multipath {
                wwid 3600c0ff0001432f0a80e5a5901000000
                alias MSA_BELLNET_BACKUP
        }
}

andrea