Skip to contentSkip to conversation

Questions regarding failure in the last IO path in multipath

DISCUSSION Ron Lai 2 participants 3 messages Jun 26, 2009 MD RAID

lore
Share & tools
lore

Ron Lai

author
#0 lore raw

Hi,
I use mdadm to setup multipath on a box running 2.6.25.14 and I try to simualte SAN failure by shutting down ports on the switch one by one. After I disable the last IO path, the box hangs with the following logs spewed out on the console.

Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 200114976 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 200016416
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 200114984
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 0 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO error.
Jun 23 14:32:32 localhost kernel: multipath: sdn2: rescheduling sector 200016416
Jun 23 14:32:32 localhost kernel: multipath: sdn: redirecting sector 200114976 to another IO path

........

In multipath_error() in /derivers/md/multipath.c the code says that the last path never gets marked as faulty hence it keeps retrying. I've tried to change the code to allow the last path to be marked as faulty and the box seems to work okay after the failure in the last path. (The kernel spews out logs about inode errors. Nevertheless it stops eventually and mdadm shows that all the paths are marked as faulty.) Will this modification create problems in other parts of the kernel? Thanks.

Ron

#1 lore raw
Quoted 59 lines · Ron Lai

Hi,
I use mdadm to setup multipath on a box running 2.6.25.14 and I try to simualte SAN failure by shutting down ports on the switch one by one. After
I disable the last IO path, the box hangs with the following logs spewed out
on the console.

Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200114976 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200016416
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200114984
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 0 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:32 localhost kernel: multipath: sdn2: rescheduling sector
200016416
Jun 23 14:32:32 localhost kernel: multipath: sdn: redirecting sector

200114976 to another IO path
........

Quoted 9 lines

In multipath_error() in /derivers/md/multipath.c the code says that the last
path never gets marked as faulty hence it keeps retrying. I've tried to change the code to allow the last path to be marked as faulty and the box seems to work okay after the failure in the last path. (The kernel spews out
logs about inode errors. Nevertheless it stops eventually and mdadm shows that all the paths are marked as faulty.) Will this modification create problems in other parts of the kernel? Thanks.

Probably not, but it is hard to tell unless you post the actual patch. Could you do that please?

Thanks,
NeilBrown

author
#2 lore raw

The changes are in multipath_error(). The diffs for /derivers/md/multipath.c are:

233,234c233
< /* leave it active... it's all we have */
< } else {
---

Quoted 1 line
         }

252c251
< }
---

Quoted 1 line

Thanks.
----- Original Message ----- From: "NeilBrown" <[email protected]>
To: "Ron Lai" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, June 25, 2009 6:27 PM
Subject: Re: Questions regarding failure in the last IO path in multipath

Quoted 59 lines · Ron Lai

Hi,
I use mdadm to setup multipath on a box running 2.6.25.14 and I try to simualte SAN failure by shutting down ports on the switch one by one. After
I disable the last IO path, the box hangs with the following logs spewed out
on the console.

Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200114976 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200016416
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200114984
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 0 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector 48 to
another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200015880 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: sdn: redirecting sector
200016408 to another IO path
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 8
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector 56
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:31 localhost kernel: multipath: sdn2: rescheduling sector
200015888
Jun 23 14:32:31 localhost kernel: multipath: only one IO path left and IO
error.
Jun 23 14:32:32 localhost kernel: multipath: sdn2: rescheduling sector
200016416
Jun 23 14:32:32 localhost kernel: multipath: sdn: redirecting sector

200114976 to another IO path
........

Quoted 9 lines

In multipath_error() in /derivers/md/multipath.c the code says that the last
path never gets marked as faulty hence it keeps retrying. I've tried to change the code to allow the last path to be marked as faulty and the box seems to work okay after the failure in the last path. (The kernel spews out
logs about inode errors. Nevertheless it stops eventually and mdadm shows that all the paths are marked as faulty.) Will this modification create problems in other parts of the kernel? Thanks.

Probably not, but it is hard to tell unless you post the actual patch. Could you do that please?

Thanks,
NeilBrown