open-semantic-search icon indicating copy to clipboard operation
open-semantic-search copied to clipboard

How to move the index data to another partition or disk?

Open tt2000 opened this issue 4 years ago • 2 comments

I'm using the .deb package to install OSS. After that, the index is stored at /var/solr/data/ (currently two subfolders). What is the best or at least a working way to move the index to another location?

If it is not possible after the installation, I'm also open to modify the .deb package and install it again on a fresh system.

tt2000 avatar Nov 25 '20 15:11 tt2000

I think we need a bit more information here. I guess that you have the system running, and now you want to give /var/solr/data its own space instead of taking up room in /var.

You could more the content to another location and do a symlink. That's probably the worst possible solution, but it's quick.

You could move /var/solr to /var/solr2, then create a new /var/solr and use it to mount a physical device, then mv /var/solr2/* /var/solr/

I use ZFS for this sort of thing on my systems. It will soft mirror disks and cache spindles using SSD. It it a powerful tool, but learning it is non-trivial.

NetwarSystem avatar Dec 16 '20 13:12 NetwarSystem

I have the system running, but I still have the opportunity to reinstall everything from scratch, if necessary. My goal is to setup OSS in a way that it does not fill up the system disk. Thus I want it to use another disk for index data.

I found hints in a config file (/etc/default/solr.in.sh) to specify that location (SOLR_DATA_HOME), but changing it and moving the current index files, does not seem to be a valid migration. At least some web services come up faulty.

I was/am looking for a solution to specify a new location. But redirecting the current location seems like a valid solution to me, too. I'm going to mount the disk at /var/solr as you suggest, but I'm still open for solutions to move the location by configuration.

tt2000 avatar Dec 16 '20 14:12 tt2000