sources:
https://www.suse.com/documentation/sle_ha/book_sleha/data/sec_ha_clvm_config.html
https://www.ibm.com/developerworks/community/blogs/mhhaque/resource/RHCS_IBM_POWER.pdf?lang=zh
apt-get install clvm cman
mirror_logs_require_separate_pvs = 1 locking_type = 3
echo "CMAN_QUORUM_TIMEOUT=0" >> /etc/default/cman
<cluster name="mycluster" config_version="1"> <clusternodes> <clusternode name="10.0.0.23" nodeid="1"> <fence> </fence> </clusternode> <clusternode name="10.0.0.112" nodeid="2"> <fence> </fence> </clusternode> </clusternodes> <fencedevices> </fencedevices> <rm> </rm> </cluster>
service cman start service clvm start
cman_tool nodes
output should be:
root@debian:~# cman_tool nodes Node Sts Inc Joined Name 1 M 4 2015-10-30 09:34:43 10.0.0.23 2 M 8 2015-10-30 09:36:04 10.0.0.112
pvcreate /dev/sdb pvcreate /dev/sdc
vgcreate --clustered y guma_cerna /dev/sdb /dev/sdc
lvcreate -n testovaci_lv -m1 -L 1.0g guma_cerna --nosync
(–nosync means that data will not be synced upon creating - since the lv should not contain any data upon its creating its OK)
lvs -a -o +devices
service stop clvm service stop cman
<cluster name="mycluster" config_version="2"> <clusternodes> <clusternode name="10.0.0.23" nodeid="1"> <fence> </fence> </clusternode> <clusternode name="10.0.0.112" nodeid="2"> <fence> </fence> </clusternode> <clusternode name="10.0.0.110" nodeid="3"> <fence> </fence> </clusternode> </clusternodes> <fencedevices> </fencedevices> <rm> </rm> </cluster>
cman_tool version -r -S
lvchange -a y /dev/guma_cerna/testovaci_lv
service clvm stop service cman stop leave