PureMessage for UNIX: how to relocate the PureMessage installation to another disk

  • Article ID: 24828
  • Updated: 14 Jul 2011

If you need to move the PureMessage installation from one partition or disk to another (for example, due to a lack of space or a disk failure), either re-install PureMessage or move the existing installation, and create a symlink in the original location that points to the new location. The symlink is necessary to preserve the integrity of the path to perl, which is set in PureMessage programs and utilities during installation (that is, #!/opt/pmx/bin/perl -w).

If disk space is the concern, then you may prefer to simply relocate the quarantine and log directories because these two directories account for the greatest disk usage. For instructions, please refer to the Knowledgebase article How to relocate the quarantine and log directories.

What to do

In the steps below, operations that must be performed by the root user are indicated by the " # " prompt. Operations that must be performed by the PureMessage user are indicated by the " $ " prompt. The instructions assume that PureMessage is installed in the default location of /opt/pmx. Alter the path as necessary.

To relocate the PureMessage installation to another disk:

  1. Determine the new quarantine location

    To find a location with sufficient disk space run:

    # df

    This command returns output similar to the following:

    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sda1 2695992 2303112 255928 90% /
    /dev/sdb1 4127076 3541340 376092 91% /sdb1
    /dev/sdc 4127108 3720776 196684 95% /sdc1
    /dev/sdd1 4127076 2064668 1852764 53% /sdd1
    /dev/sde1 4127076 2237552 1679880 58% /sde1

    In this example, the /dev/sde1 filesystem has sufficient free space for the quarantine and log.

  2. Stop the mail transfer agent (MTA) and then PureMessage

    If you are using a mail transfer agent (MTA) that was not included with PureMessage, you may need to consult your MTA's manual. You may also need to run the command(s) as root.

    $ pmx-service stop smtp
    $ pmx stop

  3. Create and copy the installation.

    # mkdir -p /sde1/opt/
    # cp -Rp /opt/pmx /sde1/opt/pmx
    # chown root:pmx /sde1/opt/pmx
    # ls -l /sde1/opt/pmx/var

  4. Back up the original installation

    Before running this command, ensure that you have sufficient disk space to keep a backup copy of the log and quarantine directories in /opt/pmx. If not, use an alternative location.

    $ mv /opt/pmx /opt/pmx.old

  5. Create a symbolic link to the new installation

    # ln -s /sde1/opt/pmx /opt/pmx

    And then, run

    # ls -l /opt/pmx

    This command should show a symbolic link similar to:

    lrwxrwxrwx 1 root other 28 Dec 15 13:11 pmx -> /sde1/opt/pmx

  6. Confirm that the new and old directories are identical

    $ diff -rc /opt/pmx /sde1/opt/pmx

    This command will return nothing if the directories are identical. (New log entries may get written to the new log location during this procedure; these can be ignored.) If the command reports any other differences between the directories, do not proceed. Instead, repeat the steps above, or contact PureMessage support.

  7. Start PureMessage and then the MTA

    $ pmx start
    $ pmx-service start smtp

    If you are using an MTA that was not included with PureMessage, you may need to consult your MTA manual. You may also need to run the command(s) as root.

  8. Archive or delete the installation

    The pmx.old directory can be archived and removed from the machine if it is necessary to free up disk space. Alternatively, when you are satisfied that the new quarantine is functioning correctly, you may delete the pmx.old directory.

If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent