On Sat, Oct 16, 1999 at 10:24:31PM -0700, Tom Livingston wrote:
> Jakob Østergaard wrote:
> > Shouldn't the raidhotadd command check that the supplied disk
> > name to be added is actually a valid device in the raidtab file ?
>
> I'm not so sure...
>
> I never saw raidhotadd as being an application that required the drive to
> already be known. In fact, I always presumed it might be used in a case
> where you hotswap a new drive into an empty swap cabinet, hotadd it to the
> array, and then pull the old failed drive.
Thats a good point.
> Obviously you could edit the raidtab before hand to add this drive to the
> raid set.. but as it wouldn't be (ye), you'd be enforcing some pretty
> strange behavior.
Nah, that would be weird and not The Way We Want To Do Things (TM).
What about a -f flag ?
> I wonder if a more straightforward test would be to refuse to use /dev/sdX
> if any of the partition on sdX are mounted... this would be akin to refusing
> to use /dev/sda1 if sda1 is already mounted.
Yes. But my problem was that nothing was being used on /dev/hdc when I added
it. Later on I enabled swap on the /dev/hdc2 partition, and swapon didn't have
any trouble doing that, despite the fact that /dev/hdc2 was non-existing
because the partition table just got nuked. I know that the partition table
still lived in the kernel of course, and we don't want raidhotadd to call the
ioctl to re-read partition tables after adding drives ;)
I think that checking consistency is a pretty hard problem. You need all the
RAID, FS, swap, ... utilities to check for RAID, FS, swap etc. This is n^2.
But checking up against the existing configuration when adding drives will
catch these stupid mistakes. A -f flag to allow adding anything would - for
the reasons you mention - of course be a good idea.
Ok, I'm a little excited about this right now. It's not every day I nuke
people's e-mail (including my own) because of a typing error. If I still feel
bad about this tomorrow, I may just submit a patch to raidstart.c :)
---------------
As a side note: Is anyone working on a resize utility for the RAID sets ? We
have the resize2fs utility for the filesystems, but it seems that such a
utility for RAID is still missing... Yes I know about LVM, and yes I still
want to resize the RAID sets :) If noone is working on it, I just might
want to look into that, no promises though.
Cheers,
................................................................
: [EMAIL PROTECTED] : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............: