Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
hello digimer,

I am happy to tell you that I got the reason why I can not access the LVs
on the compute1 node.

Because I make a mistake with thc /etc/lvm/lvm.con on the compute1 node.
Now it works.


Then I would to study how to snapshotting a LV.

Thank you!

2016-12-06 14:24 GMT+08:00 su liu :

> It is the resource configration whthin my pacemaker cluster:
>
> [root@controller ~]# cibadmin --query --scope resources
> 
>   
> 
>   
>  name="allow_stonith_disabled" value="true"/>
>   
>   
>  timeout="90"/>
>  timeout="100"/>
> 
>   
> 
> 
>   
>   
> 
>   
>   
> 
>   
>  name="activate_vgs" value="true"/>
>   
>   
>  timeout="90"/>
>  timeout="90"/>
>  name="monitor"/>
>   
>   
> 
> 
>   
>   
> 
>   
> 
> [root@controller ~]#
>
>
>
> 2016-12-06 14:16 GMT+08:00 su liu :
>
>> Thank you very much.
>>
>> Because I am new to pacemaker, and I have checked the docs that
>> additional devices are needed when configing stonith, but now I does not
>> have it in my environment.
>>
>> I will see how to config it afterward.
>>
>> Now I want to know how the cluster LVM works. Thank you for your patience
>> explanation.
>>
>> The scene is:
>>
>> controller node + compute1 node
>>
>> I mount a SAN to both controller and compute1 node. Then I run a
>> pacemaker + corosync + clvmd cluster:
>>
>> [root@controller ~]# pcs status --full
>> Cluster name: mycluster
>> Last updated: Tue Dec  6 14:09:59 2016 Last change: Mon Dec  5 21:26:02
>> 2016 by root via cibadmin on controller
>> Stack: corosync
>> Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
>> with quorum
>> 2 nodes and 4 resources configured
>>
>> Online: [ compute1 (2) controller (1) ]
>>
>> Full list of resources:
>>
>>  Clone Set: dlm-clone [dlm]
>>  dlm (ocf::pacemaker:controld): Started compute1
>>  dlm (ocf::pacemaker:controld): Started controller
>>  Started: [ compute1 controller ]
>>  Clone Set: clvmd-clone [clvmd]
>>  clvmd (ocf::heartbeat:clvm): Started compute1
>>  clvmd (ocf::heartbeat:clvm): Started controller
>>  Started: [ compute1 controller ]
>>
>> Node Attributes:
>> * Node compute1 (2):
>> * Node controller (1):
>>
>> Migration Summary:
>> * Node compute1 (2):
>> * Node controller (1):
>>
>> PCSD Status:
>>   controller: Online
>>   compute1: Online
>>
>> Daemon Status:
>>   corosync: active/disabled
>>   pacemaker: active/disabled
>>   pcsd: active/enabled
>>
>>
>>
>> step 2:
>>
>> I create a cluster VG:cinder-volumes:
>>
>> [root@controller ~]# vgdisplay
>>   --- Volume group ---
>>   VG Name   cinder-volumes
>>   System ID
>>   Formatlvm2
>>   Metadata Areas1
>>   Metadata Sequence No  44
>>   VG Access read/write
>>   VG Status resizable
>>   Clustered yes
>>   Sharedno
>>   MAX LV0
>>   Cur LV0
>>   Open LV   0
>>   Max PV0
>>   Cur PV1
>>   Act PV1
>>   VG Size   1000.00 GiB
>>   PE Size   4.00 MiB
>>   Total PE  255999
>>   Alloc PE / Size   0 / 0
>>   Free  PE / Size   255999 / 1000.00 GiB
>>   VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt
>>
>> [root@controller ~]#
>>
>>
>> Step 3 :
>>
>> I create a LV and I want it can be seen and accessed on the compute1 node
>> but it is failed:
>>
>> [root@controller ~]# lvcreate --name test001 --size 1024m cinder-volumes
>>   Logical volume "test001" created.
>> [root@controller ~]#
>> [root@controller ~]#
>> [root@controller ~]# lvs
>>   LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
>> Log Cpy%Sync Convert
>>   test001 cinder-volumes -wi-a- 1.00g
>>
>> [root@controller ~]#
>> [root@controller ~]#
>> [root@controller ~]# ll /dev/cinder-volumes/test001
>> lrwxrwxrwx 1 root root 7 Dec  6 14:13 /dev/cinder-volumes/test001 ->
>> ../dm-0
>>
>>
>>
>> I can access it on the contrller node, but on the comput1 node, I can see
>> it with lvs command .but cant access it with ls command, because it is not
>> exists on the /dev/cinder-volumes directory:
>>
>>
>> [root@compute1 ~]# lvs
>>   LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
>> Log Cpy%Sync Convert
>>   test001 cinder-volumes -wi--- 1.00g
>>
>> [root@compute1 ~]#
>> [root@compute1 ~]#
>> [root@compute1 ~]# ll /dev/cinder-volumes
>> ls: cannot access /dev/cinder-volumes: No such file or directory
>> [root@compute1 ~]#
>> [root@compute1 ~]#
>> [root@compute1 ~]# lvscan
>>   inactive  '/dev/cinder-volumes/test001' [1.00 GiB] inherit
>> [root@compute1 ~]#
>>
>>
>>
>> Is something error with my configuration besides stonith?  Could you help
>> me?  thank you very much.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 2016-12-06 11:37 GMT+08:00 Digimer :
>>
>>> On 05/12/16 10:3

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
It is the resource configration whthin my pacemaker cluster:

[root@controller ~]# cibadmin --query --scope resources

  

  

  
  



  


  
  

  
  

  

  
  



  
  


  
  

  

[root@controller ~]#



2016-12-06 14:16 GMT+08:00 su liu :

