netatalk.io

[TN#008] Limiting the available size of Time Machine volumes

Author
Ralph Böhme
Published on
December 1, 2011

With the help of a Netatalk configuration option (volsizelimit) it is possible to limit the available space of AFP shares.

The implementation of this feature received an important change in the release of Netatalk 2.2.1-p7, such that it is now not supported to store any other data besides the Time Machine backupdata on these AFP shares.

Details:

In prior versions the space usage of the AFP volumes was calculated by recursively walking the whole filesystem and stating every filesystem object for size information. Although the resulting value was cached for some time, for large volumes and low power hosts the process might take up to 60 s seconds which results in a tremedous slow down of TimeMachine operation.

Starting with Netatalk 2.2.1-p7 the calculation works as follows:

The Info.plist XML file of the sparsebundle is searched for the band size of the Time Machine sparse-bundle, then reading the bands/ directory counting the number of band files, and then multiplying one with the other. The resulting value is cached for 60 seconds and updated by the amount of new written data.