enableAutoTierToHotFromCool Does not move from cool to hot

Angela Calborean 71 Reputation points
2021-12-17T04:17:44.423+00:00

Hello,

I have some Azure Storage Accounts (StorageV2) located in West Europe. All blobs uploaded are by default in the Hot tier and I have this lifecycle rule defined on them:

{
  "rules": [
    {
      "enabled": true,
      "name": "moveToCool",
      "type": "Lifecycle",
      "definition": {
        "actions": {
          "baseBlob": {
            "enableAutoTierToHotFromCool": true,
            "tierToCool": {
              "daysAfterLastAccessTimeGreaterThan": 1
            }
          }
        },
        "filters": {
          "blobTypes": [
            "blockBlob"
          ]
        }
      }
    }
  ]
}

Somehow the uploaded blobs are moved to cool but then after I access them again, in the portal they still appear under Cool tier. Any idea why?

Some more questions about: "enableAutoTierToHotFromCool": true:

  • does it depend on the blob size? (for example if some blobs were moved to cool and then they accessed simultaneously the time between a 1 Gib is moved back to hot is the same for 10KiB blob)
  • does it depend on the number of blobs that are accessed? (it there a queue and if multiple blobs from cool are accessed in the same time, the requests are served based on a queue order)
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,115 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Manu Philip 20,101 Reputation points MVP
    2021-12-17T05:03:31.753+00:00

    The lifecycle policy code looks fine. But note that, to minimize the impact on read access latency, only the first read of the last 24 hours updates the last access time. Subsequent reads in the same 24-hour period do not update the last access time. If a blob is modified between reads, the last access time is the more recent of the two values. In conclusion, the platform runs the lifecycle policy once a day. Once you configure a policy, it can take up to 24 hours for some actions to run for the first time. The policy actions may take up to 48 hours to complete.
    Wait for the time that Microsoft suggests as the wait period and see if it works as expected.
    So, the additional questions asked are not applicable for the life cycle policy to take effect

    0 comments No comments

  2. Angela Calborean 71 Reputation points
    2021-12-17T07:26:55.677+00:00

    Hello,
    Thank you. I am aware that the policy actions might take up to 48 hours to complete and I have waited more than 48 hours and the accessed blob is NOT moved to hot. I have tested this for multiple blobs from the same/different containers.

    0 comments No comments

  3. Manu Philip 20,101 Reputation points MVP
    2021-12-17T07:47:05.07+00:00

    Do you have any firewall rules set for Storage Account? If you enable firewall rules for your storage account, lifecycle management requests may be blocked. You can unblock these requests by providing exceptions for trusted Microsoft services as explained in the below article
    https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal#manage-exceptions


  4. Manu Philip 20,101 Reputation points MVP
    2021-12-17T07:49:37.263+00:00

    Also, add the prefixMatch parameter in the policy as indicated below:

     "prefixMatch": [
                "sample-container/log"
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.