</refsect3>
</refsect2>
- <refsect2>
- <title>vacuum [<parameter>max-records</parameter>]</title>
- <para>
- Over time CTDB databases will fill up with empty deleted
- records which will lead to a progressive slow down of CTDB
- database access. This command is used to prune all databases
- and delete all empty records from the cluster.
- </para>
-
- <para>
- By default, vacuum will delete all empty records from all databases.
- If [max_records] is specified, the command will only delete the first
- [max_records] empty records for each database.
- </para>
-
- <para>
- Vacuum only deletes records where the local node is the
- lmaster. To delete all records from the entire cluster you
- need to run a vacuum from each node.
-
- This command is not disruptive. Samba is unaffected and will still be able to read/write records normally while the database is being vacuumed.
- </para>
-
- <para>
- Example: ctdb vacuum
- </para>
-
- <para>
- By default, this operation is issued from the 00.ctdb event script every 5 minutes.
- </para>
- </refsect2>
-
- <refsect2>
- <title>repack [max_freelist]</title>
- <para>
- Over time, when records are created and deleted in a TDB, the TDB list of free space will become fragmented. This can lead to a slowdown in accessing TDB records.
- This command is used to defragment a TDB database and pruning the freelist.
- </para>
-
- <para>
- If [max_freelist] is specified, then a database will only be repacked if it has more than this number of entries in the freelist.
- </para>
- <para>
- During repacking of the database, the entire TDB database will be locked to prevent writes. If samba tries to write to a record in the database during a repack operation, samba will block until the repacking has completed.
- </para>
-
- <para>
- This command can be disruptive and can cause samba to block for the duration of the repack operation. In general, a repack operation will take less than one second to complete.
- </para>
-
- <para>
- A repack operation will only defragment the local TDB copy of the CTDB database. You need to run this command on all of the nodes to repack a CTDB database completely.
- </para>
-
- <para>
- Example: ctdb repack 1000
- </para>
-
- <para>
- By default, this operation is issued from the 00.ctdb event script every 5 minutes.
- </para>
-
- </refsect2>
-
</refsect1>
<!-- UNDOCUMENTED: showban stats disablemonitor enablemonitor