public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandra Seetharaman <sekharan@us.ibm.com>
To: "Moger, Babu" <Babu.Moger@lsi.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	device-mapper development <dm-devel@redhat.com>,
	"andmike@linux.vnet.ibm.com" <andmike@linux.vnet.ibm.com>
Subject: Re: DM does not activate the paths if there are more than one path in path group during failover
Date: Mon, 10 Nov 2008 18:06:28 -0800	[thread overview]
Message-ID: <1226369188.14830.1180.camel@chandra-ubuntu> (raw)
In-Reply-To: <E463DF2B2E584B4A82673F53D62C2EF45BE759CF@cosmail01.lsi.com>


On Mon, 2008-11-10 at 17:45 -0700, Moger, Babu wrote:
> Hi All,
>   I have noticed one more problem with device mapper today.
> 
> Summary:  If there are more than one path in the path group, device mapper does not activate the all the paths during the failover. DM only activates the first path in the path group. It does not call the function activate_path for the second path (or third so on). This seems like a major problem for me. Current code does not keep track of whether the path is already activated or not.  This leads DM using only first path and all other paths become unusable. This happens during the failover.

We do not need to send activate to each "path" as all paths in a path
group lead to the same controller and that controller is activated when
the activate is sent on the first path itself.

Is your multipathd running ?

BTW, why is the physical path state is showing "undef", it should be
"ghost" or "ready"
> 
> Test case.
> 1. Start the IO with all the paths.
> 2. Fail the active path.
> 3. Failover (mode select) will happen and passive path will be activated
> 4. Only first path in path group is activated and other paths will be failed. I would expect the DM to activate all the paths in the path group. However this does not happen.
> 
> Output of multipath -ll before the test.
> 
> mpathf (3600a0b80000f519c0000cc8a48fc7d0b) dm-2 LSI,INF-01-00
> [size=2.0G][features=0][hwhandler=1 rdac][rw]
> \_ round-robin 0 [prio=4][enabled]
>  \_ 3:0:0:0 sde 8:64  [active][undef] running
>  \_ 3:0:2:0 sdg 8:96  [active][undef] running
> \_ round-robin 0 [prio=2][enabled]
>  \_ 3:0:1:0 sdf 8:80  [active][undef] running
>  \_ 3:0:3:0 sdh 8:112 [active][undef] running
> 
> 
> Output of multipath -ll after the test. Notice that second path has failed.
> 
> mpathf (3600a0b80000f519c0000cc8a48fc7d0b) dm-2 LSI,INF-01-00
> [size=2.0G][features=0][hwhandler=1 rdac][rw]
> \_ round-robin 0 [prio=2][enabled]
>  \_ 3:0:1:0 sdf 8:80  [active][undef] running
>  \_ 3:0:3:0 sdh 8:112 [failed][undef] running
> 
> 
> Here is the patch, I have used to work-around the problem. I am sure this is not the place we want to add the fix. However, this patch should give you understanding of the problem. This patch will set the flags
> m->pg_init_required and m->queue_io whenever D-M select new path in the path group whenever the repeat_count is exhausted.
> 
> --- linux-2.6.28-rc4/drivers/md/dm-mpath.c.orig 2008-11-10 17:50:24.000000000 -0600
> +++ linux-2.6.28-rc4/drivers/md/dm-mpath.c      2008-11-10 17:51:36.000000000 -0600
> @@ -245,6 +245,10 @@ static int __choose_path_in_pg(struct mu
>         if (!path)
>                 return -ENXIO;
> 
> +       /* Set the pg_init_required flag to activate this path */
> +       m->pg_init_required = 1;
> +       m->queue_io = 1;
> +
>         m->current_pgpath = path_to_pgpath(path);
> 
>         if (m->current_pg != pg)
> 
> 
> 


  parent reply	other threads:[~2008-11-11  2:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06  4:05 [PATCH] Make sure the state of a path is set properly when controller is swapped from passive to active Chandra Seetharaman
2008-11-10 23:17 ` [PATCH] scsi_dh: Adding LSI vendor and product ids in rdac device list Moger, Babu
2008-11-24  0:04   ` James Bottomley
2008-11-24 15:06     ` Moger, Babu
2008-11-11  0:45 ` DM does not activate the paths if there are more than one path in path group during failover Moger, Babu
2008-11-11  0:59   ` Alasdair G Kergon
2008-11-11 17:13     ` Moger, Babu
2008-11-11 21:00       ` Chandra Seetharaman
2008-11-13 23:48       ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] DM does not activate the paths if there are more than one path in path group during failover") Chandra Seetharaman
2008-11-14  0:12         ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: " Alasdair G Kergon
2008-11-14 19:08           ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] " Chandra Seetharaman
2008-11-14 19:34             ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: " Alasdair G Kergon
2008-11-14 20:24               ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] " Chandra Seetharaman
2008-11-11  2:06   ` Chandra Seetharaman [this message]
2008-11-11 17:07     ` DM does not activate the paths if there are more than one path in path group during failover Moger, Babu
2008-11-11 17:10       ` Chandra Seetharaman
2008-11-11 17:28         ` Moger, Babu
2009-01-22  0:00 ` qla2xxx 0000:03:0c.0: Firmware image unavailable Moger, Babu
2009-01-22  0:26   ` Seokmann Ju
2009-01-22 14:14     ` Moger, Babu
2009-01-22 14:39       ` Sudhakar Pannerselvam
2009-01-22 15:20         ` Moger, Babu
2009-01-22 16:46           ` Dave Holland
2009-01-23  0:15             ` [dm-devel] " Moger, Babu
2009-01-23  6:22               ` Sudhakar Pannerselvam
2009-01-23 15:04                 ` James Bottomley
2009-01-25  4:22                   ` Mike Snitzer
2009-01-22 14:56       ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1226369188.14830.1180.camel@chandra-ubuntu \
    --to=sekharan@us.ibm.com \
    --cc=Babu.Moger@lsi.com \
    --cc=andmike@linux.vnet.ibm.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox