Novell is now a part of Micro Focus

Flagging GroupWise Directories as "Purge Immediate"

Novell Cool Solutions: Feature
By Sean Kirkby

Digg This - Slashdot This

Posted: 10 Mar 2005

GroupWise is a "store-and-forward" messaging system. As part of its design, various agents communicate with each other by creating small "message files". These files are generally very transient in nature. While they are small, on most NetWare systems they take up an inordinate amount of disk space, as minimum storage block sizes are typically much larger than the average GroupWise message file. For instance, most NetWare systems have a minimum block size of 64kb, while most message files are 2kb or less in size. This means that message files each take up 64kb of disk space, regardless of how small they are.

Because message files are transient, they are created and deleted usually within seconds.

NetWare file systems typically support the ability to "undelete" files that have been deleted. To support this ability, deleted files are not REALLY deleted - they are flagged as deleted, but their blocks are not actually released until the file is "purged", or until NetWare runs out of disk space - it will then begin auto-purging the oldest "deleted" files to acquire the space it needs.

This feature, combined with the number of transient message files created by a modest GroupWise system, makes for a lot of "wasted" disk space; while you COULD undelete message files, they are encrypted and compressed, and really only have usefulness in a context that has long since been destroyed.

Knowledgeable administrators highly recommend that GroupWise domain, post office, and gateway directories that contain transient message files be flagged as "purge immediate", which means that NetWare will immediately purge files in these directories when they are deleted. This prevents you from having to manually purge the volume when you need to free disk space.

However, there are literally HUNDREDS of directories that should be flagged as "purge immediate" to get this benefit from GroupWise. Manually flagging such directories is a time consuming and frustrating affair.

With the solution outlined below, you can automatically flag just the right directories in a matter of seconds.

There are two methods you can use to flag directories as "purge immediate". Both involve using the NetWare utility "flag.exe", typically found in the sys:\public directory on a NetWare server.

With the first method, you simply run the flag utility and mark ALL directories in a domain or post office directory as "purge immediate". To do this, simply execute this command.

Method 1: Flag all directories as purge immediate

To do this, just execute the following command:

flag <directory_path>\* P /S /C /DO
  • <directory_path> is the path to the domain or post office.
  • "P" sets the purge immediate flag.
  • "/S" causes all subdirectories to be processed.
  • "/C" prevents the output from pausing a screen-full at a time - it will scroll continuously until it finishes.
  • "/DO" instructs flag.exe to only set the purge immediate flag on directories. There is no point to setting the flag on individual files if the directories they are in are already flagged.

Method 2: Automate flagging of necessary directories.

While Method 1 is very simple, it suffers from being too obtuse. There are certain directories in domains and PO's that you probably DON'T want to mark as purge immediate. As an example, the <po>\ofuser directory contains important databases that are not transient at all. Marking this directory as purge immediate doesn't really get you the benefit you want or need, because very few files are ever deleted in that directory. Furthermore, if you happen to accidentally delete one or more files in that directory, you DEFINITELY want to be able to quickly undelete it. While you could restore from backup, it would be preferable to restore an up-to-date copy if possible, by simply undeleteing it. This would not be possible if the <po>\ofuser directory were marked as "purge immediate", as NetWare would immediately purge any files deleted.

As a general rule, WPCSIN\* and WPCSOUT\* directories in domain, PO, and gateway directories SHOULD be flagged as purge immediate. Other good candidates are the <po>\offiles\* directories, as well as <po>\ofuser\index. DMS directories could be marked as purge immediate, though some may suggest otherwise (BLoB files represent the contents of documents, and it could be useful to restore one if deleted).

The following Windows command file gives an example of how you can automate using flag.exe to mark only certain directories as purge immediate in a domain or PO. Of course, you can adjust it to your own needs. Some feel it would be more prudent to mark only certain directories under <dom>\wpgate, and as I mentioned, some feel it would be better NOT to flag DMS BLoB directories as purge immediate... so change it as you see fit.

@echo off
if .%1==. goto usage
if exist %1\wpdomain.db goto domain
if exist %1\wphost.db goto po
goto usage

REM =====================================
REM =====================================
@echo %1 is a domain.
if exist %1\mslocal\. (
  @echo     -- setting MSLOCAL...
  flag %1\mslocal P /c /do 
  flag %1\mslocal\* P /c /do /s 
if exist %1\mslog\. (
  @echo     -- setting MSGLOG...
  flag %1\msglog P /c /do
  flag %1\msglog\* P /c /do /s
if exist %1\wpgate\. (
  @echo     -- setting WPGATE...
  flag %1\wpgate P /c /do
  flag %1\wpgate\* P /c /do /s
goto wpcsin

REM =====================================
REM =====================================
@echo %1 is a PO.
if exist %1\ofuser\index\. (
  @echo     -- setting OFUSER\INDEX...
  flag %1\ofuser\index P /c /do
  flag %1\ofuser\index\* P /c /do /s
if exist %1\ofwork\. (
  @echo     -- setting OFWORK...
  flag %1\ofwork P /c /do
  flag %1\ofwork\* P /c /do /s
if exist %1\gwdms\. (
  @echo     -- setting GWDMS...
  flag %1\gwdms P /c /do
  flag %1\gwdms\* P /c /do /s
if exist %1\offiles\. (
  @echo     -- setting OFFILES...
  flag %1\offiles P /c /do
  flag %1\offiles\* P /c /do /s
goto wpcsin

REM =====================================
REM =====================================
if exist %1\wpcsin\. (
  @echo     -- setting WPCSIN...
  flag %1\wpcsin P /c /do
  flag %1\wpcsin\* P /c /do /s
if exist %1\wpcsout\. (
  @echo     -- setting WPCSOUT...
  flag %1\wpcsout P /c /do
  flag %1\wpcsout\* P /c /do /s
goto end

REM =====================================
REM =====================================
@echo Usage:    flagpurge.cmd  <directory>
@echo           (<directory> must be the path to
@echo            a GroupWise domain or post office)
goto end

REM =====================================
REM =====================================
@echo Done.

Sean Kirkby
President, Concentrico, Inc.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates