The scrubber program deletes (scrubs) data container files from the cleartext storage pools and derived object (DO) storage pools of one or more VOBs. It also deletes corresponding (DOs) from a VOB database. Only cleartext pools and DO pools are affected; scrubbing is not defined for source pools.
scrubber implements the following scrubbing algorithms:
By default or with the –o option, scrubber uses a free-space-analysis heuristic: it compares the current free-space level of a disk partition with a lower limit computed during its previous execution. This lower limit is stored in file /var/adm/rational/clearcase/cache/scrubber_fs_info (UNIX and Linux) or ccase-home-dir\var\cache\scrubber_fs_info (Windows).
With the –f option, scrubber removes data container files from a storage pool according to the pool's scrubbing parameter settings. (The heuristic scrubbing algorithm can also fall through to this algorithm.)
When a derived object pool or cleartext pool is created with mkvob or mkpool, its scrubbing parameters are set to user-specified or default values:
Size to which scrubber attempts to reduce the pool (specified in KB; default=0) |
|
Threshold to prevent premature scrubbing of recently referenced objects (specified in hours; default=96) |
Parameter-driven scrubbing proceeds as follows:
A maximum size of zero is a special case: it instructs scrubber to delete all data containers that have not been referenced within age hours, regardless of the reclaim size setting.
With the –e option, scrubber ignores a pool's scrubbing parameters and deletes these files:
scrubber documents its work in the host's scrubber log file:
For example, the following partial report describes the results of scrubbing a derived object pool.
04/27/99 08:03:00 Stats for VOB betelgeuse:/usr1/vobstorage/orange.vbs
Pool ddft:
04/27/99 08:03:00 Get cntr tm 918.928979
04/27/99 08:03:00 Setup tm 10631.121127
04/27/99 08:03:00 Scrub tm 1207.099240
04/27/99 08:03:00 Total tm 12757.149346
04/27/99 08:03:00 Start size 404789 Deleted 3921 Limit size 0
04/27/99 08:03:00 Start files 20349 Deleted 121 Subdir dels 0
04/27/99 08:03:00 Statistics for scrub of DO Pool ddft:
04/27/99 08:03:00 DO's 3671 Scrubs 121 Strands 1760
04/27/99 08:03:00 Lost refs 1790 No DO's 20228
04/27/99 08:03:00 No fscntrs 2
The first six lines, which contain elapsed times and file statistics, are included in the report for every pool. The last four lines are specific to DO pools.
| Get cntr tm | Elapsed time for first scrubbing phase: walk the file system tree to get pathname, size, and referenced-time information for each container in the pool. |
| Setup tm | Elapsed time for second scrubbing phase: perform setup processing specific to the kind of storage pool. For a cleartext pool, no setup is required. For a DO pool, setup is complicated; see Processing of derived object pools. |
| Scrub tm | Elapsed time for third scrubbing phase: determine which containers to delete and then delete them. |
| Start size | Total size (KB) of all the container files in the storage pool directory before this scrubbing. |
| Deleted | |
| Limit size | Desired size of the pool (KB), as specified by the pool's maximum size parameter. |
| Start files | Total number of container files in the storage pool directory before this scrubbing. |
| Deleted | |
| Subdir dels | Number of empty subdirectories of the storage pool directory deleted by this scrubbing. |
| DO's | Total number of zero-reference-count DOs in the VOB database before scrubbing. |
| Scrubs | Total number of shared zero-reference-count DOs deleted by this scrubbing. (This number equals the Deleted count, unless the scrubber removed shared zero-reference-count DOs that were missing their file system containers.) |
| Strands | Total number of stranded DOs deleted by this scrubbing. (These are described below.) |
| Lost refs | Total number of lost DO reference counts deleted by this scrubbing. (These are described below.) |
| No DO's | Total number of containers in the DO pool before scrubbing that are not associated with a zero-reference-count shared DO. (Each is presumably associated with a DO that is still referenced by some view, and hence cannot be scrubbed). |
| No fscntrs | Total number of shared zero-reference-count DOs that were missing their file system containers. This statistic is printed only when this condition occurs; also, the scrubber_log displays warning messages like this one: 04/21/99 10:11:17 scrubber: Warning: Unable to remove “d/do_pool2/21/5/73f1f66679f611cea15c080009935288”: No such file or directory. |
For a DO pool, scrubber does more than delete old, unreferenced data containers.