Azure disk replication across VMs - azure

In Azure, is it possible to have master VM that writes to a disk which has read-only slave replicas on other VMs?
Our app needs to download ~100GB of files when scaling to a new VM. This is loaded slowly from an external provider but we want to make it available quickly when we scale out more VMs.

I don't think you can do streaming replication (which I think is what you're asking for), or read only slave through the Azure service without implementing this yourself over network or through a relational database management system.
As of this writing, one disk cannot be connected to multiple Azure VMs (See FAQ for Managed Disks. One option would be to create a snapshot of the disk, and create a new disk from the snapshot. You could automate this via the Azure Managed Disk Service API (eg: an Azure Powershell script), and it would have to happen on a VM that isn't running.

If your data is same and doesn't change per new VM created then you can have it stored on the Azure File Storage Standard/ Premium. Then have Azure File storage attached to every new VM whenever it is created. snapshot disk will make it pretty complex. Azure Files Storage is good choice in this scenario.

Related

Azure back up vs Snapshots

I'm an azure newbie and just trying to understand Azure better. My questions are specific to backing up Linux VMs in Azure. Please help me in understanding it better.
I read that Azure backup takes snapshots and then uploads them to the vault. I'm trying to understand how using 'Azure backup' to backup a VM is different from taking the snapshots of OS Disk and data disk of azure VM via "az vm" cli commands?
What exactly is the vault here? Is it internally implemented as a storage account with blob container or is it something similar to the Glacier in AWS?
Which is better cost wise, azure backup or osdisk snapshots?
If both the options are similar, i.e using azure backup or taking a snapshot of OS disk/Data disks. Is there an advantage of using one over the other?
Are the Snapshots of OS disk taken in Azure global in nature? Can they be accessed from any other geos?
In the azure portal, snapshots, what is "snapshot state"? Why is the snapshot state "Unattached" for me even after spinning off a VM from the snapshot disk?
I'm trying to understand how using 'Azure backup' to backup a VM is different from taking the snapshots of OS Disk and data disk of azure VM via "az vm" cli commands?
Azure backup works as disaster recovery service(DRaaS). It is a managed service and more easier to use. You don't need to worried where and how the backup files are stored. If the VM is running, Azure Backup service uses the VMSnapshotLinux extension to take a point-in-time snapshot in Linux. Otherwise, the Backup service takes a snapshot of the underlying storage.
What exactly is the vault here?
A backup vault is an managed storage service that stores all the backups that have been created over time. It also contains the backup policy applied to the protected VMs.
Is it internally implemented as a storage account with blob container or is it something similar to the Glacier in AWS?
It is a managed service, it hasn't been announced how it is worked.
Which is better cost wise, azure backup or osdisk snapshots?
Azure backup has extra charge than the storage consumed charge. For more information, link below is for your reference.
Backup Pricing
Is there an advantage of using one over the other?
If you want to take a snapshot and the VM is running, we suggest you shutdown the VM first to take a clean and consistent snapshot. Azure backup service will use a extension to do it, we don't need to shutdown the VM.
Are the Snapshots of OS disk taken in Azure global in nature? Can they be accessed from any other geos?
A snapshot is a read-only blob, it can be accessed from any other geos.
In the azure portal, snapshots, what is "snapshot state"?
The 'Unattached' is the state of image/disk. It means that the disk haven't attached to any VM.

How to remove azure snapshots (Restore points)

I'm a lone dev that inherited a giant undocumented mess of an azure vm without any sysadmin-like training nor a lab to test things out. This vm runs our website just fine, but I couldn't log in to VestaCp because disk space usage is at 100%.
I did setup azure to make daily backups. Now I'm wondering if azure somehow stores them on the same machine e.g. they're the cause of the full disk space.
if so, how do I remove a set of old backups?
Now I'm wondering if azure somehow stores them on the same machine e.g. they're the cause of the full disk space.
As mentioned in the official document about creating a recovery services vault for a VM:
The location of Recovery Services vault determines the geographic region where your backup data is sent.
If you have virtual machines in multiple regions, create a Recovery Services vault in each region.
There is no need to specify the storage accounts used to store the backup data--the Recovery Services vault and the Azure Backup service automatically handle the storage.
Per my understanding, your VM backup data could be stored on the storage accounts that are managed automatically by the Recovery Services vault (ARM) and the Azure Backup service (ASM).
Moreover, if this issue could not be solved by removing a set of old backups, I assumed that you could follow this tutorial to resize Azure VM OS or Data Disk created using Azure Service Manager (ASM) or this tutorial for resizing ARM VM OS & Data disk.

I would like to change Microsoft Azure Virtual Machine size without losing my data

I am using two Microsoft Azure Virtual Machines (marked as classic), both running on Linux. One is used for test purposes and internal demos, the other is production and running few of clients' instances.
What I would like to do is change the size of Virtual Machine. I understand this is quite common process and can easily be done from the Azure Management Portal and that this is not affecting data. However, when I have changed the size of our testing machine, exactly this has happened and we have lost all data.
Azure Support answer received was:
"We recommend you delete the VM by keeping the attached disks and create a new VM with the required size." Not sure why this would be better?
Any data stored on the ephemeral (internal-to-chassis) scratch disk is at risk, as it's a non-durable disk (and will in all likelihood be destroyed/recreated upon resizing a VM).
The only way to have durable data is to use Azure Storage (blobs, vhd as attached disk, Azure File storage) or external database. Azure Storage is durable (minimum 3 copies), and is not stored with your VM.
One more thing: The VM's OS Disk is a VHD in Azure Storage (so the OS disk is durable, just like attached vhd's).
You have more than one way to do that and keep in mind what David said, data on OS disks, attached disks and blobs is the only durable one.
To prevent losing data and since you're using Classic VMs, you can do the following:
1- Go to your VM on portal and capture an image out of it.
2- Go to your new image and create a new VM out of it, while specifying the new specs that you need.
3- When done, connect to your new VM while keeping the old one without termination.
4- Check if all your data is there, if yes, then you can remove the old one. (In case you need the old IP, you can still assign it to the new one).
Cheers.

Questions on sharing SQL Server on VM and making it accessible to various other VM

Is it possible to create a Azure VM (medium or large) running an instance of SQL Server. This machine would contain various databases (one of each client). These databases would then need to be accessible from different Azure VM's which would be hosting either a single website per vm or multiple website per vm each requiring to access different databases.
If it is possible:
How do the other Azure VMs connect to the relevant VM that's running SQL server and connect to a specific database?
What cost implication are there? We store a lot of data including documents as blobs.
Our software supports both storing the documents as blobs or as actual files. Should we consider storing the files directly onto the hard drive instead of storing them in the database? Would this improve performances when running on Azure VM and/or reduce cost?
What's the recommended solution for backup? I assume that Azure VM can go down, though less likely, just like any other machines. What the recommended solution to restore a back?
Same for SQL Server. What is the recommended solution to backup database. Since we'd be running a full version of SQL on a Azure VM, is the best solution to have a separate storage drive and backup databases on this?
Thanks.
1-)You can create a Virtual Network and after that, create your VM's and set them to use this virtual network. Doing that, your vm's would call the vm with your sql server.
2-) You'll be billed for network, storage and vm compute (including vm size). The best you can do is create a vm and test for a little (with this settings). So you'll know how much your are spending.
3-) When you create a vm, the vhd is stored in a storage account. There's a backup for that, but you can download the vhd and make a version of that on premises.
4-) My suggestion, attach a extra disk to your VM and use it to SQL Server Backup.

Disaster Recovery for azure virtual machines using geo-replicated storage

We are using Azure Virtual machines to host our application in the cloud.
Couple of virtual machines are hosting web front-end(state-less) and one virtual machine is hosting SQL Server (data is stored in Data Disk).
As we all know, these virtual machines consist of OS Disk and Data Disk(optional) which uses VHD files stored in blob storage. We are using geo-redundant blob storage which stores these VHD files.
We are now planning for disaster recovery for our cloud application. So if a Microsoft data center is down, is it possible to spin up virtual machines in another data center with the help of OS Disk and Data Disk stored in geo-replicated storage?
You are not supposed to use geo-replicated storage with SQL Server data disks. This is documented at https://msdn.microsoft.com/library/azure/dn133149.aspx. Specifically, the document states "When creating a storage account, disable geo-replication as consistent write order across multiple disks is not guaranteed. Instead, consider configuring a SQL Server disaster recovery technology between two Azure data centers".
Currently you can not control if/when Microsoft fails over to the secondary (geo-replicated) storage account. Microsoft controls that.
As I understand it, in the event that Microsoft does declare a disaster and fails over, then your VMs would still work. Perhaps you'd have to create the VM again from the VHD, but the data would be there (minus anything lost since the last sync to storage).

Resources