So I think I've found where the vdev is selected for writes to take place. In
src/lib/libzpool/metaslab.c there is a function metaslab_alloc_dva(). The vdev
that is selected to write to is vdev_t vd. I'm not entirely sure how it is
selected, but I have the guid of the vdev that I don't want written to:
#define READ_ONLY_GUID 0x123456789
if(vd->vdev_guid == READ_ONLY_GUID) {
// code to select another vdev
}
I've temporarily stuck in some debug statements to see what's going on and I've
noticed that slabs are allocated on import. I was under the impression only
the vdev labels (which I don't think are objects and were written to directly)
were affected at this point. Not entirely sure why slabs are being allocated
here?
~Mike
--
This message posted from opensolaris.org