Or indeed it may have no metadata at all - it may be a fresh disc. I
didn't see that you stated this specifically at any point, though it was
there by implication, so I will: you're going to have to pick up hotplug
events for bare drives, which presumably means you'll also get events
for CD-ROM drives, USB sticks, printers with media card slots in them etc.
Indeed, I would like to be able to declare any
/dev/disk/by-path/pci-0000:00:1f.2-scsi-[0-4] to be suitable candidates
for hot-plugging, because those are the 5 motherboard SATA ports I've
hooked into my hot-swap chassis.
As an aside, I just tried yanking and replugging one of my drives, on
CentOS 5.4, and it successfully went away and came back again, but
wasn't automatically re-added, even though the metadata etc was all there.
Definitely want this for bare drives. In my case I'd like the MBR and
first 62 sectors copied from one of the live drives, or a copy saved for
the purpose, so the disc can be bootable.
My concern is that this is surely outwith the regular scope of
mdadm/mdmon, as is handling bare drives/CD-ROMs/USB sticks. Do we need
another mdadm companion rather than an addition?
Definitely, just so I can pull a drive and plug it in again and point
and say ooh, everything's up and running again, to demonstrate how cool
Linux md is. I imagine some distros' udev/hotplug rules do this already,
almost by default where they assemble arrays incrementally.
I think in my situation I'd quite like the first partition, type fd
metadata 0.90 RAID-1 mounted as /boot, added as an active mirror not a
spare, again so that if this new drive appears as sda at the next power
cycle, the system will boot.
The second partition, a RAID-5 with LVM on it, could be added as a
spare, because it would then automatically be rebuilt onto if the array
was degraded.
[...]
I'm afraid I have nothing to add here, it all sounds good.
Cheers,
John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html