Moving an azure mounted vhd blob from one storage account to another - azure

I have a 3 GB disk mounted to /var/www/ on the same storage account as the OS disk
Because I cannot monitor the size of individual disks in Azure, rather I can only monitor the size of the blob data in a storage container. I now need to move the 3GB disk that is mounted on /var/www/ to a new storage container so I can monitor the size of the www directory
How do I do this? and if I can will it break the mount?
Thanks

Not sure what your monitoring concern is, but you'd need to:
unmount the disk
detach the disk from your VM
copy the blob (using whatever tool or code you want)
attach the disk to your VM
remount the disk
You cannot do anything with the page blob while it's attached to a VM.
Regarding size monitoring: vhd's in page blobs are sparsely-allocated (you're only billed for storage actually used). You could use the OS-based disk-free tools to monitor actual usage.

Related

How to Auto-mount Azure Storage Account to Linux VM

I am trying to mount an Azure storage account to a VM by following:
https://learn.microsoft.com/en-us/azure/storage/files/storage-files-quick-create-use-linux
Seems it works, but I need to re-mount after VM reboot.
Can I update /etc/fstab so it will auto-mount after VM reboot?
Currently I specify the Azure file storage account size when creating it (100GB in the example). Can I mount to a Azure file storage account without specifying size, so it can auto-scale and pay as it goes?
Thanks.
If you want to mount a NFS file share permanently even after the vm reboot then you need to update the fstab as explained in this documentation
Can I mount to a Azure file storage account without specifying size,
so it can auto-scale and pay as it goes?
No you cannot.NFS file shares are supported for premium storage accounts only. 100GB is the minimum storage/quota allocated when you create a NFS file share and you can expand up to 102400GB by using change size and performance option as shown in below image

Azure Virtual disk vs Azure vhdx drive

On Virtual machine screen of Azure
whether the virtaul disk gets created OR vhdx disk gets created?
It will be in VHD format.
If you have a VHDx disk that you wish to upload and use in Azure you must first convert it to VHD. See: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image

Increase the temporary disk size in azure vm

I have a test service fabric deployed to a single node VM. It is all working, but the temporary disk drive is only 20GB is size and keeps running out. I'm only using an A2_V2 Standard instance to keep tests down while we are testing things out.
Service Fabric is using the temporary disk for storage.
Is there a way to increase the size of the temporary disk?
Azure temporary disk size depends on your VM size. If you want to change its size, you need to resize your VM. However, the temporary disk will lost data if you resize the VM. BecauseThe temporary disk is not persisted.
Temporary Disk
The temporary storage drive, labeled as the D: drive is not persisted
and is not saved in the Windows Azure Blob storage. It is used
primarily for the page file and its performance is not guaranteed to
be predictable. Management tasks such as a change to the virtual
machine size, resets the D: drive. In addition, Windows Azure erases
the data on the temporary storage drive when a virtual machine fails
over. The D: drive is not recommended for storing any user or system
database files, including tempdb.
So, I don't suggest you use the temporary disk as the storage for the Service Fabric. You can add data disk to your VM.

Find the Mapping between DataDisk Resource and Windows Server Volume

I have an Azure Windows Server VM running for several months.
Because of some historical reasons, I have two almost empty volumes on my Windows Server, I want to delete them to get rid of expensive bills.
I'm looking into ways to Delete volumes from Azure Windows Sever, and I believe you can achieve this by delete resources from Azure Portal.
However, I'm struggling finding the Mapping between DataDisk Resource and Windows Volume. (from my research, I think there likely to be an one-to-one mapping)
And for certain reason, I'm saving starting a new VM and migrate everything as the last resort.
Thanks!
UPDATE with details:
As I'm really struggling with this AZURE structure, I'm updating it with a lot of screenshots:
this is I have from all resources:
You can see I have 2 1TB disks, one is premium and another is standard
this is I have from clicking my virtual machine then click disks:
BUT IN HERE, I END UP HAVE TWO PREMIUM DISKS
And the following is powershell output on my Windows Server (disk4 does not have a LUN in the output):
I MUST BE MISSING SOMETHING, THINGS JUST DONT ADD UP!
I'm struggling finding the Mapping between DataDisk Resource and
Windows Volume.
You are right, Azure data disk and windows Volume to be an one-to-one mapping.
We can use get-disk to find the windows volume information, in this way, we can find LUN of this volume.
Here is my test, Windows server 2016.
Run get-disk command in Azure VM:
Via Azure portal we can find the LUN:
In this way, we can find which Azure VM disk map to windows volume.
Update:
Module: storage space, this means that disk create from storage pools(storage space).
Like this:
In this scenario, we can use this command Get-PhysicalDisk to get the disk information:
Also we can find the storage pool in Azure VM:
Update2:
Q1: Yes, we map Physical disk to storage pool, the create one or more disks in from this storage pool. For example, Physical disk about 1TB, we map this disk to storage pool, so the storage pool is 1TB, then we can create a disk from this storage pool, this disk should be smaller than 1TB, if we create 3 disks, disk1 + disk2 + disk3 = 1TB.
Q2: because he only create a disk from this storage pool, and the disk = 1TB, that means the disk = the storage space = TB, so the free space is 0.00B
Q3: yes, Unattached means this disk not in use at that time.

Change Disk Type In Azure Storage Account

How can I change the disk type in an Azure storage account disk from Premium to Standard (SSD to HDD)?
For example, in my windows server VM the disk is configured to be a Premium. I no longer need it to be an SSD for the type of usage so I would like to change it to Standard. But it is greyed out. The VM is not currently running.
The disk type is configured at the time of creating the Azure Storage Account. The disk type is used to determine the physical hardware that hosts your Azure Storage Account within the Azure data center.
Currently, you are NOT able to change the disk type of a storage account after creation, and it's tied to that particular disk type. Unfortunately, if you need to change disk types, then you will need to copy your VM .vhd disk images to a new storage account that uses HDD disk type, then create the Azure VM to use the .vhd disk image from the new storage account.

Resources