> Thank you very much.
>
> Because I am new to pacemaker, and I have checked the docs that additional
> devices are needed when configing stonith, but now I does not have it in my
> environment.
>
> I will see how to config it afterward.
>
> Now I want to know how the cluster LVM works. Thank you for your patience
> explanation.
>
> The scene is:
>
> controller node + compute1 node
>
> I mount a SAN to both controller and compute1 node. Then I run a pacemaker
> + corosync + clvmd cluster:
>
> [root@controller ~]# pcs status --full
> Cluster name: mycluster
> Last updated: Tue Dec  6 14:09:59 2016 Last change: Mon Dec  5 21:26:02
> 2016 by root via cibadmin on controller
> Stack: corosync
> Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
> with quorum
> 2 nodes and 4 resources configured
>
> Online: [ compute1 (2) controller (1) ]
>
> Full list of resources:
>
>  Clone Set: dlm-clone [dlm]
>  dlm (ocf::pacemaker:controld): Started compute1
>  dlm (ocf::pacemaker:controld): Started controller
>  Started: [ compute1 controller ]
>  Clone Set: clvmd-clone [clvmd]
>  clvmd (ocf::heartbeat:clvm): Started compute1
>  clvmd (ocf::heartbeat:clvm): Started controller
>  Started: [ compute1 controller ]
>
> Node Attributes:
> * Node compute1 (2):
> * Node controller (1):
>
> Migration Summary:
> * Node compute1 (2):
> * Node controller (1):
>
> PCSD Status:
>   controller: Online
>   compute1: Online
>
> Daemon Status:
>   corosync: active/disabled
>   pacemaker: active/disabled
>   pcsd: active/enabled
>
>
>
> step 2:
>
> I create a cluster VG:cinder-volumes:
>
> [root@controller ~]# vgdisplay
>   --- Volume group ---
>   VG Name   cinder-volumes
>   System ID
>   Formatlvm2
>   Metadata Areas1
>   Metadata Sequence No  44
>   VG Access read/write
>   VG Status resizable
>   Clustered yes
>   Sharedno
>   MAX LV0
>   Cur LV0
>   Open LV   0
>   Max PV0
>   Cur PV1
>   Act PV1
>   VG Size   1000.00 GiB
>   PE Size   4.00 MiB
>   Total PE  255999
>   Alloc PE / Size   0 / 0
>   Free  PE / Size   255999 / 1000.00 GiB
>   VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt
>
> [root@controller ~]#
>
>
> Step 3 :
>
> I create a LV and I want it can be seen and accessed on the compute1 node
> but it is failed:
>
> [root@controller ~]# lvcreate --name test001 --size 1024m cinder-volumes
>   Logical volume "test001" created.
> [root@controller ~]#
> [root@controller ~]#
> [root@controller ~]# lvs
>   LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
> Log Cpy%Sync Convert
>   test001 cinder-volumes -wi-a- 1.00g
>
> [root@controller ~]#
> [root@controller ~]#
> [root@controller ~]# ll /dev/cinder-volumes/test001
> lrwxrwxrwx 1 root root 7 Dec  6 14:13 /dev/cinder-volumes/test001 ->
> ../dm-0
>
>
>
> I can access it on the contrller node, but on the comput1 node, I can see
> it with lvs command .but cant access it with ls command, because it is not
> exists on the /dev/cinder-volumes directory:
>
>
> [root@compute1 ~]# lvs
>   LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
> Log Cpy%Sync Convert
>   test001 cinder-volumes -wi--- 1.00g
>
> [root@compute1 ~]#
> [root@compute1 ~]#
> [root@compute1 ~]# ll /dev/cinder-volumes
> ls: cannot access /dev/cinder-volumes: No such file or directory
> [root@compute1 ~]#
> [root@compute1 ~]#
> [root@compute1 ~]# lvscan
>   inactive  '/dev/cinder-volumes/test001' [1.00 GiB] inherit
> [root@compute1 ~]#
>
>
>
> Is something error with my configuration besides stonith?  Could you help
> me?  thank you very much.
>
>
>
>
>
>
>
>
>
>
> 2016-12-06 11:37 GMT+08:00 Digimer :
>
>> On 05/12/16 10:32 PM, su liu wrote:
>> > Digimer, thank you very much!
>> >
>> > I do not need to have the data accessible on both nodes at once. I want
>> > to use the clvm+pacemaker+corosync in OpenStack Cinder.
>>
>> I'm not sure what "cinder" is, so I don't know what it needs to work.
>>
>> > then only a VM need access the LV at once. But the Cinder service which
>> > runs on the controller node is  responsible for snapshotting the LVs
>> > which are attaching on the VMs runs on other Compute nodes(such as
>> > compute1 node).
>>
>> If you don't need to access an LV on more than one node at a time, then
>> don't add clustered LVM and keep things simple. If you are using DRBD,
>> keep the backu

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
Thank you very much.

Because I am new to pacemaker, and I have checked the docs that additional
devices are needed when configing stonith, but now I does not have it in my
environment.

I will see how to config it afterward.

Now I want to know how the cluster LVM works. Thank you for your patience
explanation.

The scene is:

controller node + compute1 node

I mount a SAN to both controller and compute1 node. Then I run a pacemaker
+ corosync + clvmd cluster:

[root@controller ~]# pcs status --full
Cluster name: mycluster
Last updated: Tue Dec  6 14:09:59 2016 Last change: Mon Dec  5 21:26:02
2016 by root via cibadmin on controller
Stack: corosync
Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
with quorum
2 nodes and 4 resources configured

Online: [ compute1 (2) controller (1) ]

Full list of resources:

 Clone Set: dlm-clone [dlm]
 dlm (ocf::pacemaker:controld): Started compute1
 dlm (ocf::pacemaker:controld): Started controller
 Started: [ compute1 controller ]
 Clone Set: clvmd-clone [clvmd]
 clvmd (ocf::heartbeat:clvm): Started compute1
 clvmd (ocf::heartbeat:clvm): Started controller
 Started: [ compute1 controller ]

Node Attributes:
* Node compute1 (2):
* Node controller (1):

Migration Summary:
* Node compute1 (2):
* Node controller (1):

PCSD Status:
  controller: Online
  compute1: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled



step 2:

I create a cluster VG:cinder-volumes:

[root@controller ~]# vgdisplay
  --- Volume group ---
  VG Name   cinder-volumes
  System ID
  Formatlvm2
  Metadata Areas1
  Metadata Sequence No  44
  VG Access read/write
  VG Status resizable
  Clustered yes
  Sharedno
  MAX LV0
  Cur LV0
  Open LV   0
  Max PV0
  Cur PV1
  Act PV1
  VG Size   1000.00 GiB
  PE Size   4.00 MiB
  Total PE  255999
  Alloc PE / Size   0 / 0
  Free  PE / Size   255999 / 1000.00 GiB
  VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt

[root@controller ~]#


Step 3 :

I create a LV and I want it can be seen and accessed on the compute1 node
but it is failed:

[root@controller ~]# lvcreate --name test001 --size 1024m cinder-volumes
  Logical volume "test001" created.
[root@controller ~]#
[root@controller ~]#
[root@controller ~]# lvs
  LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
Log Cpy%Sync Convert
  test001 cinder-volumes -wi-a- 1.00g

[root@controller ~]#
[root@controller ~]#
[root@controller ~]# ll /dev/cinder-volumes/test001
lrwxrwxrwx 1 root root 7 Dec  6 14:13 /dev/cinder-volumes/test001 -> ../dm-0



I can access it on the contrller node, but on the comput1 node, I can see
it with lvs command .but cant access it with ls command, because it is not
exists on the /dev/cinder-volumes directory:


[root@compute1 ~]# lvs
  LV  VG Attr   LSize Pool Origin Data%  Meta%  Move
Log Cpy%Sync Convert
  test001 cinder-volumes -wi--- 1.00g

