linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* removed disk && md-device
@ 2007-05-09 12:17 Bernd Schubert
  2007-05-09 13:14 ` martin f krafft
  2007-05-09 21:41 ` Michael Tokarev
  0 siblings, 2 replies; 18+ messages in thread
From: Bernd Schubert @ 2007-05-09 12:17 UTC (permalink / raw)
  To: linux-raid, linux-hotplug-devel

Hi,

we are presently running into a hotplug/linux-raid problem.

Lets assume a hard disk entirely fails or a stupid human being pulls it out of 
the system. Several partitions of the very same hardisk are also part of 
linux-software raid. Also, /dev is managed by udev.

Problem-1) When the disk fails, udev will remove it from /dev. Unfortunately 
this will make it impossible to remove the disk or its partitions 
from /dev/mdX device, since mdadm tries to read the device fail and will 
abort if this file is not there.

Problem-2) Even though the kernel detected the device to not exist anymore, it 
didn't inform its md-layer about this event. The md-layer will first detect 
non-existent disk, if a read or write attempt to one of its raid-partitions 
fails. Unfortunately, if you are unluckily, it might never detect that, e.g. 
for raid1 devices.

I think there should be several solutions to these problems.

1) Before udev removes a device file, it should run a pre-remove script, which 
should check if the device is listed in /proc/mdstat and if it is listed 
there, it should run mdadm to remove this device from the.
Does udev presently support to run pre-remove scripts?

2.) As soon as the kernel detects a failed device, it should also inform the 
md layer.

3.) Does mdadm really need the device?


Thanks,
Bernd


-- 
Bernd Schubert
Q-Leap Networks GmbH

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-05-16 21:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-09 12:17 removed disk && md-device Bernd Schubert
2007-05-09 13:14 ` martin f krafft
2007-05-09 13:39   ` Bernd Schubert
2007-05-10  7:12     ` Neil Brown
2007-05-10 14:33       ` David Greaves
2007-05-11  1:36         ` Neil Brown
2007-05-11  8:51           ` Michael Tokarev
2007-05-11  9:22             ` Bernd Schubert
2007-05-11 20:39               ` Bill Davidsen
2007-05-15  9:52                 ` Goswin von Brederlow
2007-05-11  8:52           ` David Greaves
2007-05-11 15:05           ` David Greaves
2007-05-11 20:50           ` David Greaves
2007-05-10 18:17       ` Bernd Schubert
2007-05-11  6:16       ` Neil Brown
2007-05-11 20:47         ` Bill Davidsen
2007-05-16 21:19       ` Colin McCabe
2007-05-09 21:41 ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).