Compact Disk Persistence Files with Persistence Service Offline
Use the FTL administration utility to compact persistence files for a given persistence service when the persistence service is offline and not running. An error results if you invoke the utility while the persistence service is running. For details on compacting disk persistence files while the persistence service is running, see Compact Disk Persistence Files with Persistence Service Online.
The utility must be invoked once for each persistence service.
A sample command line follows:
tibftladmin --compact_offline --name <name> --datadir <path>
When complete, the file will be smaller, depending on how much disk space was reclaimable.
Running the compaction tool can be advantageous if there is large difference between allocated disk space and inuse disk space.
See Catalog of Persistence Metrics, 3013 Disk Size and 3019 Disk In Use Size. Also see the GET persistence/clusters/<clus_name>/servers log for disk_size
and disk_inuse_size
.
Compaction During Downtime Procedure
Use this procedure for compaction during downtime:
-
Shutdown all persistence services.
-
Use the
tibftladmin
utility to compact all files for all persistence services. -
Restart all persistence services.
Compaction During Rolling Upgrade Procedure
Use this procedure for compaction during a rolling upgrade:
-
Shutdown one persistence service.
-
Use the
tibftladmin
utility to compact only the files for the one persistence service. -
Restart the persistence service and wait for the persistence cluster to form a quorum and sync.
-
Repeat for the remaining persistence services.
Alternative to Online Compaction Procedure
If online compaction is impractical because the disk is nearly full or some other reason, use this alternative compaction procedure.
Shutdown one persistence service.
-
Copy the data directory for this persistence service to a different location.
-
Use the
tibftladmin
utility to compact the files at the new location. -
Copy the data directory back to the original disk, replacing the old data directory.
-
Restart the persistence service.