Hi @sakuraime , welcome to Microsoft Q&A forum.
While we provision Azure SQL managed instance, we basically get 2 storage limits:
- User Defined Storage: This is what we choose on the Azure portal while provisioning the instance and this is what customer is paying for. Maximum size here cannot exceed 8TB
- Internal physically allocated azure premium disk storage that cannot exceed 35 TB
Now these Azure premium disks come with fixed sizes of 128 GB, 256 GB, 512 GB and so on, and to place the database file on these disks, minimal disk size is choosen that is required to fit the database file with any size.
Example: 100 GB file will be placed on 128 GB disk while 500 GB file will be placed on 512 GB disk.
Lets consider a scenario where we have one 2 TB file and 248 files with size of 1 GB. So total storage size would be (1 * 2 TB + 248 * 1 GB) = 2.2 TB.
But the space allocated on premium disk will be (1 * 4 TB + 248 * 128 GB) = 35 TB. This illustrates that under certain circumstance, due to a very specific distribution of files, a Managed Instance might reach the 35 TB reserved for attached Azure Premium Disk when you might not expect it to and the storage size is still 2.2 TB.
Please refer to below 2 articles that I have referenced for above details and have very detailed description about the same.
https://medium.com/azure-sqldb-managed-instance/file-layout-in-general-purpose-azure-sql-managed-instance-cf21fff9c76c#
https://techcommunity.microsoft.com/t5/azure-sql/reaching-azure-disk-storage-limit-on-general-purpose-azure-sql/ba-p/386234
Please let me know if this helps or we can discuss further on the same.
----------
Please select 'Accept Answer' if it helps as this could help other community members having similar queries.