A Solaris 8 Disksuite single user mode surprise
If you boot a Disksuite-using Solaris 8 machine into single-user mode
to do maintenance and do a
metastat, you'll discover that all of your
mirrored metadevices are marked as needing to be metasync'd, even if
they actually are fully consistent.
What seems to be going on is that Disksuite doesn't update things
from the on-disk metadata state database when the kernel brings
up the metadevices themselves in early boot. Instead, it defers this
until you explicitly run '
metasync -r', which is normally done in
/etc/init.d/lvm.sync, which is only run as part of going into runlevel
(At least I assume that the kernel is bringing up the Disksuite devices itself in early boot, since these machines have their root filesystem on Disksuite mirrors. I am not quite up on the black box of early Solaris boot.)
The fix is pretty simple; once you're up in single-user mode, just
remember to run '
/etc/init.d/lvm.sync start' before you start
futzing around much with the disks.
(Our experience is that it goes like lightning unless something is
genuinely troublesome, which is about what you'd expect. But check
metastat afterwards, just to be sure. You probably don't need
to do this if you're bringing a system down from normal operation into
single-user mode, just if you're booting straight into single-user
mode, but I haven't tested this to be sure.)
This makes a certain sort of sense from the right viewpoint, since it means that the system is doing as little as possible when coming up into single user mode. I have no idea how the kernel picks what to write to when it has to write to a metadevice, though. And it does mean you have to remember an extra step for most routine boots in single-user mode.
(The good news is that the excitement this caused us when we stumbled over this will probably insure that I don't forget this any time soon.)
Comments on this page:Written on 08 September 2006.