compact

Compact online and offline disk-stores.

compact disk-store

Compact a disk store on all members with that disk store. This command uses the compaction threshold that each member has configured for its disk stores. The disk store must have the "allow-force-compaction" property set to true.

See Running Compaction on Disk Store Log Files for more information.

Availability: Online. You must be connected in gfsh to a JMX Manager member to use this command.

Syntax:
compact disk-store --name=value [--group=value(,value)*]
name Required. Name of the disk store to be compacted.
group Group(s) of members that will perform disk compaction. If no group is specified, then the disk store will be compacted by all members.

Example Commands:

compact disk-store --name=Disk1
compact disk-store --name=Disk1 --group=MemberGroup1,MemberGroup2
Error Messages:
"Disk store \"{0}\" does not exist.";
 " for group(s) \"{0}\"";
"No members found in the specified group(s) \"{0}\".";
"Compaction was attempted but nothing to compact.";
"Error occurred while doing compaction. Reason: \"{0}\"";

compact offline-disk-store

Compact an offline disk store. If the disk store is large, additional memory may need to be allocated to the process using the --J=-Xmx??? parameter.

See Running Compaction on Disk Store Log Files for more information.

Note: Do not perform offline compaction on the baseline directory of an incremental backup.

Availability: Online or offline.

Syntax:
compact offline-disk-store --name=value --disk-dirs=value(,value)* 
[--max-oplog-size=value] [--J=value(,value)*]
name Required. Name of the offline disk store to be compacted.
disk-dirs Required. Directories where data for the disk store was previously written.
max-oplog-size Maximum size (in megabytes) of the oplogs created by compaction.
J Arguments passed to the Java Virtual Machine performing the compact operation on the disk store.
Example Commands:
compact offline-disk-store --name=Disk2 --disk-dirs=/Disks/Disk2
compact offline-disk-store --name=Disk2 --disk-dirs=/Disks/Disk2 --max-oplog-size=512 -J=-Xmx1024m