# Disk
For the Azure, a disk can be a separate computing resource (created separately, billed separately, managed separately, etc.) and can be integrated into a VM as a component.
There are several special concepts in Azure's disk management, explained in advance:
- Managed Disk: Hosted by Azure Public Store
- Unmanaged disk: The disk can only be managed by the storage account under the account, not as an independent resource.
- Storage account: Azure provides a storage account function, the so-called storage account, which is an entry that can manage the disk.
# Data Disk
We know that a data disk is different from the system disk and is mainly used to store data.
# Add Data Disk
- Login Azure Portal, select the VM and Stop it
- Open the Setting->Disks of Stopped VM, click the button "Add data disk"
- Set the disk name,size and other information
- Connect to OS to initialize disk
- Windows, please refer to Azure official documantation Initialize Windows disk (opens new window)
- Linux, please refer to Azure official documantation Initialize Linux disk (opens new window)
- Finish adding data disk
# Detach Data Disk
- Login Azure Portal, select the VM and Stop it
- Open the Setting->Disks of Stopped VM
- Click the "Edit" on the top of Disks page
- Then, click the detach icon like below
- Once detach disk, please save it
- Start VM
The disk detach didn't deleted, it remain in the storage account
# Change Size
You can change the Size or change the Account type of Data Disk when the disk is not mounted to VM
In most times, the disk can only increase size, not reduce size.