netatalk.io

Limiting Time Machine volumes

Limiting the available size of Time Machine volumes

With the help of a Netatalk configuration option vol size limit 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 backup data 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 seconds which results in a tremendous slow down of Time Machine 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.

Historical Note

With OS X 10.6.3 it’s not possible anymore to limit the size of TM backups by precreating the TM image with a fixed size.

With the OS X 10.6.3 Update Apple has introduced a new feature into TimeMachine: as soon as TM starts up and mounts the AFP volume with the TM image, it checks whether the image size matches the sizes of the underlying AFP volume. If the image is smaller, it gets resized to the size of the AFP volume. Therefore it’s not possible anymore to limit the size of TM backups by precreating the TM image with a fixed size.

The upcoming release of Netatalk 2.1 will have a new volume option volsizelimit which can be used to present the AFP client a fake volume size.

Author

Ralph Böhme

Published on

December 1, 2011

Footnotes

This is a mirror of the Netatalk GitHub Wiki. Please visit the original page if you want to correct an error or contribute new contents.

Last updated 2025-08-30