The storage cleaner works together with compaction to reclaim unused storage from deleted snapshots. This document describes how to use the cleaner+ feature (available in the 6.0 release and newer) to reclaim storage from your filesystem.
The storage cleaner reclaims unused storage from deleted snapshots. It works together with compaction and the speed of cleaning is determined by the compaction level. Higher compaction levels will result in faster storage reclamation.
The storage cleaner has two modes:
clean=1 (standard cleaner) and
clean=2 (cleaner+). The cleaner+ is better at identifying unused storage but requires all mounts of a filesystem to use the 6.0 release or newer since it uses an extended storage format that is only available in these releases.
To enable cleaner+, use the
clean=2 mount option with compaction enabled. Verify that all other mounts of this filesystem are running the 6.0 release or newer.
This section outlines the steps you can use to speed up the storage reclamation process using a dedicated cleaner+ mount.
Before you begin: We recommend having a current backup of your filesystem before proceeding with the steps below.
Start an EC2 spot instance in the same region as your S3 bucket.
CACHESIZE) (default: 20% of server memory) is at least 320MB for smaller filesystems and at least 1GB for very large filesystems.
Mount your filesystem using the 6.0 release with cleaner+ enabled (
clean=2), highest compaction level (
noatime on the spot instance.
noratelimit option is needed for compaction levels 4 and 5.
You can check the starting line of the objectivefs log to verify the mount options have taken effect. The starting line should contain
$ sudo mount.objectivefs -o clean=2,compact=5,noratelimit,noocache,nosnapshots,noatime <filesystem> <directory>
Upgrade all other mounts of this filesystem to the 6.0 release for the cleaner+ to activate.
CLEAN field in the objectivefs log shows the cumulative storage reclaimed by this mount since it was mounted.
The first time the cleaner+ is used on an existing filesystem, it needs to gather information about the state of the objects. It may take some time before the storage reclamation starts especially on large filesystems.
During active storage reclamation,
df -h output of the mount may report slightly higher storage than the actual amount used. To get the current storage size, you can run
df -h on a fresh read-only mount with
$ sudo mount.objectivefs -oro,noocache <filesystem> /ofs_readonly $ df -h
The rate of storage reclamation depends on the filesystem size, amount of reclaimable storage, EC2 instance bandwidth and other factors. We recommend running the spot instance with cleaner+ and maximum compaction for several days and monitor the progress. Larger filesystems may require longer to reclaim the storage.
For filesystems that are 10TB or smaller, we suggest running only one mount with
compact=5 and cleaner+. The other mounts can run with default compaction level (or at most level 3).
For fastest cleaning, we suggest keeping the mount with cleaner+ running continuously and avoid restarting this mount.
ObjectiveFS is backwards and forward compatible. You can run mixed versions of ObjectiveFS and do a rolling upgrade. The cleaner+ feature will only activate when all mounts of the filesystem are running the 6.0 release due to the extended storage format.
by ObjectiveFS staff, January 25, 2019
ObjectiveFS is a shared file system for OS X and Linux that automatically scales and gives you scalable cloud storage. If you have questions or article idea suggestions, please email us at email@example.com