tech-kern archive

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

Re: How to hot swap an SCA SCSI disk with NetBSD



> What is the specific sequence of NetBSD commands to execute in order to succ$

It depends on the hardware.

If the hardware is hot-swap, then I'd just unmount (or whatever),
scsictl detach, unplug, replug, scsictl scan, remount (or whatever).

If the hardware is not hot-swap, it's iffier; you pretty much have to
guarantee that the bus is quiet during unplug and replug.  Connecting
or disconnecting a device while another device is wiggling the lines is
a recipe for errors.  Personally I usually L1-A the machine to ddb to
do that, unless it's not the primary SCSI bus, in which case I can
often just unmount and detach everything.  The sequence is the same,
except that whatever you do for bus quiescing applies around the unplug
and replug operations.

Of course, if the hardware is not hot-plug, there is some chance that
hot-plugging could damage something.  Personally, I consider that risk
small enough to ignore in most cases - all I've run into so far - but
it's something to at least keep in mind.

> Please specifically discuss issues relating to differing disklabels, both on$

I have never needed to pay any specific attention to this; presumably
the device-tree data structure destruction and recreation implicit in
scsictl detach and scsictl scan handles it.  If I really need to poke
disklabels, I usually use sunlabel (or bsdlabel when not using Sun
labels), which has a command to set the kernel's live label as well as
a command to write the label to the drive.  (Indeed, in a few cases
I've set the kernel label and specifically _not_ written it to the
disk, when I'm doing some kind of transient hackery.)

And, of course, I don't know how this may have changed in post-5.x
NetBSD; you don't say which version(s) you care about.  But I think
everything I wrote above is basically the same all the way from 1.4T
through 5.x, so it seems to me it's _probably_ the same post-5.x.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index