[root@compute1 ~]#
[root@compute1 ~]#
[root@compute1 ~]# ll /dev/cinder-volumes
ls: cannot access /dev/cinder-volumes: No such file or directory
[root@compute1 ~]#
[root@compute1 ~]#
[root@compute1 ~]# lvscan
  inactive  '/dev/cinder-volumes/test001' [1.00 GiB] inherit
[root@compute1 ~]#



Is something error with my configuration besides stonith?  Could you help
me?  thank you very much.










2016-12-06 11:37 GMT+08:00 Digimer :

> On 05/12/16 10:32 PM, su liu wrote:
> > Digimer, thank you very much!
> >
> > I do not need to have the data accessible on both nodes at once. I want
> > to use the clvm+pacemaker+corosync in OpenStack Cinder.
>
> I'm not sure what "cinder" is, so I don't know what it needs to work.
>
> > then only a VM need access the LV at once. But the Cinder service which
> > runs on the controller node is  responsible for snapshotting the LVs
> > which are attaching on the VMs runs on other Compute nodes(such as
> > compute1 node).
>
> If you don't need to access an LV on more than one node at a time, then
> don't add clustered LVM and keep things simple. If you are using DRBD,
> keep the backup secondary. If you are using LUNs, only connect the LUN
> to the host that needs it at a given time.
>
> In HA, you always want to keep things as simple as possible.
>
> > Need I active the LVs in /exclusively mode all the time? to supoort
> > snapping it while attaching on the VM./
>
> If you use clustered LVM, yes, but then you can't access the LV on any
> other nodes... If you don't need clustered LVM, then no, you continue to
> use it as simple LVM.
>
> Note; Snapshoting VMs is NOT SAFE unless you have a way to be certain
> that the guest VM has flushed it's caches and is made crash safe before
> the snapshot is made. Otherwise, your snapshot might b

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread Digimer
On 05/12/16 10:32 PM, su liu wrote:
> Digimer, thank you very much!
> 
> I do not need to have the data accessible on both nodes at once. I want
> to use the clvm+pacemaker+corosync in OpenStack Cinder.

I'm not sure what "cinder" is, so I don't know what it needs to work.

> then only a VM need access the LV at once. But the Cinder service which
> runs on the controller node is  responsible for snapshotting the LVs
> which are attaching on the VMs runs on other Compute nodes(such as
> compute1 node). 

If you don't need to access an LV on more than one node at a time, then
don't add clustered LVM and keep things simple. If you are using DRBD,
keep the backup secondary. If you are using LUNs, only connect the LUN
to the host that needs it at a given time.

In HA, you always want to keep things as simple as possible.

> Need I active the LVs in /exclusively mode all the time? to supoort
> snapping it while attaching on the VM./

If you use clustered LVM, yes, but then you can't access the LV on any
other nodes... If you don't need clustered LVM, then no, you continue to
use it as simple LVM.

Note; Snapshoting VMs is NOT SAFE unless you have a way to be certain
that the guest VM has flushed it's caches and is made crash safe before
the snapshot is made. Otherwise, your snapshot might be corrupted.

> /The following is the result when execute lvscan command on compute1 node:/
> /
> /
> /
> [root@compute1 ~]# lvs
>   LV  VG Attr  
> LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi---
> 1.00g
> 
> 
> 
> and on the controller node:
> 
> [root@controller ~]# lvscan ACTIVE
> '/dev/cinder-volumes/volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5' [1.00
> GiB] inherit
> 
> 
> 
> thank you very much!

Did you setup stonith? If not, things will go bad. Not "if", only
"when". Even in a test environment, you _must_ setup stonith.

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
lvscan result on compute1 node:

[root@compute1 ~]# lvscan
  inactive
 '/dev/cinder-volumes/volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5' [1.00
GiB] inherit

2016-12-06 11:32 GMT+08:00 su liu :

> Digimer, thank you very much!
>
> I do not need to have the data accessible on both nodes at once. I want to
> use the clvm+pacemaker+corosync in OpenStack Cinder.
>
> then only a VM need access the LV at once. But the Cinder service which
> runs on the controller node is  responsible for snapshotting the LVs which
> are attaching on the VMs runs on other Compute nodes(such as compute1
> node).
>
> Need I active the LVs in *exclusively mode all the time? to supoort
> snapping it while attaching on the VM.*
>
> *The following is the result when execute lvscan command on compute1 node:*
>
>
>
>
>
>
>
>
>
> *[root@compute1 ~]# lvs  LV  VG
>   Attr   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync
> Convert  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
> -wi--- 1.00gand on the controller node:[root@controller ~]# lvscan
> ACTIVE '/dev/cinder-volumes/volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5'
> [1.00 GiB] inheritthank you very much!*
>
>
> 2016-12-06 11:15 GMT+08:00 Digimer :
>
>> On 05/12/16 09:10 PM, su liu wrote:
>> > Thanks for your replay,  This snapshot factor will seriously affect my
>> > application.
>>
>> Do you really need to have the data accessible on both nodes at once? To
>> do this requires a cluster file system as well, like gfs2. These all
>> require cluster locking (DLM) which is slow compared to normal file
>> systems. It also adds a lot of complexity.
>>
>> In my experience, most people who start thinking they want concurrent
>> access don't really need it, and that makes things a lot simpler.
>>
>> > then, because now I have not a stonith device and I want to verify the
>> > basic process of snapshot a clustered LV.
>>
>> Working stonith *is* part of basic process. It is integral to testing
>> failure and recovery. So it should be a high priority, even in a proof
>> of concept/test environment.
>>
>> > I have a more question:
>> >
>> > After I create a VG: cinder-volumes on controller node, I can see it
>> > throuth vgs command on both controller and compute
>> > 1 nodes. then i create a
>> > LV:volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5. Then I execute the lvs
>> > command on both nodes:
>> >
>> > [root@controller ~]# lvs
>> >   LV  VG Attr
>> >   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>> >   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
>> > -wi-a- 1.00g
>> > [root@controller ~]#
>> > [root@controller ~]#
>> > [root@controller ~]#
>> > [root@controller ~]# ll /dev/cinder-volumes/
>> > total 0
>> > lrwxrwxrwx 1 root root 7 Dec  5 21:29
>> > volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 -> ../dm-0
>> >
>> >
>> >
>> > [root@compute1 ~]# lvs
>> >   LV  VG Attr
>> >   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>> >   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
>> > -wi--- 1.00g
>> > [root@compute1 ~]#
>> > [root@compute1 ~]#
>> > [root@compute1 ~]# ll /dev/cinder-volumes
>> > ls: cannot access /dev/cinder-volumes: No such file or directory
>> > [root@compute1 ~]#
>> >
>> >
>> >
>> > But it seems that the LV can't be exist on the compute1 node. My
>> > question is that how to access the LV on the compute1 node?
>> >
>> > thanks very much!
>>
>> Do you see it after 'lvscan'? You should see it on both nodes at the
>> same time as soon as it is created, *if* things are working properly. It
>> is possible, without stonith, that they are not.
>>
>> Please configure and test stonith, and see if the problem remains. If it
>> does, tail the system logs on both nodes, create the LV on the
>> controller and report back what log messages show up.
>>
>> digimer
>>
>> >
>> > 2016-12-06 9:26 GMT+08:00 Digimer > > >:
>> >
>> > On 05/12/16 08:16 PM, su liu wrote:
>> > > *Hi all,
>> > >
>> > > *
>> > > *I am new to pacemaker and I have some questions about the clvmd +
>> > > pacemaker + corosync. I wish you could explain it for me if you
>> are
>> > > free. thank you very much!
>> > >
>> > > *
>> > > *I have 2 nodes and the pacemaker's status is as follows:*
>> > >
>> > > [root@controller ~]# pcs status --full
>> > > Cluster name: mycluster
>> > > Last updated: Mon Dec  5 18:15:12 2016Last change: Fri
>> > Dec  2
>> > > 15:01:03 2016 by root via cibadmin on compute1
>> > > Stack: corosync
>> > > Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) -
>> > partition
>> > > with quorum
>> > > 2 nodes and 4 resources configured
>> > >
>> > > Online: [ compute1 (2) controller (1) ]
>> > >
>> > > Full list of resources:
>> > >
>> > >  C

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
Digimer, thank you very much!

