Re: Auto Rebuild on hot-plug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 30, 2010 at 6:18 PM, Neil Brown <neilb@xxxxxxx> wrote:
> On Wed, 24 Mar 2010 19:47:59 -0700
> Michael Evans <mjevans1983@xxxxxxxxx> wrote:
>
>
>
>> I believe that the default action should be to do /nothing/.  That is
>> the only safe thing to do.  If an administrative framework is desired
>> that seems to fall under a larger project goal which is likely better
>> covered by programs more aware of the overall system state.  This
>> route also allows for a range of scalability.
>
> I agree that /nothing/ should be the default action for a device with
> unrecognised content.
> If the content of the device is recognised, it is OK to have a default with
> does what the content implies - i.e. build a device into an array.
> But maybe that it what you meant.
>
> I think there is useful stuff that can be done entirely inside mdadm but it
> is worth thinking about where to draw the line.  I'm not convinced that mdadm
> should "know" about partition tables and MBRs.  Possible the task of copying
> those is best placed in a script.
>
> Thanks,
> NeilBrown
>

My larger context was looking at non-recognized devices; assembling
pre-marked containers is fine.  With the provision that pass basic
safety checks validate that outcome; is the uuid correct, does the
home-host match the current array, is the update count valid (or else
add as a prior stale member that should be marked as hot spare).

For anything else mdadm might be better off taking the approach that
an administratively selected set of actions should be performed.  If
the task is JUST doing stuff that mdadm would already be invoked to do
anyway then it is tolerable for those reactions to be configurable
within the .conf file, though I fear the syntax may be uglier than
assuming there's also at least a basic /bin/sh that could interpret a
set of more standard commands.  It would also provide a good example
to extend in to custom scripts.

Another advantage of using a shell script instead is that
administrators can hack in whatever tricks they want.  If they have a
partition tool or method they like they can script it and get the
results they want.  More complicated tricks could also be performed,
such as first preparing the disc for cryptographic storage by filling
it with random data, or performing SMART checks, or any other
operation of their choice.

Alternatively, if an administrator or device maker needs something
different they could produce a binary to run instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux