Mounting a folder to the docstore

You can mount file system directories to the docstore and then manipulate the directories with script operations or Java™ API. The docstore acts as a mount point and does not physically store the directories and files, which reside in the file system.

About this task

The mount manager does not start with the start of the application server. Instead, you need to manually log in to the user interface post that the mount manager daemon starts and then the file system is mounted onto the docstore.

Procedure

  1. Stop the server instance.
  2. Enable the mount manager. In $TOP/etc/default/common.properties set enable_mountmgr=true to enable the mount manager to mount the local file system to the docstore. Also set mountmgr_daemon_sleep_time=1000 to set the interval after which mount manager scans the local file system for any changes to reflect in the docstore.
    While you are scanning, mount manager looks for files that do not exist in docstore and loads such files into the docstore. If the last modified time stamp of a file on the file-system has changed, then it loads that file again to the docstore. In addition to LAST_MODIFIED_TIMESTAMP, another attribute FILESYSTEM_TIMESTAMP is saved for each file, and the value of which is set to the modified timestamp of the real file. This attribute is used to check whether the file on the file system is modified to load it again in the docstore.
    If you set the attribute mountmgr_daemon_sleep_time to less than 1 minute, then that value is ignored and 1 minute is used as the default sleep time. This is to avoid unexpected results.
  3. Create a folder ./usr/local/TestMount/ on the Linux® or UNIX server file system.
  4. Mount the file system directory. Open the $TOP/etc/default/docstore_mount.xml file on the server that is running the IBM® Product Master instance and add the following line to the file:
    <mnt doc_path="/TestMount/" real_path="/usr/local/TestMount/" inbound="yes" />
    Where:
    doc_path="/TestMount/”
    Is the folder in the docstore under which you view the folder of the mounted local file system.
    real_path="/usr/local/TestMount/"
    Is the folder from the local file system that you are going to mount.
    inbound=”yes"
    Specifies the behavior. If inbound="no", files are exported to the file system from the docstore.
    If inbound=”yes”, files are imported into the docstore. Also, if any files are added, deleted, or changed on the local file system outside Product Master, docstore reflects those changes in the Document Store.
  5. Start the server instance and log in to Product Master. Go to the docstore and click the TestMount directory. You see your folder structure.