Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:clvm [2015/10/30 11:13]
vondra [Installation (Debian Jessie)]
linux:clvm [2015/11/06 16:02] (current)
vondra [Removing node from the cluster]
Line 1: Line 1:
 ====== Cluster LVM ====== ====== Cluster LVM ======
 +sources:
 +
 +[[https://​www.suse.com/​documentation/​sle_ha/​book_sleha/​data/​sec_ha_clvm_config.html]]
 +
 +[[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​6/​html/​Cluster_Administration/​s1-admin-manage-nodes-delete-add-cli-CA.html]]
 +
 +[[https://​www.ibm.com/​developerworks/​community/​blogs/​mhhaque/​resource/​RHCS_IBM_POWER.pdf?​lang=zh]]
 ===== Installation (Debian Jessie) ===== ===== Installation (Debian Jessie) =====
   - install necessary packages:<​code bash>   - install necessary packages:<​code bash>
Line 9: Line 16:
   - set no wait time for quorum:<​code bash>​echo "​CMAN_QUORUM_TIMEOUT=0"​ >> /​etc/​default/​cman</​code>​   - set no wait time for quorum:<​code bash>​echo "​CMAN_QUORUM_TIMEOUT=0"​ >> /​etc/​default/​cman</​code>​
   - create config file /​etc/​cluster/​cluster.conf and put it to all nodes:<​code xml>   - create config file /​etc/​cluster/​cluster.conf and put it to all nodes:<​code xml>
-<cluster name="​mycluster"​ config_version="​2">+<cluster name="​mycluster"​ config_version="​1">
    <​clusternodes>​    <​clusternodes>​
      <​clusternode name="​10.0.0.23"​ nodeid="​1">​      <​clusternode name="​10.0.0.23"​ nodeid="​1">​
Line 45: Line 52:
   - create mirrored lvm:<​code bash>   - create mirrored lvm:<​code bash>
 lvcreate -n testovaci_lv -m1 -L 1.0g guma_cerna --nosync</​code>​(--nosync means that data will not be synced upon creating - since the lv should not contain any data upon its creating its OK) lvcreate -n testovaci_lv -m1 -L 1.0g guma_cerna --nosync</​code>​(--nosync means that data will not be synced upon creating - since the lv should not contain any data upon its creating its OK)
 +  - (optional) check that the volume were created succesfully on both SANs:<​code bash>
 +lvs -a -o +devices</​code>​
 +
 +===== Adding/​deleting node from cluster =====
 +  - If deleting stop all cluster services on node e.g.:<​code bash>
 +service stop clvm
 +service stop cman</​code>​
 +  - install cman clvm on new node(s) - don't forget to setup the /​etc/​lvm/​lvm.conf file
 +  - attach SANs on new node(s)
 +  - edit the /​etc/​cluster/​cluster.conf and increase serial:<​code xml>
 +<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></​code>​
 +  - distribute the file to ALL nodes in cluster and issue following command from any node:<​code bash>​cman_tool version -r -S</​code>​
 +  - to use previously created volumes those must be activated on new node:<​code bash>
 +lvchange -a y /​dev/​guma_cerna/​testovaci_lv</​code>​
 +===== Removing node from the cluster =====
 +  - stop all cluster services and then stop cman service with parameter leave<​code bash>
 +service clvm stop
 +service cman stop leave
 +</​code>​
  
 
linux/clvm.1446199982.txt.gz · Last modified: 2015/10/30 11:13 by vondra