If you are running low on disk space in the partition where PureMessage is installed, you can relocate the PureMessage quarantine and log directories to a different partition that has sufficient disk space.
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 (by default, "pmx") are indicated by the "$" prompt. The instructions assume that PureMessage is installed in the default location of
/opt/pmx. Alter the path as necessary.
Note: These steps do not apply to the PostgreSQL database; they only apply to the message stores and log directories on individual PureMessage servers.
To relocate the quarantine and log directories:
- Determine the new quarantine location
To find a location with sufficient disk space run:
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.
- Stop PureMessage
$ pmx stop
- Create and copy the quarantine
# mkdir -p /sde1/opt/pmx/var
# cp -Rp /opt/pmx/var/qdir /sde1/opt/pmx/var/qdir
# cp -Rp /opt/pmx/var/log /sde1/opt/pmx/var/log
# chown pmx:pmx /sde1/opt/pmx/var
# ls -l /sde1/opt/pmx/var
The last command above would return something like:
drwxrwxr-x 5 pmx pmx 4096 Nov 20 08:23 log
drwxrwxr-x 8 pmx pmx 4096 Nov 20 08:23 qdir
- Back up the original quarantine
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/var/qdir /opt/pmx/var/qdir.old
$ mv /opt/pmx/var/log /opt/pmx/var/log.old
- Create symbolic links to the new quarantine and log directories
# ln -s /sde1/opt/pmx/var/qdir /opt/pmx/var/qdir
# ln -s /sde1/opt/pmx/var/log /opt/pmx/var/log
# ls -l /opt/pmx/var
This command should show two symbolic links similar to:
lrwxrwxrwx 1 root other 28 Dec 15 13:11 log -> /sde1/opt/pmx/var/log
lrwxrwxrwx 1 root other 28 Dec 15 13:11 qdir -> /sde1/opt/pmx/var/qdir
- Confirm that the new and old quarantine and log directories are identical
$ diff -rc /opt/pmx/var/qdir /sde1/opt/pmx/var/qdir
$ diff -rc /opt/pmx/var/log /sde1/opt/pmx/var/log
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 above steps, or contact PureMessage support for assistance.
- Start PureMessage
$ pmx start
- Archive or delete the installation
var.old directory can be archived and removed from the machine if it is necessary to free up disk space. Also, when you are satisfied that the new quarantine is functioning correctly, you may delete the