Having suffered for many hours in search of a solution, I decided to share the method found with Habr's readers.

Time Machine stores all backup copies in a “growing disk image”, the physical size of which in the location takes up exactly as much space as the data in it occupies. Such an approach saves us from having to break up the storage into sections - one by one for different purposes - all image-packages are stored on the same physical partition, consuming megabytes and gigabytes only when necessary. It is convenient when you do not know in advance what size to allocate for a particular task.
A useful feature of the “growing disk image package” is setting a limit on its maximum size. When you first start Time Machine creates a package image with a limit equal to the entire capacity of the partition on which it will be located. And when the free space is exhausted, old backups simply start to be deleted. Prior to Mac OS X 10.6.3, there was a way to change this limitation with the
hdiutil utility. For example, the following line sets the limit for the maximum size of a package image to 500 GB:
hdiutil resize -size 500G -shrinkonly /Volumes/Data/macbook.sparsebundle
However, with the update 10.6.3, Time Machine every time it started it began to automatically change the parameters of the image package, restoring the size of the limit to the default value (that is, to the maximum) in case it was changed or the media capacity changed.
')
There is still no official solution to the problem from Apple. The solution is another trick - to
block changing the parameters of the image package after installing the necessary size limit for it.
It should be noted that the image parameters are stored in the image itself in the
Info.plist and
Info.bckup files . And in order to block changes in parameters, it is necessary to block changes to these files. I’ll say right away that a simple write ban with
chmod does not work. But another method works (10.8.2) - locking files using the
SetFile utility:
SetFile -a L /Volumes/Data/macbook.sparsebundle/Info.*
After executing this command, Time Machine will no
longer be able to change image parameters:
SetFile is not included in the standard set of Mac OS X utilities and is installed by installing the Xcode application and the optional Command Line Tools component:

To be able to change the image parameters again, it is necessary to remove the lock (we use the same arguments with the only difference that instead of the capital letter “L” we put its uppercase version - “l”):
SetFile -al /Volumes/Data/macbook.sparsebundle/Info.*
PS: A method was found while studying
this discussion .