On 9/15/2017 10:23 AM, James Keeney wrote:
> However, I'm not sure how to switch the production cluster to explicitly
> reference the directory it currently uses. Do I need to setup the directory
> first?

To set up a *new* cloud under a chroot, you do need to create the chroot
within the ZK database as described by the documentation link you
referenced.

If you're trying to change an *existing* cloud to a chroot, then you're
going to have a lot more work, and I'm not sure that it's something I
would actually try to do.

To move an existing cloud, you would to need to find a way to duplicate
all of the SolrCloud information currently in the root of the ZK
database to another copy under a chroot directory before you begin
changing Solr installs.  If you don't do that, then there will be
nothing defined for the cloud -- no collections, shards, etc.  The
information stored locally in each Solr instance is NOT enough to
automatically reconstruct a SolrCloud database in ZK.  Some of the
information only exists in ZK.

I honestly have no idea what kind of tools you could use to copy all the
ZK data.  There are a number of tools available for connecting to ZK and
treating it like a filesystem, but I do not know if they are capable of
recursively copying entire pieces of the tree.  It would be very time
consuming to manually recreate the structure, but you could certainly do
it that way.

Because moving an existing cloud would be painful, a better option would
be to leave your existing cloud where it is (no chroot) and set up any
new clouds using a chroot so they won't interfere with the first one or
with each other.

If you really want to have both clouds using chroot, you could
potentially rebuild the original cloud from scratch, and then manually
delete all the old Solr information at the root of ZK.

Thanks,
Shawn

Reply via email to