I do not need to have the data accessible on both nodes at once. I want to
use the clvm+pacemaker+corosync in OpenStack Cinder.

then only a VM need access the LV at once. But the Cinder service which
runs on the controller node is  responsible for snapshotting the LVs which
are attaching on the VMs runs on other Compute nodes(such as compute1
node).

Need I active the LVs in *exclusively mode all the time? to supoort
snapping it while attaching on the VM.*

*The following is the result when execute lvscan command on compute1 node:*









*[root@compute1 ~]# lvs  LV  VG
Attr   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync
Convert  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
-wi--- 1.00gand on the controller node:[root@controller ~]# lvscan
ACTIVE '/dev/cinder-volumes/volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5'
[1.00 GiB] inheritthank you very much!*


2016-12-06 11:15 GMT+08:00 Digimer :

> On 05/12/16 09:10 PM, su liu wrote:
> > Thanks for your replay,  This snapshot factor will seriously affect my
> > application.
>
> Do you really need to have the data accessible on both nodes at once? To
> do this requires a cluster file system as well, like gfs2. These all
> require cluster locking (DLM) which is slow compared to normal file
> systems. It also adds a lot of complexity.
>
> In my experience, most people who start thinking they want concurrent
> access don't really need it, and that makes things a lot simpler.
>
> > then, because now I have not a stonith device and I want to verify the
> > basic process of snapshot a clustered LV.
>
> Working stonith *is* part of basic process. It is integral to testing
> failure and recovery. So it should be a high priority, even in a proof
> of concept/test environment.
>
> > I have a more question:
> >
> > After I create a VG: cinder-volumes on controller node, I can see it
> > throuth vgs command on both controller and compute
> > 1 nodes. then i create a
> > LV:volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5. Then I execute the lvs
> > command on both nodes:
> >
> > [root@controller ~]# lvs
> >   LV  VG Attr
> >   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
> >   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
> > -wi-a- 1.00g
> > [root@controller ~]#
> > [root@controller ~]#
> > [root@controller ~]#
> > [root@controller ~]# ll /dev/cinder-volumes/
> > total 0
> > lrwxrwxrwx 1 root root 7 Dec  5 21:29
> > volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 -> ../dm-0
> >
> >
> >
> > [root@compute1 ~]# lvs
> >   LV  VG Attr
> >   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
> >   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
> > -wi--- 1.00g
> > [root@compute1 ~]#
> > [root@compute1 ~]#
> > [root@compute1 ~]# ll /dev/cinder-volumes
> > ls: cannot access /dev/cinder-volumes: No such file or directory
> > [root@compute1 ~]#
> >
> >
> >
> > But it seems that the LV can't be exist on the compute1 node. My
> > question is that how to access the LV on the compute1 node?
> >
> > thanks very much!
>
> Do you see it after 'lvscan'? You should see it on both nodes at the
> same time as soon as it is created, *if* things are working properly. It
> is possible, without stonith, that they are not.
>
> Please configure and test stonith, and see if the problem remains. If it
> does, tail the system logs on both nodes, create the LV on the
> controller and report back what log messages show up.
>
> digimer
>
> >
> > 2016-12-06 9:26 GMT+08:00 Digimer  > >:
> >
> > On 05/12/16 08:16 PM, su liu wrote:
> > > *Hi all,
> > >
> > > *
> > > *I am new to pacemaker and I have some questions about the clvmd +
> > > pacemaker + corosync. I wish you could explain it for me if you are
> > > free. thank you very much!
> > >
> > > *
> > > *I have 2 nodes and the pacemaker's status is as follows:*
> > >
> > > [root@controller ~]# pcs status --full
> > > Cluster name: mycluster
> > > Last updated: Mon Dec  5 18:15:12 2016Last change: Fri
> > Dec  2
> > > 15:01:03 2016 by root via cibadmin on compute1
> > > Stack: corosync
> > > Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) -
> > partition
> > > with quorum
> > > 2 nodes and 4 resources configured
> > >
> > > Online: [ compute1 (2) controller (1) ]
> > >
> > > Full list of resources:
> > >
> > >  Clone Set: dlm-clone [dlm]
> > >  dlm(ocf::pacemaker:controld):Started compute1
> > >  dlm(ocf::pacemaker:controld):Started controller
> > >  Started: [ compute1 controller ]
> > >  Clone Set: clvmd-clone [clvmd]
> > >  clvmd(ocf::heartbeat:clvm):Started compute1
> > >  clvmd(oc

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread Digimer
On 05/12/16 09:10 PM, su liu wrote:
> Thanks for your replay,  This snapshot factor will seriously affect my
> application.

Do you really need to have the data accessible on both nodes at once? To
do this requires a cluster file system as well, like gfs2. These all
require cluster locking (DLM) which is slow compared to normal file
systems. It also adds a lot of complexity.

In my experience, most people who start thinking they want concurrent
access don't really need it, and that makes things a lot simpler.

> then, because now I have not a stonith device and I want to verify the
> basic process of snapshot a clustered LV.

Working stonith *is* part of basic process. It is integral to testing
failure and recovery. So it should be a high priority, even in a proof
of concept/test environment.

> I have a more question:
>
> After I create a VG: cinder-volumes on controller node, I can see it
> throuth vgs command on both controller and compute 
> 1 nodes. then i create a
> LV:volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5. Then I execute the lvs
> command on both nodes:
>
> [root@controller ~]# lvs
>   LV  VG Attr
>   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
> -wi-a- 1.00g
> [root@controller ~]# 
> [root@controller ~]# 
> [root@controller ~]# 
> [root@controller ~]# ll /dev/cinder-volumes/
> total 0
> lrwxrwxrwx 1 root root 7 Dec  5 21:29
> volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 -> ../dm-0
>
>
>
> [root@compute1 ~]# lvs
>   LV  VG Attr
>   LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes
> -wi--- 1.00g
> [root@compute1 ~]# 
> [root@compute1 ~]# 
> [root@compute1 ~]# ll /dev/cinder-volumes
> ls: cannot access /dev/cinder-volumes: No such file or directory
> [root@compute1 ~]# 
>
>
>
> But it seems that the LV can't be exist on the compute1 node. My
> question is that how to access the LV on the compute1 node?
>
> thanks very much!

Do you see it after 'lvscan'? You should see it on both nodes at the
same time as soon as it is created, *if* things are working properly. It
is possible, without stonith, that they are not.

Please configure and test stonith, and see if the problem remains. If it
does, tail the system logs on both nodes, create the LV on the
controller and report back what log messages show up.

digimer

>
> 2016-12-06 9:26 GMT+08:00 Digimer  >:
>
> On 05/12/16 08:16 PM, su liu wrote:
> > *Hi all,
> >
> > *
> > *I am new to pacemaker and I have some questions about the clvmd +
> > pacemaker + corosync. I wish you could explain it for me if you are
> > free. thank you very much!
> >
> > *
> > *I have 2 nodes and the pacemaker's status is as follows:*
> >
> > [root@controller ~]# pcs status --full
> > Cluster name: mycluster
> > Last updated: Mon Dec  5 18:15:12 2016Last change: Fri
> Dec  2
> > 15:01:03 2016 by root via cibadmin on compute1
> > Stack: corosync
> > Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) -
> partition
> > with quorum
> > 2 nodes and 4 resources configured
> >
> > Online: [ compute1 (2) controller (1) ]
> >
> > Full list of resources:
> >
> >  Clone Set: dlm-clone [dlm]
> >  dlm(ocf::pacemaker:controld):Started compute1
> >  dlm(ocf::pacemaker:controld):Started controller
> >  Started: [ compute1 controller ]
> >  Clone Set: clvmd-clone [clvmd]
> >  clvmd(ocf::heartbeat:clvm):Started compute1
> >  clvmd(ocf::heartbeat:clvm):Started controller
> >  Started: [ compute1 controller ]
> >
> > Node Attributes:
> > * Node compute1 (2):
> > * Node controller (1):
> >
> > Migration Summary:
> > * Node compute1 (2):
> > * Node controller (1):
> >
> > PCSD Status:
> >   controller: Online
> >   compute1: Online
> >
> > Daemon Status:
> >   corosync: active/disabled
> >   pacemaker: active/disabled
> >   pcsd: active/enabled
> > *
> > *
>
> You need to configure and enable (and test!) stonith. This is
> doubly-so
> with clustered LVM/shared storage.
>
> > *I create a lvm on controller node and it can be seen on the
> compute1
> > node immediately with 'lvs' command. but the lvm it not activate on
> > compute1.
> >
> > *
> > *then i want to create a snapshot of the lvm, but failed with
> the error
> > message:*
> >
> > /### volume-4fad87bb-3d4c-4a96-bef1-8799980050d1 must be active
> > exclusively to create snapshot ###
> >
> > /
> > *Can

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
Thanks for your replay,  This snapshot factor will seriously affect my
application.

