Re: ATARAID userspace configuration tool

From: Thomas Horsten
Date: Tue Feb 10 2004 - 13:16:26 EST


On Tue, 10 Feb 2004, Jeff Garzik wrote:

> > On top of this it would be useful to make the underlying devices
> > inaccessible after the mapped device is created (to prevent people from
> > doing things like fdisk /dev/hda, when what they really wanted was
> > something like fdisk /dev/ataraid/disc).
>
> This would be something to talk with the md maintainer about, I think.
> I'm not sure we want to do this, since the user may have a valid reason
> to access the underlying disk.

That's true of course, one example would be to remove the RAID superblock
with dd. The problem is if this is done by mistake, it could be
catastrophic. It might be enough to remove the wrong partitions (with
BLKPG_DEL_PARTITION, thanks to Matt Domsch for pointing me in the right
direction), it will at least prevent mkfs /dev/hda1 etc, which would have
unforeseeable consequences.

But when the RAID/DM device is up, would it not be possible to generate an
EACCESS or EINUSE error if someone tries to open the underlying device? If
he really wants to do it, he can just stop the DM device first.

// Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/