Using Premium Storage SSDs for Datasets

You can create Premium Storage SSD from the Azure dashboard. Premium Storage SSDs are ideal for persistent storage of a large number of datasets and offer better performance.

Note: Unlike File Storage, Premium Storage SSDs cannot be shared across multiple VMs. To share persistent data storage, you need to use File Storage. See the section Using File Storage for Datasets.

Creating Data Disk Storage Using the Azure Dashboard

  1. Open the Azure Dashboard, select Virtual machines from the left side menu, then select your VM.
  2. In the Settings section, click Disks, then click +Add data disk.

  3. Click the NAME list arrow, then click Create disk at the top of the list.
  4. At the Create Managed Disk pane, Enter a disk name Select a resource group Select Premium SSD for Account type Enter a disk size

  5. Click Create.
  6. When the validation is completed, click Save.

Creating Data Disk Storage Using the Azure CLI

To create a new data disk and attach it to your VM, include the following option in the az vm create command.

 --data-disk-sizes-gb <data-disk-size> 

To attach an existing data disk to your VM when creating it, include the following option in the az vm create command.

 -- attach-data-disks <data-disk-name> 

Mounting a Data Disk

  1. Once the data disk is created, establish an SSH connection to your VM.
  2. Create a filesystem on the data disk.

    You can view the volume by running lsblk command.

    :~# lsblk 
    
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT 
    sdb 8:16 0 1.5T 0 disk
    └─sdb1 8:17 0 1.4T 0 part /mnt 
    sr0 11:0 1 628K 0 rom 
    sdc 8:32 0 2T 0 disk
    └─sdc1 8:33 0 2T 0 part 
    sda 8:0 0 240G 0 disk
    └─sda1 8:1 0 240G 0 part /
    
    :`# mkfs.ext4 /dev/sdc1 
  3. Mount the volume to a mount directory.
    ~# mount /dev/sdc1 /data

    To mount the volume automatically every time the VM is stopped and restarted, add an entry to /etc/fstab.

    When adding an entry to /etc/fstab, use a UUID based device path (See device-names-problem for details).

    For example:.

    UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /data ext4 defaults,nofail 1 2 

Deleting a Data Disk

You can delete a Data Disk only if it not attached to a VM. Be aware that once you delete a Data Disk, you cannot undelete it.

  1. Open the Azure Dashboard and click All resources from the left side menu.
  2. Filter by Disks type, then locate and select the check box for your data disk.
  3. Click Delete.
  4. Enter ‘yes’ to confirm, then click Delete.