then, because now I have not a stonith device and I want to verify the
basic process of snapshot a clustered LV.

I have a more question:

After I create a VG: cinder-volumes on controller node, I can see it
throuth vgs command on both controller and compute
1 nodes. then i create a LV:volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5.
Then I execute the lvs command on both nodes:

[root@controller ~]# lvs
  LV  VG Attr
LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi-a-
1.00g
[root@controller ~]#
[root@controller ~]#
[root@controller ~]#
[root@controller ~]# ll /dev/cinder-volumes/
total 0
lrwxrwxrwx 1 root root 7 Dec  5 21:29
volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 -> ../dm-0



[root@compute1 ~]# lvs
  LV  VG Attr
LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi---
1.00g
[root@compute1 ~]#
[root@compute1 ~]#
[root@compute1 ~]# ll /dev/cinder-volumes
ls: cannot access /dev/cinder-volumes: No such file or directory
[root@compute1 ~]#



But it seems that the LV can't be exist on the compute1 node. My question
is that how to access the LV on the compute1 node?

thanks very much!

2016-12-06 9:26 GMT+08:00 Digimer :

> On 05/12/16 08:16 PM, su liu wrote:
> > *Hi all,
> >
> > *
> > *I am new to pacemaker and I have some questions about the clvmd +
> > pacemaker + corosync. I wish you could explain it for me if you are
> > free. thank you very much!
> >
> > *
> > *I have 2 nodes and the pacemaker's status is as follows:*
> >
> > [root@controller ~]# pcs status --full
> > Cluster name: mycluster
> > Last updated: Mon Dec  5 18:15:12 2016Last change: Fri Dec  2
> > 15:01:03 2016 by root via cibadmin on compute1
> > Stack: corosync
> > Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
> > with quorum
> > 2 nodes and 4 resources configured
> >
> > Online: [ compute1 (2) controller (1) ]
> >
> > Full list of resources:
> >
> >  Clone Set: dlm-clone [dlm]
> >  dlm(ocf::pacemaker:controld):Started compute1
> >  dlm(ocf::pacemaker:controld):Started controller
> >  Started: [ compute1 controller ]
> >  Clone Set: clvmd-clone [clvmd]
> >  clvmd(ocf::heartbeat:clvm):Started compute1
> >  clvmd(ocf::heartbeat:clvm):Started controller
> >  Started: [ compute1 controller ]
> >
> > Node Attributes:
> > * Node compute1 (2):
> > * Node controller (1):
> >
> > Migration Summary:
> > * Node compute1 (2):
> > * Node controller (1):
> >
> > PCSD Status:
> >   controller: Online
> >   compute1: Online
> >
> > Daemon Status:
> >   corosync: active/disabled
> >   pacemaker: active/disabled
> >   pcsd: active/enabled
> > *
> > *
>
> You need to configure and enable (and test!) stonith. This is doubly-so
> with clustered LVM/shared storage.
>
> > *I create a lvm on controller node and it can be seen on the compute1
> > node immediately with 'lvs' command. but the lvm it not activate on
> > compute1.
> >
> > *
> > *then i want to create a snapshot of the lvm, but failed with the error
> > message:*
> >
> > /### volume-4fad87bb-3d4c-4a96-bef1-8799980050d1 must be active
> > exclusively to create snapshot ###
> >
> > /
> > *Can someone tell me how to snapshot a lvm in the cluster lvm
> > environment? thank you very much。*
>
> This is how it works. You can't snapshot a clustered LV, as the error
> indicates. The process is ACTIVE -> deactivate on all node -> set
> exclusive on one node -> set it back to ACTIVE, then you can snapshot.
>
> It's not very practical, unfortunately.
>
> > Additional information:
> >
> > [root@controller ~]# vgdisplay
> >   --- Volume group ---
> >   VG Name   cinder-volumes
> >   System ID
> >   Formatlvm2
> >   Metadata Areas1
> >   Metadata Sequence No  19
> >   VG Access read/write
> >   VG Status resizable
> >   Clustered yes
> >   Sharedno
> >   MAX LV0
> >   Cur LV1
> >   Open LV   0
> >   Max PV0
> >   Cur PV1
> >   Act PV1
> >   VG Size   1000.00 GiB
> >   PE Size   4.00 MiB
> >   Total PE  255999
> >   Alloc PE / Size   256 / 1.00 GiB
> >   Free  PE / Size   255743 / 999.00 GiB
> >   VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt
> >
> > [root@controller ~]# rpm -qa |grep pacem
> > pacemaker-cli-1.1.13-10.el7_2.4.x86_64
> > pacemaker-libs-1.1.13-10.el7_2.4.x86_64
> > pacemaker-1.1.13-10.el7_2.4.x86_64
> > pacemaker-cluster-libs-1.1.13-10.el7_2.4.x86_64
> >
> >
> > [root@controller ~]# lvs
> >   LV  VG   

