From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avishay Traeger Subject: Getting device-mapper failure notifications Date: Tue, 2 Feb 2016 09:07:11 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0864469357347091949==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids --===============0864469357347091949== Content-Type: multipart/alternative; boundary=001a11383ed47d4608052ac426a2 --001a11383ed47d4608052ac426a2 Content-Type: text/plain; charset=UTF-8 Hi all, I have a system where various configurations are possible - iSCSI/FC, single paths and multiple. For multiple I of course use device-mapper. I was wondering if it was possible to: 1. use it for cases where I have a single path. 2. create a monitoring process that can take some action (e.g., send a notification via message queue) in the case of some failure that would normally cause failover. Any help would be much appreciated. Thanks, Avishay -- *Avishay Traeger, PhD* *System Architect* Mobile: +972 54 447 1475 E-mail: avishay@stratoscale.com Web | Blog | Twitter | Google+ | Linkedin --001a11383ed47d4608052ac426a2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,
I have a system where various configurations a= re possible - iSCSI/FC, single paths and multiple.=C2=A0 For multiple I of = course use device-mapper.=C2=A0 I was wondering if it was possible to:
1. use it for cases where I have a single path.
2. create a= monitoring process that can take some action (e.g., send a notification vi= a message queue) in the case of some failure that would normally cause fail= over.

Any help would be much appreciated.

Thanks,
Avishay

--
=
=
Avishay Traeger, PhD<= /b>
System Architect

Mobile:=C2=A0+972 54 447 1475



Web=C2=A0|=C2=A0Blog=C2=A0|=C2=A0Twitter=C2=A0|=C2= =A0Google= +=C2=A0|=C2=A0Linkedin

--001a11383ed47d4608052ac426a2-- --===============0864469357347091949== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0864469357347091949==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Grover Subject: Re: Getting device-mapper failure notifications Date: Tue, 23 Feb 2016 21:00:45 -0800 Message-ID: <56CD38FD.9010209@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Avishay Traeger , dm-devel@redhat.com List-Id: dm-devel.ids On 02/01/2016 11:07 PM, Avishay Traeger wrote: > Hi all, > I have a system where various configurations are possible - iSCSI/FC, > single paths and multiple. For multiple I of course use device-mapper. > I was wondering if it was possible to: > 1. use it for cases where I have a single path. > 2. create a monitoring process that can take some action (e.g., send a > notification via message queue) in the case of some failure that would > normally cause failover. Does dm-multipath support a single path? I don't know... but for your #2, dm-multipath publishes a uevent when a path fails, maybe the process could look for that? Using libudev? HTH -- Andy From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avishay Traeger Subject: Re: Getting device-mapper failure notifications Date: Wed, 24 Feb 2016 08:01:37 +0200 Message-ID: References: <56CD38FD.9010209@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5820425625946446225==" Return-path: In-Reply-To: <56CD38FD.9010209@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Andy Grover Cc: dm-devel@redhat.com List-Id: dm-devel.ids --===============5820425625946446225== Content-Type: multipart/alternative; boundary=001a113ea6928d9e2e052c7dcc52 --001a113ea6928d9e2e052c7dcc52 Content-Type: text/plain; charset=UTF-8 On Wed, Feb 24, 2016 at 7:00 AM, Andy Grover wrote: > On 02/01/2016 11:07 PM, Avishay Traeger wrote: > >> Hi all, >> I have a system where various configurations are possible - iSCSI/FC, >> single paths and multiple. For multiple I of course use device-mapper. >> I was wondering if it was possible to: >> 1. use it for cases where I have a single path. >> 2. create a monitoring process that can take some action (e.g., send a >> notification via message queue) in the case of some failure that would >> normally cause failover. >> > > Does dm-multipath support a single path? I don't know... > > but for your #2, dm-multipath publishes a uevent when a path fails, maybe > the process could look for that? Using libudev? > > HTH -- Andy > > Thanks for pointing me in the right direction Andy! -- *Avishay Traeger, PhD* *System Architect* Mobile: +972 54 447 1475 E-mail: avishay@stratoscale.com Web | Blog | Twitter | Google+ | Linkedin --001a113ea6928d9e2e052c7dcc52 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Feb 24, 2016 at 7:00 AM, Andy Grover <agrover@redhat.com> wrote:
On 02/01/2016 = 11:07 PM, Avishay Traeger wrote:
Hi all,
I have a system where various configurations are possible - iSCSI/FC,
single paths and multiple.=C2=A0 For multiple I of course use device-mapper= .
I was wondering if it was possible to:
1. use it for cases where I have a single path.
2. create a monitoring process that can take some action (e.g., send a
notification via message queue) in the case of some failure that would
normally cause failover.

Does dm-multipath support a single path? I don't know...

but for your #2, dm-multipath publishes a uevent when a path fails, maybe t= he process could look for that? Using libudev?

HTH -- Andy


