My Workaround
My intuition was the same as what @estresoft suggested, to create my own sparse bundle and just point Time Machine to it. The complexity of hdiutil was intimidating to me, and fortunately I found this link with detailed instructions about using Disk Utility to do that. These are steps copied from it with my comments:
- (You can do this on either server or client. Ultimately you'll copy the sparse bundle to the network folder anyway.)
- Select File → New Image → Blank Image...
- Name the disk image in the "Save As:" and "Name" fields (this is not important as you'll be able to rename it later), then change the Image Format to "sparse bundle disk image." (this is important).
- Set the Size. (this is important of course).
- Keep the default Format and Partitions (this is important, especially the default partition is GUID, which I suspect was the root cause of the original issue), then click the "Save" button at the bottom right of the window.
- The new sparse bundle will automount. You can unmount it from within Disk Utility.
Before you move on, there is an important step to add. The generated sparse bundle has default band size 8MB. According to this link, it'll result in the number of files (bands) exceeding the max allowed in a folder, effectively limiting the size still. I couldn't get the command "hdiutil resize" to work but "hdiutil convert" works:
MBP-2010:Time Machine HD$ hdiutil convert -format UDSB -tgtimagekey sparse-band-size=16777216 -o New.sparsebundle My\ iMac.sparsebundle/
Reading Protective Master Boot Record (MBR : 0)…
Reading GPT Header (Primary GPT Header : 1)…
Reading GPT Partition Data (Primary GPT Table : 2)…
Reading (Apple_Free : 3)…
Reading EFI System Partition (C12A7328-F81F-11D2-BA4B-00A0C93EC93B : 4)…
....
Reading disk image (Apple_APFS : 5)…
....................................................................................................................
Reading (Apple_Free : 6)…
Reading GPT Partition Data (Backup GPT Table : 7)…
....................................................................................................................
Reading GPT Header (Backup GPT Header : 8)…
....................................................................................................................
Elapsed Time: 3m 12.766s
Speed: 32.7Mbytes/sec
Savings: 100.0%
created: /Volumes/Time Machine HD/New.sparsebundle
- It takes only a few minutes since the sparse bundle is empty. Otherwise it'd be a lot longer.
- Remove the old sparse bundle and rename the new one to the name you like.
- Copy it to the network shared folder if it's not already there.
Now you have two choices. You can choose to permanently mount it as a virtual disk on your client by double-clicking it, and use the command "sudo tmutil setdestination" as suggested by this link. However I found that if you rename or move the sparse bundle and want to link it again, it'd fail with an error that it's not empty. That doesn't work for me because I move or rename the backup files often and don't want to make a fresh backup everytime.
Instead I found the command "sudo tmutil inheritbackup" works the same way as adding it as Time Machine destination in System Settings:
My-iMac:Volumes$ sudo tmutil inheritbackup /Volumes/Time\ Machine\ HD/My\ iMac.sparsebundle/
Password:
Mounting disk image...
Unmounting disk image...
Inheriting disk image for machine...
Successfully inherited disk image '/Volumes/Time Machine HD/My iMac.sparsebundle'
This command seems to add the client Mac's identifier in the sparse bundle because it'd complain if there is another one for the same Mac in the same folder (you need to remove it). Now you can also rename or move the sparse bundle to a different location. Time Machine will find it (you'll need to point to new location in System Settings) and continue from what was last backed up. You could also have other Macs back up to the same folder. This is how I had planned to use network sharing.
Hope this helps.