Re: [ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread Digimer
On 05/12/16 08:16 PM, su liu wrote:
> *Hi all,
> 
> *
> *I am new to pacemaker and I have some questions about the clvmd +
> pacemaker + corosync. I wish you could explain it for me if you are
> free. thank you very much!
> 
> *
> *I have 2 nodes and the pacemaker's status is as follows:*
> 
> [root@controller ~]# pcs status --full
> Cluster name: mycluster
> Last updated: Mon Dec  5 18:15:12 2016Last change: Fri Dec  2
> 15:01:03 2016 by root via cibadmin on compute1
> Stack: corosync
> Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
> with quorum
> 2 nodes and 4 resources configured
> 
> Online: [ compute1 (2) controller (1) ]
> 
> Full list of resources:
> 
>  Clone Set: dlm-clone [dlm]
>  dlm(ocf::pacemaker:controld):Started compute1
>  dlm(ocf::pacemaker:controld):Started controller
>  Started: [ compute1 controller ]
>  Clone Set: clvmd-clone [clvmd]
>  clvmd(ocf::heartbeat:clvm):Started compute1
>  clvmd(ocf::heartbeat:clvm):Started controller
>  Started: [ compute1 controller ]
> 
> Node Attributes:
> * Node compute1 (2):
> * Node controller (1):
> 
> Migration Summary:
> * Node compute1 (2):
> * Node controller (1):
> 
> PCSD Status:
>   controller: Online
>   compute1: Online
> 
> Daemon Status:
>   corosync: active/disabled
>   pacemaker: active/disabled
>   pcsd: active/enabled
> *
> *

You need to configure and enable (and test!) stonith. This is doubly-so
with clustered LVM/shared storage.

> *I create a lvm on controller node and it can be seen on the compute1
> node immediately with 'lvs' command. but the lvm it not activate on
> compute1.
> 
> *
> *then i want to create a snapshot of the lvm, but failed with the error
> message:*
> 
> /### volume-4fad87bb-3d4c-4a96-bef1-8799980050d1 must be active
> exclusively to create snapshot ###
> 
> /
> *Can someone tell me how to snapshot a lvm in the cluster lvm
> environment? thank you very much。*

This is how it works. You can't snapshot a clustered LV, as the error
indicates. The process is ACTIVE -> deactivate on all node -> set
exclusive on one node -> set it back to ACTIVE, then you can snapshot.

It's not very practical, unfortunately.

> Additional information:
> 
> [root@controller ~]# vgdisplay 
>   --- Volume group ---
>   VG Name   cinder-volumes
>   System ID 
>   Formatlvm2
>   Metadata Areas1
>   Metadata Sequence No  19
>   VG Access read/write
>   VG Status resizable
>   Clustered yes
>   Sharedno
>   MAX LV0
>   Cur LV1
>   Open LV   0
>   Max PV0
>   Cur PV1
>   Act PV1
>   VG Size   1000.00 GiB
>   PE Size   4.00 MiB
>   Total PE  255999
>   Alloc PE / Size   256 / 1.00 GiB
>   Free  PE / Size   255743 / 999.00 GiB
>   VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt
> 
> [root@controller ~]# rpm -qa |grep pacem
> pacemaker-cli-1.1.13-10.el7_2.4.x86_64
> pacemaker-libs-1.1.13-10.el7_2.4.x86_64
> pacemaker-1.1.13-10.el7_2.4.x86_64
> pacemaker-cluster-libs-1.1.13-10.el7_2.4.x86_64
> 
> 
> [root@controller ~]# lvs
>   LV  VG Attr  
> LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi-a-
> 1.00g
> 
> 
> [root@compute1 ~]# lvs
>   LV  VG Attr  
> LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi---
> 1.00g
> 
> 
> thank you very much!
> 
> 
> 
> 
> 
> ___
> Users mailing list: Users@clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 


-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] [pacemaker+ clvm] Cluster lvm must be active exclusively to create snapshot

2016-12-05 Thread su liu
*Hi all,*


*I am new to pacemaker and I have some questions about the clvmd +
pacemaker + corosync. I wish you could explain it for me if you are free.
thank you very much!*
*I have 2 nodes and the pacemaker's status is as follows:*

[root@controller ~]# pcs status --full
Cluster name: mycluster
Last updated: Mon Dec  5 18:15:12 2016Last change: Fri Dec  2
15:01:03 2016 by root via cibadmin on compute1
Stack: corosync
Current DC: compute1 (2) (version 1.1.13-10.el7_2.4-44eb2dd) - partition
with quorum
2 nodes and 4 resources configured

Online: [ compute1 (2) controller (1) ]

Full list of resources:

 Clone Set: dlm-clone [dlm]
 dlm(ocf::pacemaker:controld):Started compute1
 dlm(ocf::pacemaker:controld):Started controller
 Started: [ compute1 controller ]
 Clone Set: clvmd-clone [clvmd]
 clvmd(ocf::heartbeat:clvm):Started compute1
 clvmd(ocf::heartbeat:clvm):Started controller
 Started: [ compute1 controller ]

Node Attributes:
* Node compute1 (2):
* Node controller (1):

Migration Summary:
* Node compute1 (2):
* Node controller (1):

PCSD Status:
  controller: Online
  compute1: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled



*I create a lvm on controller node and it can be seen on the compute1
node immediately with 'lvs' command. but the lvm it not activate on
compute1.*
*then i want to create a snapshot of the lvm, but failed with the error
message:*



*### volume-4fad87bb-3d4c-4a96-bef1-8799980050d1 must be active exclusively
to create snapshot ###*
*Can someone tell me how to snapshot a lvm in the cluster lvm environment?
thank you very much。*


Additional information:

