Will look into this problem and get back to you. chandra On Tue, 2008-11-11 at 10:13 -0700, Moger, Babu wrote: > Thanks for the response. > > If pg_init is intended to be called only once then problem is elsewhere. > > During the pg_init, the activate_path is called. The activate_path calls scsi_dh_activate(then rdac_activate) which will set path state to active(h->state = RDAC_STATE_ACTIVE;). My understanding is, h->state is specific to each path. How does d-m sets h->state to RDAC_STATE_ACTIVE for all the paths available in the path group. > > This is what happening in my case. On path group failure, d-m switches the path group initiates path group. It then selects the first path (in the path group) starts I/O. After exhausting the repeat_count it then selects the next path in the path group. Then rdac_prep_fn is called. This function finds h->state is still passive and fails the path which becomes unusable. > > This function returns BLKPREP_KILL which is leading to fail failure. > > static int rdac_prep_fn(struct scsi_device *sdev, struct request *req) > { > struct rdac_dh_data *h = get_rdac_data(sdev); > int ret = BLKPREP_OK; > > if (h->state != RDAC_STATE_ACTIVE) { > ret = BLKPREP_KILL; > req->cmd_flags |= REQ_QUIET; > } > return ret; > } > > This is my understanding so far. Please correct me if there is anything wrong. > > > -----Original Message----- > From: dm-devel-bounces@xxxxxxxxxx [mailto:dm-devel-bounces@xxxxxxxxxx] On Behalf Of Alasdair G Kergon > Sent: Monday, November 10, 2008 6:59 PM > To: device-mapper development > Cc: andmike@xxxxxxxxxxxxxxxxxx; linux-scsi@xxxxxxxxxxxxxxx > Subject: Re: DM does not activate the paths if there are more than one path in path group during failover > > pg_init is a function intended to be called *once* when there is a switch to a new group of paths. It is not per-path initialisation. > > Alasdair > -- > agk@xxxxxxxxxx > > -- > dm-devel mailing list > dm-devel@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/dm-devel > > -- > dm-devel mailing list > dm-devel@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/dm-devel -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel