Disksuite - Should mirror state be ok before S98SUNWmd.sync?
John Navitsky
john@serv.net
Thu, 26 Mar 1998 17:02:25 GMT
On Thu, 26 Mar 1998 06:08:02 -0800, "Philip A. Kufeldt" <pak@harbor.net> =
wrote:
>No one answered this, so I'll stick my neck out. My answer comes from =
engineering
>experience with VERITAS Volume Manager and I can only assume that SDS =
deals with
>mirrors in the same fashion.
Hi Philip. I have gotten a few emails directly. I was waiting to see if=
I get
any more feedback before I summarized. Thanks for throwing this out =
though.
>Once a mirror device is opened (ie a DB open the devices, it gets =
mounted, etc), it
>is functionally dirty and marked as so. The reason I say functionally is=
that it may
>not be actually dirty. In fact, after I open the device even though I =
have not done
>a single I/O it is still marked as dirty. The only time the device would=
be marked
>clean is if the device had been completely closed. This because the =
designers chose
>to do their accounting at device open/cose time instead of I/O =
start/completion.
>And it only makes sense, right?=20
Sounds good, but I would assume at system shutdown you could and would =
tidy
things up (sync and mark as clean).
>The device state must be stored persistently so that
>after any reboot event (init 0, panic, etc) it knows the state of the =
device.=20
I thought the state databases served this purpose.
>This
>means to dirty or clean a device you must do I/O to save this state. So =
it does not
>make sense to dirty/clean a device for each I/O.
Agreed.
>So my guess is that during tests you probably have the device mounted =
which equates
>to an open and consequently a dirty device. If it is not unmounted then =
the state
>will be dirty at reboot.
Seems to go with what I am seeing. I'll have to try to unmount a device =
and see
if it is clean on startup.
>As far as remirroring is concerned, even if the device is dirty (needs =
a resync)
>you should be able to read and write to it providing that mirroring code=
does the
>right thing.=20
This is true. The devices work fine even though they indicate they need =
maint.
>Remember, that when recovering a dirty mirrored device that there is no
>correct mirror ( I could go into the proof of that but I won't for now, =
I just say
>it is so).
Agree.
>So picking one side to exclusesively do reads from and writing to both,
>is correct. The big thing you want avoid while the mrror is out of sync =
is doing two
>identical reads and returning different data. So picking one mirror for=
reads will
>prevent that. Now that you can do I/O, the resync can begin at any =
time reading
>from the selected mirror and writing to the other.
I didn't see anything in the "metastat" output that indicated that it was=
only
using one device, but this makes sense. It's probably something they =
don't
think is important for you to know, although I can think of a few cases =
where it
might be helpful or even necessary to know which device it is using. I =
should
probably check and see if I just missed it.
Thanks for the feedback.
-john