Thanks for pointing me in the right direction Andy!<= br clear=3D"all">

--
Avishay Traeger, PhD
System Architect

Mobile:=C2=A0+972 54 447 1475
E-mail:=C2=A0<= a href=3D"mailto:avishay@stratoscale.com" style=3D"color:rgb(17,85,204)" ta= rget=3D"_blank">avishay@stratoscale.com



= Web=C2=A0|=C2=A0Blog=C2= =A0|=C2=A0Twitter=C2=A0|=C2=A0Google+=C2=A0|=C2=A0Link= edin

--001a113ea6928d9e2e052c7dcc52-- --===============5820425625946446225== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5820425625946446225==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: Re: Getting device-mapper failure notifications Date: Wed, 24 Feb 2016 18:25:43 +0800 Message-ID: <56CD8527.5000702@suse.de> References: <56CD38FD.9010209@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <56CD38FD.9010209@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com List-Id: dm-devel.ids On 02/24/2016 01:00 PM, Andy Grover wrote: > On 02/01/2016 11:07 PM, Avishay Traeger wrote: >> Hi all, >> I have a system where various configurations are possible - iSCSI/FC, >> single paths and multiple. For multiple I of course use device-mapper. >> I was wondering if it was possible to: >> 1. use it for cases where I have a single path. >> 2. create a monitoring process that can take some action (e.g., send a >> notification via message queue) in the case of some failure that would >> normally cause failover. > = > Does dm-multipath support a single path? I don't know... > = Pshaw. Of course it does. (Might be that RH has some magic disallowing that, but certainly there's nothing in the source which forbids it. In fact I recommend it when using iSCSI) So I recommend to always use dm-multipath and listen to uevents. > but for your #2, dm-multipath publishes a uevent when a path fails, > maybe the process could look for that? Using libudev? > = Alternatively (if you don't want the failover to happen from multipath itself) you can implement your own device_handler sending out an uevent and waiting for some magic sysfs attribute to be written to before completing. Should be rather trivial. Cheers, Hannes -- = Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg) From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Bryn M. Reeves" Subject: Re: Getting device-mapper failure notifications Date: Wed, 24 Feb 2016 13:12:47 +0000 Message-ID: <20160224131246.GF26964@hex.redhat.com> References: <56CD38FD.9010209@redhat.com> <56CD8527.5000702@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56CD8527.5000702@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Hannes Reinecke Cc: dm-devel@redhat.com List-Id: dm-devel.ids On Wed, Feb 24, 2016 at 06:25:43PM +0800, Hannes Reinecke wrote: > On 02/24/2016 01:00 PM, Andy Grover wrote: > > On 02/01/2016 11:07 PM, Avishay Traeger wrote: > >> Hi all, > >> I have a system where various configurations are possible - iSCSI/FC, > >> single paths and multiple. For multiple I of course use device-mapper. > >> I was wondering if it was possible to: > >> 1. use it for cases where I have a single path. > >> 2. create a monitoring process that can take some action (e.g., send a > >> notification via message queue) in the case of some failure that would > >> normally cause failover. > > > > Does dm-multipath support a single path? I don't know... > > > Pshaw. > Of course it does. > > (Might be that RH has some magic disallowing that, but certainly there's > nothing in the source which forbids it. In fact I recommend it when > using iSCSI) No but find_multipaths is enabled by default so maps are only created automatically when we see at least two devices with the same WWID. > So I recommend to always use dm-multipath and listen to uevents. Ack. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: Getting device-mapper failure notifications Date: Wed, 24 Feb 2016 12:25:50 -0500 Message-ID: <20160224172550.GB15480@redhat.com> References: <56CD38FD.9010209@redhat.com> <56CD8527.5000702@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56CD8527.5000702@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Hannes Reinecke Cc: dm-devel@redhat.com List-Id: dm-devel.ids On Wed, Feb 24 2016 at 5:25am -0500, Hannes Reinecke wrote: > On 02/24/2016 01:00 PM, Andy Grover wrote: > > On 02/01/2016 11:07 PM, Avishay Traeger wrote: > >> Hi all, > >> I have a system where various configurations are possible - iSCSI/FC, > >> single paths and multiple. For multiple I of course use device-mapper. > >> I was wondering if it was possible to: > >> 1. use it for cases where I have a single path. > >> 2. create a monitoring process that can take some action (e.g., send a > >> notification via message queue) in the case of some failure that would > >> normally cause failover. > > > > Does dm-multipath support a single path? I don't know... > > > Pshaw. > Of course it does. > > (Might be that RH has some magic disallowing that, but certainly there's > nothing in the source which forbids it. In fact I recommend it when > using iSCSI) No, RH provided dm-multipath doesn't disallow single path multipath. Not sure why you engage in raising such doubt -- red hat follows upstream. period. multipathd can be configured to look for multiple paths ('find_multipaths yes' in multipath.conf) but there is nothing in the kernel disallowing the use of dm-multipath with a single path.