[root@controller ~]# vgdisplay
  --- Volume group ---
  VG Name   cinder-volumes
  System ID
  Formatlvm2
  Metadata Areas1
  Metadata Sequence No  19
  VG Access read/write
  VG Status resizable
  Clustered yes
  Sharedno
  MAX LV0
  Cur LV1
  Open LV   0
  Max PV0
  Cur PV1
  Act PV1
  VG Size   1000.00 GiB
  PE Size   4.00 MiB
  Total PE  255999
  Alloc PE / Size   256 / 1.00 GiB
  Free  PE / Size   255743 / 999.00 GiB
  VG UUID   aLamHi-mMcI-2NsC-Spjm-QWZr-MzHx-pPYSTt

[root@controller ~]# rpm -qa |grep pacem
pacemaker-cli-1.1.13-10.el7_2.4.x86_64
pacemaker-libs-1.1.13-10.el7_2.4.x86_64
pacemaker-1.1.13-10.el7_2.4.x86_64
pacemaker-cluster-libs-1.1.13-10.el7_2.4.x86_64


[root@controller ~]# lvs
  LV  VG Attr
LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi-a-
1.00g


[root@compute1 ~]# lvs
  LV  VG Attr
LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  volume-1b0ea468-37c8-4b47-a6fa-6cce65b068b5 cinder-volumes -wi---
1.00g


thank you very much!
___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Error performing operation: Argument list too long

2016-12-05 Thread Shane Lawrence
I'm experiencing a strange issue with pacemaker. It is unable to check the
status of a systemd resource.

systemctl shows that the service crashed:
[root@xx ~]# systemctl status rsyslog
● rsyslog.service - System Logging Service
   Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; vendor
preset: enabled)
   Active: inactive (dead) since Mon 2016-12-05 07:41:11 UTC; 12h ago
 Docs: man:rsyslogd(8)
   http://www.rsyslog.com/doc/
 Main PID: 22703 (code=exited, status=0/SUCCESS)

Dec 02 21:41:41 xx...xx systemd[1]: Starting Cluster
Controlled rsyslog...
Dec 02 21:41:41 xx...xx systemd[1]: Started Cluster
Controlled rsyslog.
Dec 05 07:41:08 xx...xx systemd[1]: Stopping System Logging
Service...
Dec 05 07:41:11 xx...xx systemd[1]: Stopped System Logging
Service.
Dec 05 07:41:40 xx...xx systemd[1]: Stopped System Logging
Service.

Attempting to view the status through Pacemaker shows:
[root@xx ~]# crm_resource --force-check -V -r rsyslog
Error performing operation: Argument list too long
[root@xx ~]# pcs resource debug-monitor rsyslog --full
Error performing operation: Argument list too long

The problem seems to be resolved (temporarily) by restarting corosync and
then starting the cluster again.

Has anyone else experienced this?
___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] How to DRBD + Pacemaker + Samba in Active/Passive Cluster?

2016-12-05 Thread Semion Itic
Hello Everybody,

How to DRBD + Pacemaker + Samba  in Active/Passive Cluster?

I have been searching now about many days how to integrate drbd + pacemaker and 
corosync in a two node active/passive cluster (with Service IP)  with SAMBA. 
And I still don’t unterstand how to to go further after mounting the 
filesystem, I want to integrate Samba in the pacemaker process as a service. I 
saw that the main solution to this, is using CTDB, but this seems to be very 
complex for me. So, do anybody have experience in this combination of topics 
and can provide me with a Instruction or at least an advice.

Regards,
Simon I
___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Antwort: Re: clone resource - pacemaker remote

2016-12-05 Thread Ken Gaillot
On 12/05/2016 09:20 AM, philipp.achmuel...@arz.at wrote:
> Ken Gaillot  schrieb am 02.12.2016 19:27:09:
> 
>> Von: Ken Gaillot 
>> An: users@clusterlabs.org
>> Datum: 02.12.2016 19:32
>> Betreff: Re: [ClusterLabs] clone resource - pacemaker remote
>>
>> On 12/02/2016 07:08 AM, philipp.achmuel...@arz.at wrote:
>> > hi,
>> >
>> > what is best way to prevent clone resource trying to run on remote/guest
>> > nodes?
>>
>> location constraints with a negative score:
>>
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/
>> Pacemaker_Explained/index.html#_deciding_which_nodes_a_resource_can_run_on
>>
>>
>> you can even use a single constraint with a rule based on #kind ne
>> cluster, so you don't need a separate constraint for each node:
>>
>> http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/
>> Pacemaker_Explained/index.html#_node_attribute_expressions
>>
>>
>> alternatively, you can set symmetric-cluster=false and use positive
>> constraints for cluster nodes only
>>
> 
> set constraint to single primitive, group, or on clone resource?
> are there any advantages/disadvantages using one of these methods?

When a resource is cloned, you want to refer to the clone name in any
constraints, rather than the primitive name.

For a group, it doesn't really matter, but it's simplest to use the
group name in constraints -- mainly that keeps you from accidentally
setting conflicting constraints on different members of the group. And
of course group members are automatically ordered/colocated with each
other, so you don't need individual constraints for that.

> 
>> >
>> > ...
>> > node 167873318: lnx0223a \
>> > attributes maintenance=off
>> > node 167873319: lnx0223b \
>> > attributes maintenance=off
>> > ...
>> > /primitive vm-lnx0107a VirtualDomain \/
>> > /params hypervisor="qemu:///system"
>> > config="/etc/kvm/lnx0107a.xml" \/
>> > /meta remote-node=lnx0107a238 \/
>> > /utilization cpu=1 hv_memory=4096/
>> > /primitive remote-lnx0106a ocf:pacemaker:remote \/
>> > /params server=xx.xx.xx.xx \/
>> > /meta target-role=Started/
>> > /group base-group dlm clvm vg1/
>> > /clone base-clone base-group \/
>> > /meta interleave=true target-role=Started/
>> > /.../
>> >
>> > /Dec  1 14:32:57 lnx0223a crmd[9826]:   notice: Initiating start
>> > operation dlm_start_0 on lnx0107a238/
>> > /Dec  1 14:32:58 lnx0107a pacemaker_remoted[1492]:   notice: executing -
>> > rsc:dlm action:start call_id:7/
>> > /Dec  1 14:32:58 lnx0107a pacemaker_remoted[1492]:   notice: finished -
>> > rsc:dlm action:start call_id:7  exit-code:5 exec-time:16ms
> queue-time:0ms/
>> > /Dec  1 14:32:58 lnx0223b crmd[9328]:error: Result of start
>> > operation for dlm on lnx0107a238: Not installed/
>> > /Dec  1 14:32:58 lnx0223a crmd[9826]:  warning: Action 31 (dlm_start_0)
>> > on lnx0107a238 failed (target: 0 vs. rc: 5): Error/
>> > /Dec  1 14:32:58 lnx0223a crmd[9826]:  warning: Action 31 (dlm_start_0)
>> > on lnx0107a238 failed (target: 0 vs. rc: 5): Error/
>> > /Dec  1 14:34:07 lnx0223a pengine[9824]:  warning: Processing failed op
>> > start for dlm:2 on lnx0107a238: not installed (5)/
>> > /Dec  1 14:34:07 lnx0223a pengine[9824]:  warning: Processing failed op
>> > start for dlm:2 on lnx0107a238: not installed (5)/
>> > /.../
>> > /Dec  1 14:32:49 lnx0223a pengine[9824]:   notice: Start  
>> > dlm:3#011(remote-lnx0106a)/
>> > /Dec  1 14:32:49 lnx0223a crmd[9826]:   notice: Initiating monitor
>> > operation dlm_monitor_0 locally on remote-lnx0106a/
>> > /Dec  1 14:32:50 lnx0223a crmd[9826]:error: Result of probe
>> > operation for dlm on remote-lnx0106a: Not installed/
>> > /Dec  1 14:32:50 lnx0223a crmd[9826]:  warning: Action 5 (dlm_monitor_0)
>> > on remote-lnx0106a failed (target: 7 vs. rc: 5): Error/
>> > /Dec  1 14:32:50 lnx0223a crmd[9826]:  warning: Action 5 (dlm_monitor_0)
>> > on remote-lnx0106a failed (target: 7 vs. rc: 5): Error/
>> > /.../
>> >
>> > ---
>> > env: pacemaker-1.1.15-19.15.x86_64
>> >
>> > thank you!


