What happens to simultaneous writes to disk when disk snapshot is in progress?

Archana Himane 0 Reputation points
2023-05-04T02:17:19.71+00:00

What happens to simultaneous writes to disk when disk snapshot is in progress?

Does it lock disk writes for a while?

Does it cache the write requests until snapshot is in progress and then completes the write?

It looses the write operation if snapshot is in progress?

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
572 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Jackson Martins 9,646 Reputation points MVP
    2023-05-04T02:23:00.3766667+00:00

    Hi

    Taking a disk snapshot in Azure does not result in locked disk writes, cached write requests, or loss of write operations. The virtual machine can seamlessly continue writing to the disk without any interruptions while the snapshot is being created


  2. Sumarigo-MSFT 43,641 Reputation points Microsoft Employee
    2023-05-04T07:41:49.7933333+00:00

    @Archana Himane When a disk snapshot is in progress in Azure, write operations to the disk are not locked, but some precautions need to be taken to ensure data consistency.

    To create a disk snapshot, Azure takes a point-in-time copy of the disk by creating a crash-consistent snapshot of the underlying storage. This means that the snapshot reflects the state of the disk at the time the snapshot was created, but it may not include in-flight writes that were not committed to disk at the time of the snapshot.

    Azure provides several mechanisms to ensure data consistency when a disk snapshot is in progress.

    One mechanism is to use a file system that supports atomic writes, such as NTFS, to ensure that data is written atomically to disk. This can help to ensure that writes are either fully committed or not committed at all, so that there are no incomplete writes at the time the snapshot is taken.

    Another mechanism is to use Azure Backup or Azure Site Recovery to create consistent snapshots that take application-aware backups. These backups can ensure that applications are quiesced and writes are flushed to disk before the snapshot is taken.

    In general, it's recommended to avoid write-intensive operations during the snapshot creation process, as they can impact the performance of the disk and potentially cause data inconsistencies in the snapshot. If you need to perform write-intensive operations, it's recommended to create a new disk and attach it to the VM, rather than using the existing disk, to avoid impacting the snapshot.

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments