Re: how to protect rbd from multiple simultaneous mapping

2013-01-25 Thread Wido den Hollander
On 01/25/2013 11:47 AM, Ugis wrote: This could work, thanks! P.S. Is there a way to tell which client has mapped certain rbd if no rbd lock is used? What you could do is this: $ rbd lock add myimage `hostname` That way you know which client locked the image. Wido It would be useful to

Re: how to protect rbd from multiple simultaneous mapping

2013-01-25 Thread Sage Weil
On Fri, 25 Jan 2013, Andrey Korolyov wrote: On Fri, Jan 25, 2013 at 4:52 PM, Ugis ugi...@gmail.com wrote: I mean if you map rbd and do not use rbd lock.. command. Can you tell which client has mapped certain rbd anyway? Not yet. We need to add the ability to list watchers in librados, which

Re: how to protect rbd from multiple simultaneous mapping

2013-01-25 Thread Andrey Korolyov
On Fri, Jan 25, 2013 at 7:51 PM, Sage Weil s...@inktank.com wrote: On Fri, 25 Jan 2013, Andrey Korolyov wrote: On Fri, Jan 25, 2013 at 4:52 PM, Ugis ugi...@gmail.com wrote: I mean if you map rbd and do not use rbd lock.. command. Can you tell which client has mapped certain rbd anyway? Not

Re: how to protect rbd from multiple simultaneous mapping

2013-01-24 Thread Josh Durgin
On 01/24/2013 05:30 AM, Ugis wrote: Hi, I have rbd which contains non-cluster filesystem. If this rbd is mapped+mounted on one host, it should not be mapped+mounted on the other simultaneously. How to protect such rbd from being mapped on the other host? At ceph level the only option is to use

Re: how to protect rbd from multiple simultaneous mapping

2013-01-24 Thread Mandell Degerness
The advisory locks are nice, but it would be really nice to have the fencing. If a node is temporarily off the network and a heartbeat monitor attempts to bring up a service on a different node, there is no way to ensure that the first node will not write data to the rbd after the rbd is mounted