___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] need some help with failing resources

2016-12-05 Thread Ken Gaillot
On 12/05/2016 09:30 AM, Darko Gavrilovic wrote:
> On 12/5/2016 10:17 AM, Ken Gaillot wrote:
>> On 12/03/2016 05:19 AM, Darko Gavrilovic wrote:
>>> Here is the output for that resource.. edited
>>>
>>> primitive svc-mysql ocf:heartbeat:mysql \
>>> params binary="/usr/bin/mysqld_safe" config="/etc/my.cnf"
>>> datadir="/var/lib/mysql" user="mysql" group="mysql"
>>> log="/var/log/mysqld.log" pid="/var/run/mysqld/mysqld.pid"
>>> socket="/var/lib/mysql/mysql.sock" test_table="***" test_user="***"
>>> test_passwd="" \
>>> op monitor interval="30s" timeout="60s" OCF_CHECK_LEVEL="5" \
>>> op start interval="0" timeout="120s" \
>>> op stop interval="0" timeout="120s" \
>>> meta target-role="Started" migration-threshold="2"
>>>
>>> ...skipping
>>> order mysql-before-httpd inf: svc-mysql:start svc-httpd:start
>>> order mysql-before-ssh inf: svc-mysql:start svc-ssh:start
>>> property $id="cib-bootstrap-options" \
>>> dc-version="1.0.6-f709c638237cdff7556cb6ab615f32826c0f8c06" \
>>> cluster-infrastructure="openais" \
>>> expected-quorum-votes="2" \
>>> last-lrm-refresh="1480762389" \
>>> no-quorum-policy="ignore" \
>>> stonith-enabled="true" \
>>> ms-drbd0="Master"
>>>
>>>
>>> dg
>>>
>>>
>>> On 12/3/2016 1:25 AM, Kostiantyn Ponomarenko wrote:
 I assume that you are using crmsh.
 If so, I suggest to post an output from "crm configure show" command
 here.

 Thank you,
 Kostia

 On Sat, Dec 3, 2016 at 5:54 AM, Darko Gavrilovic
 mailto:da...@chass.utoronto.ca>> wrote:

 Hello, I have a two node cluster running that seems to be
 failing to
 start resources.

  Resource Group: services
  svc-mysql  (ocf::heartbeat:mysql) Stopped
  svc-httpd  (ocf::heartbeat:apache) Stopped
  svc-ssh(lsb:sshd-virt) Stopped
  svc-tomcat6(lsb:tomcat6) Stopped
  svc-plone  (lsb:plone) Stopped
  svc-bacula (lsb:bacula-fd-virt) Stopped

 When I run crm resource start services the service group does not
 start.

 I also tried starting the first resource in the group.
 crm resource start svc-mysql

 It does not start either.

 The error I am seeing is:
 Dec  2 21:59:43  pengine: [25829]: WARN: native_color: Resource
 svc-mysql cannot run anywhere
 Dec  2 22:00:26  pengine: [25829]: WARN: native_color: Resource
 svc-mysql cannot run anywhere
>>
>> The most common reasons for the above message are:
>>
>> * Location or order constraints don't leave any place for the resource
>> to run
>>
>> * The resource has failed the maximum number of times on all nodes.
>> (Does "crm_mon" show any failures?)
> 
> crm_mon does not list any failures for this service group from what I
> can see.
> 
>>

 4b4f-a239-8a10dad40587, cib=0.3857.2) : Resource op removal
 Dec  2 21:59:32 server1 crmd: [25830]: info: te_rsc_command:
> 
> 
 Initiating action 56: monitor svc-mysql_monitor_0 on server2
 Dec  2 21:59:33 server1 crmd: [25830]: WARN: status_from_rc: Action
 56 (svc-mysql_monitor_0) on server2 failed (target: 7 vs. rc: 0):
 Error
>>
>> The above error indicates that mysql is running on server2 but the
>> cluster didn't start it there. (The "_monitor_0" is called a "probe";
>> it's used to check the status of the service before the cluster starts
>> it. The "target: 7" means it expects the service to be stopped. The "rc:
>> 0" means the service is actually running.)
>>
>> Make sure you're not starting mysql at boot or by any other means than
>> the cluster.
> 
> Thanks. Is there a way or command for me to check on which server does
> the cluster think the service last started on?

crm_mon shows what the cluster thinks the current state is, including
what resources are started where.

For way more (user-unfriendly) detail, you can look at the operation
history in the CIB XML, which you can see with (for example) "cibadmin
-Q". The  section will have a  entry for each node,
with a  entry for each resource, with  entries
for all failed operations and the most recent successful operation. So
you can see all the *_start_0 operations with a whole bunch of
information including rc-code which is what it returned (0 is success).

 Dec  2 21:59:33 server1 crmd: [25830]: info:
 abort_transition_graph:
 match_graph_event:272 - Triggered transition abort (complete=0,
 tag=lrm_rsc_op, id=svc-mysql_monitor_0,
 magic=0:0;56:15:7:aee06ee3-9576-4b4f-a239-8a10dad40587,
 cib=0.3859.2) : Event failed
 Dec  2 21:59:33 server1 crmd: [25830]: info: match_graph_event:
 Action svc-mysql_monitor_0 (56) confirmed on server2 (rc=4)
 Dec  2 21:59:33 server1 crmd: [25830]: info: te_rsc_command:
 Initiating action 187: stop svc-mysql_stop